Create Refund

This endpoint performs a full or partial refund. The refund operation is idempotent if a unique `requestId` and `merchantReference` are provided. If using the Deferred Payment Flow, be aware that only captured funds can be refunded. Do not create refunds after 120 days from the date of purchase. **Connection Timeouts** | Timeout | Time (Seconds) | |---------|----------------| | Open | 10 | | Read | 70 |

Authentication

AuthorizationBasic

Basic authentication of the form Basic <username:password>.

Path parameters

orderIdstringRequired
The unique Cash App Afterpay Order ID to apply the refund to.

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json

Request

This endpoint expects an object.
requestIdstringOptional

Unique ID required for safe retries. Max length 64 (varchar).

amountobjectOptional
Object containing amount and currency
merchantReferencestringOptional

The merchant’s internal refund id/reference. This must be included along with the requestId to utilise idempotency. Max length 85 (varchar).

refundMerchantReferencestringOptional<=128 characters

A unique reference for the individual refund event. Max length 128 (varchar).

Response

Returns a Refund object in response. All request parameters are echoed in the response. In addition, the response includes the following: | Attribute | Type | Description | | --- | --- | --- | | `refundId` | string | The unique, permanent, Cash App Afterpay-generated Refund ID. | | `refundedAt` | string | The UTC timestamp of when the refund was completed, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. |
amountobject or null
Object containing amount and currency
merchantReferencestring or null

The merchant’s internal refund id/reference. This must be included along with the requestId to utilise idempotency. Max length 85 (varchar).

refundIdstring or null

The unique, permanent, Cash App Afterpay-generated Refund ID.

refundMerchantReferencestring or null<=128 characters

A unique reference for the individual refund event. Max length 128 (varchar).

refundedAtstring or null
requestIdstring or null

Unique ID required for safe retries. Max length 64 (varchar).

Errors