Cookie Consent by Free Privacy Policy Generator Update cookies preferences

This endpoint performs a full or partial refund.

The refund operation is idempotent if a unique requestId and merchantReference are provided.

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:

AttributeTypeDescription
refundIdstringThe unique, permanent, Clearpay-generated Refund ID.
refundedAtstringThe UTC timestamp of when the refund was completed, in ISO 8601 format.

Connection Timeouts

TimeoutTime (Seconds)
Open10
Read70

Errors

In addition to the PUT/POST Errors applicable to all POST endpoints, the following errors are specific to Create Refund:

HTTP Status CodeerrorCodeDescription
412
Precondition Failed
precondition_failedThe orderId is invalid, does not exist, or is not eligible for a refund. For example, the order was declined.
422
Unprocessable Entity
invalid_amountThe amount requested exceeded the amount available.
422
Unprocessable Entity
unsupported_currencyThe currency of the refund does not match the currency of the order (and the Merchant account).
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!