This guide explains how to cancel payout transactions with the Payabli API. You may need to cancel a transaction if it was accidentally approved, or authorized with the wrong payment type.

You can cancel an authorized payout at any time, because it hasn’t started processing. After a payout is captured, you have a small window in which you can cancel it. When the payment status has changed to processed, you must contact Payabli support to cancel the payout.

When a payout is authorized, it returns referenceId, you need this to cancel the transaction.

Build the request

First, choose an endpoint. If you’re testing, use the Sandbox endpoint..

Authenticate

Authenticate by sending your API token in the request header with the key requestToken:
--header 'requestToken: API TOKEN'

Path parameters

There is one required path parameter.

referenceId
string
required

The authorized payout transaction’s ID. This is available in the authorization response.

Example request

This example cancels the authorized payout transaction with ID 129-219.

cancel an authorized transaction for payout
curl --request GET \
     --url https://api-sandbox.payabli.com/api/MoneyOut/cancel/129-219 \
     --header 'accept: application/json' \
     --header 'requestToken: <insert API token>'

Example response

A successful request returns a 200 response with a JSON body.

Cancel an authorized payout transaction
{
  "isSuccess": true,
  "responseText": "Success",
  "pageIdentifier": "string",
  "responseData": {
    "ReferenceId": "45-erre-324",
    "ResultCode": "1",
    "ResultText": "Approved",
    "CustomerId": 0
  }
}