Create a confirmed Purchase paid with Catch.
When a purchase is confirmed in your internal systems, make a server-side request to Catch's POST Purchase endpoint. Catch responds with a Purchase ID that uniquely identifies the successful purchase, and includes data about rewards applied and earned.
Path
POST https://<environment>.getcatch.com/v1/purchases
Variable name | Description | Possible values |
---|---|---|
<environment> | The Catch environment in which you’re making the request. | See Authentication. |
Parameters
Transaction identifiers
Parameter name | Necessity | Format | Description |
---|---|---|---|
checkout_id | required | string | The checkout ID that the merchant received in response to the 'create checkout' request |
merchant_purchase_id | required | string | The ID of this purchase in the merchant's system which Catch will store for shared accounting purposes |
Success Response
Name | Format | Description |
---|---|---|
applied_rewards | integer (in cents) | The amount of previous rewards applied on this purchase. |
checkout_id | string | The checkout ID that the merchant received in response to the create checkout request. |
earned_rewards | integer (in cents) | The amount of new rewards earned on this purchase. |
id | string | Catch-provided unique identifier for a given purchase. |
user_donation_amount_from_reward | integer (in cents) | The amount the consumer donated from rewards. Should be null if not applicable to merchant. |
201 Created
{
"applied_rewards": 772,
"checkout_id": "ch-uefa83ed-5be3-43de-abbe-1d8b7a39abe5",
"earned_rewards": 300003,
"id": "pur-c978f2d6-e8a7-42e3-a323-b0f11064706c",
"user_donation_amount_from_reward": null
}