Refund a Payment

Initiates a refund for a specified payment using its unique ID. By default, the full amount will be refunded, but you can specify a smaller amount for a partial refund. This flexibility allows merchants to handle various refund scenarios, such as partial returns or adjustments.

Path parameters

paymentIdstringRequiredformat: "uuid"

Identifier of the payment to refund. (In the transaction-based model, this is the transactionId.)

Request

This endpoint expects an object.
amountintegerOptional
Specify the amount to refund in minor units. Defaults to the remaining balance if not provided.
orderIdstringOptional
Optionally provide a specific order ID for the refund. Defaults to the original order ID if not specified.
reasonstringOptional

Optionally include a reason for the refund for record-keeping purposes.

Response

Refund accepted successfully.
statusstring
Current transaction status.
transactionIdstring
Unique identifier for the transaction.
messagestring

Human-readable status message.

authStateobject

Indicates additional steps required to complete a transaction. The shape varies by payment method and processor. Use type to determine which fields are present.

processorNamestring

Name of the payment processor (if assigned).

processorReferencestring

Processor reference (if available).

paymentAttributesmap from strings to strings
Attributes associated with the payment.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error