Create a Refund associated with an existing Purchase.
Catch can process one or more refund events associated with a particular Purchase.
Note that Catch enforces merchant_refund_id
uniqueness. As a result:
- If multiple requests contain identical values for both the
merchant_refund_id
and therefund_amount
, Catch will treat requests after the first valid one as duplicates and not create new refund events. - Catch will reject requests that reuse a
merchant_refund_id
value with arefund_amount
other than the value in the original, successful request. Catch treats these as invalid refund requests.
Path
POST https://<environment>.getcatch.com/v1/purchases/<purchase_id>/refunds
Variable name | Description | Possible values |
---|---|---|
<environment> | The Catch environment in which you’re making the request. | See Authentication. |
<purchase_id> | The Catch-provided unique identifier for a given purchase. | See POST Purchase where the id (string) gets created. |
Top Level Parameters
The POST Refund request includes four top-level parameters:
Parameter Name | Necessity | Format | Description |
---|---|---|---|
refund_amount | required | object | The total amount being refunded. |
merchant_refund_id | required | string | The ID of this refund in the merchant's system which Catch will store for reporting purposes. Note: This value must be unique per refund request. |
Refund Amount object
Parameter name | Necessity | Format | Description |
---|---|---|---|
amount | required | integer | The amount to be refunded, provided in cents. This should be the gross order total for a full refund or a portion of the gross order total for a partial refund. This should not factor in any applied Catch rewards. Catch will handle all Catch reward considerations when processing the refund. This must be less than or equal to the original total provided for the order, or than the remaining balance on the order if there has already been a refund event. |
currency | required | string (ISO 4217) | The currency in which the amounts are represented. |
Example request
{
"refund_amount": {
"amount":283,
"currency":"USD"
},
"merchant_refund_id": "rKBzEQPLc8J-3375760"
}
Example response
Name | Format | Description |
---|---|---|
id | string | Catch-provided unique identifier for a particular refund request. |
201 Created
{
"id":"rf-59870602-e913-4c49-8b56-994b16dcc88"
}