Create Refund
This endpoint performs a full or partial refund.
Note
The refund operation is idempotent if a unique requestId and merchantReference are provided.
Note
If using the Deferred Payment Flow, please be aware that only captured funds can be refunded.
Successful Response (201)
Returns a Refund object in response. All request parameters will be echoed in the response. In addition, the response includes the following:
Connection Timeouts
Errors
In addition to the PUT/POST Errors applicable to all POST endpoints, the following errors are specific to Create Refund:
Authentication
AuthorizationBasic
Basic authentication of the form Basic <base64(username:password)>.
Path parameters
orderId
The unique Clearpay Order ID to apply the refund to.
Headers
User-Agent
Accept
Request
This endpoint expects an object.
amount
The refund amount. The refund amount can not exceed the payment total.
requestId
A unique request ID, required for safe retries. It is recommended that the merchant generate a UUID for each unique refund.
merchantReference
The merchant’s internal refund id/reference. This must be included along with the requestId to utilise idempotency. Max length 85 (varchar)
refundMerchantReference
A unique reference for the individual refund event. If provided, the value will appear in the daily settlement file as "Payment Event ID". Limited to 128 characters.