Refund transaction

Refund a transaction that has settled and send money back to the account holder. If `amount` is omitted or set to 0, performs a full refund. If `amount` is provided, performs a partial refund. This is the v2 version of the refund endpoint, and returns the unified response format. See [Pay In unified response codes reference](/developers/references/pay-in-unified-response-codes) for more information.

Authentication

requestTokenstring
API Key authentication via header

Path parameters

transIdstringRequired

ReferenceId for the transaction (PaymentId).

amountdoubleOptional
Amount to refund from original transaction, minus any service fees charged on the original transaction. If omitted or set to 0, performs a full refund.

Response

Ok
codestring

Payabli’s unified response code. Starts with A (Approved) or D (Declined) followed by a four-digit code that provides specific details about the transaction result. See Pay In unified response codes reference for more information.

reasonstring

Human-readable reason corresponding to the response code.

explanationstring
Detailed description of the response code.
actionstring
Recommended resolution approach or next steps based on the response.
dataobject
Complete transaction details returned by v2 Money In endpoints. This matches the structure of the transaction details previously returned by the v1 details endpoint.
tokenstring or null

Pagination token (equivalent to pageIdentifier in v1 APIs). Returns null when pagination is not applicable.

Errors