API
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

  • idinteger
    Unique numeric identifier for the Gift purchase.
  • amountstring
    The value of the gift.
  • gift_currencystring · nullable
    The currency code of the gift.
  • credit_account_idinteger · nullable
    Unique numeric identifier for the Credit account that holds the value of the gift.
  • sender_customer_idinteger · nullable
    Unique numeric identifier for the Customer who purchased the gift.
  • sender_namestring · nullable
    The name of the person who purchased the gift, as shown to the recipient.
  • recipient_customer_idinteger · nullable
    Unique numeric identifier for the Customer who receives the gift.
  • gift_notestring · nullable
    The note from the sender to the recipient.
  • redeemable_collection_idinteger · nullable
    Unique numeric identifier for the Collection of products the gift can be redeemed for.
  • The product purchased as a gift.
    Show child attributesHide child attributes1
    • ecommercestring · nullable
      The product ID in the external e-commerce platform.
  • The variant purchased as a gift.
    Show child attributesHide child attributes1
    • ecommercestring · nullable
      The variant ID in the external e-commerce platform.
  • The order in which the gift was purchased.
    Show child attributesHide child attributes1
    • ecommercestring · nullable
      The order ID in the external e-commerce platform.
  • The products the gift can be redeemed for.
    Show child attributesHide child attributes1
    • ecommercestring
      The product ID in the external e-commerce platform.
  • notification_scheduled_atdatetime · nullable
    The date and time when the gift notification is scheduled to be sent to the recipient.
  • notification_sent_atdatetime · nullable
    The date and time when the gift notification was sent to the recipient.
  • redeemed_atdatetime · nullable
    The date and time when the gift was redeemed. null when it has not been redeemed yet.
  • created_atdatetime
    The date and time when the Gift purchase was created.
  • updated_atdatetime
    The date and time when the Gift purchase was last updated.
The gift purchase object
{
  "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.
Scoperead_gift_purchases

Query parameters

  • Return the gift purchases received by the given Customer.
  • Return the gift purchases bought by the given Customer.
  • Return the gift purchase funded by the given Credit account.
  • Return the gift purchases bought in the order with the given ID in the external e-commerce platform.
  • limitinteger
    The amount of results. Default is 50 while the maximum is 250.
  • pageinteger
    The page of results to show. Default is 1. Use cursor instead where possible.
  • cursorstring
    The next_cursor or previous_cursor value returned by a previous list request. When a cursor is passed, only limit can be passed with it.
GET/gift_purchases
curl 'https://api.rechargeapps.com/gift_purchases' \
  -H 'X-Recharge-Version: v2' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
{
  "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.
Scoperead_gift_purchases
GET/gift_purchases/{id}
curl 'https://api.rechargeapps.com/gift_purchases/129593' \
  -H 'X-Recharge-Version: v2' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
{
  "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.
Scopewrite_gift_purchases
DELETE/gift_purchases/{id}
curl -X DELETE 'https://api.rechargeapps.com/gift_purchases/129593' \
  -H 'X-Recharge-Version: v2' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
No content is returned for this response.