Request
This endpoint expects an object.
amountobjectRequired
The refund amount. The refund amount can not exceed the payment total.
requestIdstringOptional
A unique request ID, required for safe retries. It is recommended that the merchant generate a UUID for each unique refund.
merchantReferencestringOptional
The merchant’s internal refund id/reference. This must be included along with the requestId to utilise idempotency.
Response
Returns a Refund object in response. All request parameters will be echoed in the response. In addition, the response includes the following:
| Attribute | Type | Description |
| --------- | ---- | ----------- |
| `refundId` | string | The unique, permanent, Afterpay-generated Refund ID. |
| `refundedAt` | string | The UTC timestamp of when the refund was completed, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format. |