Refund a split funded transaction

Learn how to refund a transaction that was sent with split instructions

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 transaction, send a POST request to api/MoneyIn/refund/{transId}. This endpoint is used to refund a transaction that was sent with split instructions. 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.

There is a required request body, which is a JSON object.

This example refunds the transaction with a referenceId of 10-3ffa27df-b171-44e0-b251-e95fbfc7a723 for the total amount of the $100 transaction.

Full refund with split
$ curl --request GET \
> --url https://api-sandbox.payabli.com/api/MoneyIn/refund/10-3ffa27df-b171-44e0-b251-e95fbfc7a723 \
> --header 'accept: application/json'
> --header 'requestToken: <insert API token>'
> --data '
> {
> "source": "api",
> "orderDescription": "Materials deposit",
> "amount": 100,
> "refundDetails": {
>
> "splitRefunding": [
> {
> "originationEntryPoint": "7f1a381696",
> "accountId": "187-342",
> "description": "Refunding undelivered materials",
> "amount": 60
> },
> {
> "originationEntryPoint": "7f1a381696",
> "accountId": "187-343",
> "description": "Refunding deposit for undelivered materials",
> "amount": 40
> }
> ]
> }
> }'

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

Partial refund with split
$ curl --request GET \
> --url https://api-sandbox.payabli.com/api/MoneyIn/refund/10-3ffa27df-b171-44e0-b251-e95fbfc7a723 \
> --header 'accept: application/json'
> --header 'requestToken: <insert API token>'
> --data '
> {
> "source": "api",
> "orderDescription": "Materials deposit",
> "amount": 70,
> "refundDetails": {
>
> "splitRefunding": [
> {
> "originationEntryPoint": "7f1a381696",
> "accountId": "187-342",
> "description": "Refunding undelivered materials",
> "amount": 40
> },
> {
> "originationEntryPoint": "7f1a381696",
> "accountId": "187-343",
> "description": "Refunding deposit for undelivered materials",
> "amount": 30
> }
> ]
> }
> }'

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

Success refund response
1{
2 "responseText": "Success",
3 "isSuccess": true,
4 "responseData": {
5 "authCode": "A0000",
6 "referenceId": "10-3ffa27df-b171-44e0-b251-e95fbfc7a723",
7 "resultCode": 1,
8 "resultText": "CAPTURED",
9 "avsResponseText": null,
10 "cvvResponseText": null,
11 "customerId": null,
12 "methodReferenceId": null
13 },
14 "pageidentifier": null
15}