Refund a split funded transaction

Learn how to refund a transaction that was sent with split instructions
View as MarkdownOpen in Claude
Applies to:Developers

How you refund a split funded transaction depends on whether you want to do a full refund or a partial refund.

Full refunds

Full refunds of a split transaction work the same as refunds for a transaction without splits. Payabli returns the total of the transaction, less any pass-through fees, to the payor, reversing the original transaction’s split instructions. For example, a $103 transaction had a $100 total, plus a $3 pass-through fee. Payabli returns $100 to the payor, removing the funds from the same accounts the funds were originally split into.

To run a full refund, see the refund guide for help.

A request to this endpoint refunds the transaction based on the original transaction’s split instructions.

Partial refunds

Payabli accepts partial refunds when the original transaction was split only if the refund request includes split instructions. You must specify how much to return to the customer, and from whom.

Partial refund considerations

  • You can only make refunds from the accounts and entrypoints used in the original request.
  • You don’t have to include every account on the original transaction in a partial refund request.
  • An account can’t refund more than it received in the original transaction. For example, if Account A received $35 in the original transaction, you will get an error if you try to refund more than $35 from Account A.
  • The split amounts are validated for partial refunds. They can’t total more than the original transaction, or the refund request fails.

For example, a $103 transaction had a $100 total plus a $3 pass-through fee. The $100 total was split three ways:

  • Account A received $50
  • Account B received $30
  • Account C received $20

A partial refund request comes with split instructions that request $20 from Account A , $10 from Account B , and $5 from Account C. Payabli takes the designated amount back from those recipients and returns a total of $35 to the Payor.

Accounts A, B, and C retain the balance from the original transaction:

  • Account A keeps $50 - $20 = $30
  • Account B keeps $30 - $10 = $20
  • Account C keeps $20 - $5 = $15.

For example, a $103 transaction had a $100 total plus a $3 pass-through fee. The $100 total was split three ways:

  • Account A received $50
  • Account B received $30
  • Account C received $20

A partial refund request comes with split instructions that request $20 from Account A and $10 from Account B. Payabli takes the designated amount back from those recipients and returns a total of $30 to the Payor.

Accounts A, B, and C retain the balance from the original transaction:

  • Account A keeps $50 - $20 = $30
  • Account B keeps $30 - $10 = $20
  • Account C keeps $20 - $0 = $20.

Split refund examples

To refund a split-funded transaction, send a POST request to the v2 refund endpoint and include split instructions in the refundDetails.splitRefunding array of the request body. See the API reference for full information.

The Refund endpoint has a required path parameter, transId, which is the referenceId for the transaction.

transId
stringRequired

The referenceId identifying the transaction (PaymentId). You can find this in the success response for the payment you want to refund.

For a full refund, use the Refund endpoint and pass the refund amount and split instructions in the request body. For a partial refund, use the Partial refund endpoint and pass the amount in the path with the split breakdown in the body.

This example fully refunds the $100 transaction with a referenceId of 10-3ffa27df-b171-44e0-b251-e95fbfc7a723, passing the amount and split instructions in the request body.

POST
/api/v2/MoneyIn/refund/:transId
1curl -X POST https://api-sandbox.payabli.com/api/v2/MoneyIn/refund/10-3ffa27df-b171-44e0-b251-e95fbfc7a723 \
2 -H "requestToken: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "amount": 100,
6 "orderDescription": "Materials deposit",
7 "refundDetails": {
8 "splitRefunding": [
9 {
10 "accountId": "187-342",
11 "amount": 60,
12 "description": "Refunding undelivered materials",
13 "originationEntryPoint": "495147f647"
14 },
15 {
16 "accountId": "187-343",
17 "amount": 40,
18 "description": "Refunding deposit for undelivered materials",
19 "originationEntryPoint": "8cfec329267"
20 }
21 ]
22 },
23 "source": "api"
24}'

This example refunds a partial amount of $70 (out of $100) of the transaction with a referenceId of 10-3ffa27df-b171-44e0-b251-e95fbfc7a723, using the partial refund endpoint with the amount in the path.

POST
/api/v2/MoneyIn/refund/:transId/:amount
1curl -X POST https://api-sandbox.payabli.com/api/v2/MoneyIn/refund/10-3ffa27df-b171-44e0-b251-e95fbfc7a723/70 \
2 -H "requestToken: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "orderDescription": "Materials deposit",
6 "refundDetails": {
7 "splitRefunding": [
8 {
9 "accountId": "187-342",
10 "amount": 40,
11 "description": "Refunding undelivered materials",
12 "originationEntryPoint": "495147f647"
13 },
14 {
15 "accountId": "187-343",
16 "amount": 30,
17 "description": "Refunding deposit for undelivered materials",
18 "originationEntryPoint": "8cfec329267"
19 }
20 ]
21 },
22 "source": "api"
23}'

A successful refund returns a 201 status with a JSON body.

Response
1{
2 "code": "A0004",
3 "reason": "Refunded",
4 "explanation": "Transaction refunded",
5 "action": "No action required",
6 "data": {
7 "parentOrgName": "Mrinal's Pet Supplies",
8 "paypointDbaname": "Mrinal's Pet Shop North",
9 "paypointLegalname": "Mrinal's Pet Shop North",
10 "paypointEntryname": "495147f647",
11 "paymentTransId": "3040-96dfa9a7c4ed4f82a3dd4a4a12ad28ae",
12 "connectorName": "gp",
13 "externalProcessorInformation": "",
14 "gatewayTransId": "TRN_Ih68D6UZdip7OEQ2QFXat1yQSLF2nB",
15 "orderId": null,
16 "method": "card",
17 "batchNumber": "3040_combined_20251201_3a50747d-6b5c-40ef-9f69-93a9cc7fcb49",
18 "batchAmount": 420,
19 "payorId": 4440,
20 "paymentData": {
21 "maskedAccount": "4XXXXXXXXXXX5439",
22 "accountType": "visa",
23 "accountExp": "12/25",
24 "holderName": "John Cassian",
25 "storedId": null,
26 "initiator": null,
27 "storedMethodUsageType": null,
28 "sequence": null,
29 "orderDescription": "",
30 "accountId": null,
31 "signatureData": null,
32 "binData": {
33 "binMatchedLength": "6",
34 "binCardBrand": "VISA",
35 "binCardType": "CREDIT",
36 "binCardCategory": "CLASSIC",
37 "binCardIssuer": "",
38 "binCardIssuerCountry": "RUSSIAN FEDERATION",
39 "binCardIssuerCountryCodeA2": "RU",
40 "binCardIssuerCountryNumber": "643",
41 "binCardIsRegulated": "",
42 "binCardUseCategory": "",
43 "binCardIssuerCountryCodeA3": ""
44 },
45 "paymentDetails": {
46 "totalAmount": 105,
47 "serviceFee": 5,
48 "checkNumber": null,
49 "checkUniqueId": "",
50 "currency": "USD",
51 "orderDescription": null,
52 "orderId": null,
53 "orderIdAlternative": null,
54 "paymentDescription": null,
55 "groupNumber": null,
56 "source": null,
57 "payabliTransId": null,
58 "categories": [],
59 "splitFunding": [],
60 "checkImage": null,
61 "unbundled": null
62 }
63 },
64 "transStatus": 1,
65 "paypointId": 3040,
66 "totalAmount": -70,
67 "netAmount": -70,
68 "feeAmount": 0,
69 "settlementStatus": 0,
70 "operation": "Refund",
71 "responseData": {
72 "resultCode": "A0004",
73 "resultCodeText": "Refunded",
74 "response": "1",
75 "responsetext": "CAPTURED",
76 "authcode": "",
77 "transactionid": "TRN_Xo4dpKfmx3OxSc9svd2ccI6OOnyB2I",
78 "avsresponse": null,
79 "avsresponse_text": null,
80 "cvvresponse": null,
81 "cvvresponse_text": null,
82 "orderid": null,
83 "response_code": "100",
84 "response_code_text": "Operation successful",
85 "customer_vault_id": null,
86 "emv_auth_response_data": null,
87 "type": null
88 },
89 "source": "api",
90 "scheduleReference": 0,
91 "orgId": 123,
92 "refundId": 1279666,
93 "returnedId": 0,
94 "chargebackId": 0,
95 "retrievalId": 0,
96 "invoiceData": {
97 "invoiceNumber": null,
98 "invoiceDate": null,
99 "invoiceDueDate": null,
100 "invoiceEndDate": null,
101 "invoiceStatus": null,
102 "invoiceType": null,
103 "frequency": null,
104 "paymentTerms": null,
105 "termsConditions": null,
106 "notes": null,
107 "tax": null,
108 "discount": null,
109 "invoiceAmount": null,
110 "freightAmount": null,
111 "dutyAmount": null,
112 "purchaseOrder": null,
113 "firstName": null,
114 "lastName": null,
115 "company": null,
116 "shippingAddress1": null,
117 "shippingAddress2": null,
118 "shippingCity": null,
119 "shippingState": null,
120 "shippingZip": null,
121 "shippingCountry": null,
122 "shippingEmail": null,
123 "shippingPhone": null,
124 "shippingFromZip": null,
125 "summaryCommodityCode": null,
126 "items": null,
127 "attachments": null,
128 "additionalData": null
129 },
130 "entrypageId": 0,
131 "externalPaypointID": "",
132 "isValidatedACH": false,
133 "transactionTime": "2025-12-01T09:50:03.559",
134 "customer": {
135 "identifiers": null,
136 "firstName": "David",
137 "lastName": "Beckham",
138 "companyName": "Driving School LLC",
139 "billingAddress1": "Home Address",
140 "billingAddress2": "",
141 "billingCity": "",
142 "billingState": "",
143 "billingZip": "45157",
144 "billingCountry": "US",
145 "billingPhone": "+15555555555",
146 "billingEmail": "example@payabli.com",
147 "customerNumber": "C-90010",
148 "shippingAddress1": "Home Address",
149 "shippingAddress2": "",
150 "shippingCity": "",
151 "shippingState": "",
152 "shippingZip": "45157",
153 "shippingCountry": "US",
154 "customerId": 4440,
155 "customerStatus": 0,
156 "additionalData": null
157 },
158 "splitFundingInstructions": [
159 {
160 "accountId": "187-342",
161 "amount": -40,
162 "description": "Refunding undelivered materials",
163 "recipientEntryPoint": "495147f647"
164 },
165 {
166 "accountId": "187-343",
167 "amount": -30,
168 "description": "Refunding deposit for undelivered materials",
169 "recipientEntryPoint": "8cfec329267"
170 }
171 ],
172 "cfeeTransactions": [],
173 "transactionEvents": [
174 {
175 "transEvent": "Created",
176 "eventData": "0HNHD68HATSUC:00000001",
177 "eventTime": "2025-12-01T09:50:02.558651"
178 },
179 {
180 "transEvent": "Approved",
181 "eventData": "0HNHD68HATSUC:00000001",
182 "eventTime": "2025-12-01T09:50:03.609111"
183 }
184 ],
185 "riskStatus": "PASSED",
186 "riskReason": "",
187 "riskAction": "",
188 "deviceId": "",
189 "achSecCode": "",
190 "achHolderType": "personal",
191 "ipAddress": "255.255.255.255",
192 "isSameDayACH": false,
193 "walletType": null,
194 "pendingFeeAmount": 0,
195 "riskFlagged": false,
196 "riskFlaggedOn": "2025-12-01T09:50:02.5474568",
197 "riskActionCode": 0,
198 "transAdditionalData": null
199 },
200 "token": null
201}

See these related resources to help you get the most out of Payabli.