Refund transaction

View as MarkdownOpen in Claude
Give a full refund for a transaction that has settled and send money back to the account holder. To perform a partial refund, see [Partially refund a transaction](/developers/api-reference/moneyinV2/partial-refund-a-settled-transaction). This is the v2 version of the refund endpoint, and returns the unified response format. See [Pay In unified response codes reference](/guides/pay-in-unified-response-codes-reference) for more information. <Note> To refund a split-funded transaction, include split instructions in the request body. Omit the body for a standard refund. </Note>

Authentication

requestTokenstring
API Key authentication via header

Path parameters

transIdstringRequired

ReferenceId for the transaction (PaymentId).

Request

Optional. To refund a split-funded transaction, provide split instructions. Omit the body for a standard refund.

amountdoubleOptional

Amount to refund from original transaction, minus any service fees charged on the original transaction.

The amount provided can’t be greater than the original total amount of the transaction, minus service fees. For example, if a transaction was $90 plus a $10 service fee, you can refund up to $90.

An amount equal to zero will refund the total amount authorized minus any service fee.

ipaddressstringOptional
The IP address associated with the transaction.
orderDescriptionstringOptional<=250 characters
Text description of the transaction.
orderIdstringOptional<=250 characters
Custom identifier for the transaction.
refundDetailsobjectOptional
Object containing details about the refund, including line items and optional split instructions.
sourcestringOptional<=100 characters
Custom identifier to indicate the transaction or request source.

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

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
500
Internal Server Error