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 the refund_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 a refund_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 nameDescriptionPossible 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 NameNecessityFormatDescription
refund_amountrequiredobjectThe total amount being refunded.
merchant_refund_idrequiredstringThe 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.
itemsrequiredarrayThe item(s) involved in the refund.
appeasement_detailsoptionalobjectIf the refund includes an appeasement, provide details about the appeasement amount.

Refund Amount object

Parameter nameNecessityFormatDescription
amountrequiredintegerMust be less than or equal to the original total specified on the checkout.
currencyrequiredstring (ISO 4217)The currency in which the amounts are represented.

Items array

Parameter nameNecessityFormatDescription
namerequiredstringThe name of the item.
skurequiredstringThe SKU of the item.
pricerequiredobjectThe price of item.
quantityrequiredintegerThe quantity of the item.

Price object

Parameter nameNecessityFormatDescription
amountrequiredintegerThe unit price of the item.
currencyrequiredstring (ISO 4217)The currency that the price of the item is in.

Appeasement Details object

Parameter NameNecessityFormatDescription
total_amount optionalobjectWithin appeasement_details, Contains details on total appeasement amount and currency

Total Amount Object

Total Amount object

Parameter NameNecessityFormatDescription
amountoptionalintegerThe sum of all appeasements, in cents.
currencyoptionalstring (ISO 4217)The currency in which the amounts are represented.

Example request

{
    "refund_amount": {
      "amount":283,
      "currency":"USD"
    },
    "merchant_refund_id": "rKBzEQPLc8J-3375760",
    "items":    [ {
         "name":"wide_leg_jean",
         "sku":"VCqtCk-kQft70",
         "price":{
            "amount":283,
            "currency":"USD"
         },
         "quantity":1
      }],
    "appeasement_details": {
                "total_amount": {
                    "amount": 0,
                    "currency": "USD"
            }
        }
}

Example response

NameFormatDescription
idstringCatch-provided unique identifier for a particular refund request.
201 Created
{
    "id":"rf-59870602-e913-4c49-8b56-994b16dcc88"
}