Core Resources
Gift purchasesNew
A
Gift purchase is created when a customer buys a gift for someone else. It links the sender, the recipient and the Credit account that holds the value of the gift, and tracks when the recipient was notified and when the gift was redeemed. Gift purchases are only available for stores with gifting enabled.This resource is new in the V2 reference. It also works when you send X-Recharge-Version: 2021-11.
#The gift purchase object
Attributes
- idintegerUnique numeric identifier for the
Gift purchase. - amountstringThe value of the gift.
- gift_currencystring · nullableThe currency code of the gift.
- credit_account_idinteger · nullableUnique numeric identifier for the
Credit accountthat holds the value of the gift. - sender_customer_idinteger · nullableUnique numeric identifier for the
Customerwho purchased the gift. - sender_namestring · nullableThe name of the person who purchased the gift, as shown to the recipient.
- recipient_customer_idinteger · nullableUnique numeric identifier for the
Customerwho receives the gift. - gift_notestring · nullableThe note from the sender to the recipient.
- redemption_linkstring · nullableThe URL the recipient uses to redeem the gift.
- redeemable_collection_idinteger · nullableUnique numeric identifier for the
Collectionof products the gift can be redeemed for. - external_gift_product_idobjectThe product purchased as a gift.
Show child attributesHide child attributes1
- ecommercestring · nullableThe product ID in the external e-commerce platform.
- external_gift_variant_idobjectThe variant purchased as a gift.
Show child attributesHide child attributes1
- ecommercestring · nullableThe variant ID in the external e-commerce platform.
- external_order_idobjectThe order in which the gift was purchased.
Show child attributesHide child attributes1
- ecommercestring · nullableThe order ID in the external e-commerce platform.
- external_redeemable_product_idsarray of objectsThe products the gift can be redeemed for.
Show child attributesHide child attributes1
- ecommercestringThe product ID in the external e-commerce platform.
- notification_scheduled_atdatetime · nullableThe date and time when the gift notification is scheduled to be sent to the recipient.
- notification_sent_atdatetime · nullableThe date and time when the gift notification was sent to the recipient.
- redeemed_atdatetime · nullableThe date and time when the gift was redeemed.
nullwhen it has not been redeemed yet. - created_atdatetimeThe date and time when the
Gift purchasewas created. - updated_atdatetimeThe date and time when the
Gift purchasewas last updated.
{
"gift_purchase": {
"id": 2204,
"credit_account_id": 30877,
"recipient_customer_id": 71990,
"redeemable_collection_id": null,
"sender_customer_id": 71542,
"amount": "60.00",
"created_at": "2026-11-02T16:40:12+00:00",
"external_gift_product_id": {
"ecommerce": "7003555"
},
"external_gift_variant_id": {
"ecommerce": "41201544"
},
"external_order_id": {
"ecommerce": "5120099334"
},
"external_redeemable_product_ids": [
{
"ecommerce": "7003112"
}
],
"gift_currency": "USD",
"gift_note": "Happy birthday! Enjoy three months of coffee.",
"notification_scheduled_at": "2026-11-20T14:00:00+00:00",
"notification_sent_at": null,
"redeemed_at": null,
"redemption_link": "https://example-store.example.com/gifts/redeem/2204",
"sender_name": "Jordan Example",
"updated_at": "2026-11-02T16:40:12+00:00"
}
}#List gift purchases
GET/gift_purchases
Returns a list of the store's
Gift purchases, sorted by id in descending order. Cancelled gift purchases are not returned.Scope
read_gift_purchasesQuery parameters
- recipient_customer_idintegerReturn the gift purchases received by the given
Customer. - sender_customer_idintegerReturn the gift purchases bought by the given
Customer. - credit_account_idintegerReturn the gift purchase funded by the given
Credit account. - shopify_order_idstringReturn the gift purchases bought in the order with the given ID in the external e-commerce platform.
- limitintegerThe amount of results. Default is 50 while the maximum is 250.
- pageintegerThe page of results to show. Default is 1. Use
cursorinstead where possible. - cursorstringThe
next_cursororprevious_cursorvalue returned by a previous list request. When a cursor is passed, onlylimitcan be passed with it.
curl 'https://api.rechargeapps.com/gift_purchases' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"gift_purchases": [
{
"id": 2204,
"credit_account_id": 30877,
"recipient_customer_id": 71990,
"redeemable_collection_id": null,
"sender_customer_id": 71542,
"amount": "60.00",
"created_at": "2026-11-02T16:40:12+00:00",
"external_gift_product_id": {
"ecommerce": "7003555"
},
"external_gift_variant_id": {
"ecommerce": "41201544"
},
"external_order_id": {
"ecommerce": "5120099334"
},
"external_redeemable_product_ids": [
{
"ecommerce": "7003112"
}
],
"gift_currency": "USD",
"gift_note": "Happy birthday! Enjoy three months of coffee.",
"notification_scheduled_at": "2026-11-20T14:00:00+00:00",
"notification_sent_at": null,
"redeemed_at": null,
"redemption_link": "https://example-store.example.com/gifts/redeem/2204",
"sender_name": "Jordan Example",
"updated_at": "2026-11-02T16:40:12+00:00"
}
],
"next_cursor": null,
"previous_cursor": null
}#Retrieve a gift purchase
GET/gift_purchases/{id}
Returns a single
Gift purchase by its id.Scope
read_gift_purchasescurl 'https://api.rechargeapps.com/gift_purchases/129593' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"gift_purchase": {
"id": 2204,
"credit_account_id": 30877,
"recipient_customer_id": 71990,
"redeemable_collection_id": null,
"sender_customer_id": 71542,
"amount": "60.00",
"created_at": "2026-11-02T16:40:12+00:00",
"external_gift_product_id": {
"ecommerce": "7003555"
},
"external_gift_variant_id": {
"ecommerce": "41201544"
},
"external_order_id": {
"ecommerce": "5120099334"
},
"external_redeemable_product_ids": [
{
"ecommerce": "7003112"
}
],
"gift_currency": "USD",
"gift_note": "Happy birthday! Enjoy three months of coffee.",
"notification_scheduled_at": "2026-11-20T14:00:00+00:00",
"notification_sent_at": null,
"redeemed_at": null,
"redemption_link": "https://example-store.example.com/gifts/redeem/2204",
"sender_name": "Jordan Example",
"updated_at": "2026-11-02T16:40:12+00:00"
}
}#Cancel a gift purchase
DELETE/gift_purchases/{id}
Cancels a
Gift purchase that has not been redeemed yet. The remaining balance of the gift's Credit account is removed and any gift notification that has not been sent yet is cancelled. A Gift purchase that has already been redeemed cannot be cancelled.Scope
write_gift_purchasescurl -X DELETE 'https://api.rechargeapps.com/gift_purchases/129593' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'No content is returned for this response.