Core Resources
Subscriptions
Subscriptions are individual items a customer receives on a recurring basis.
A
A
Subscription is a Product added to an Address.92 additions in V2, marked New
Everything marked New also works when you send X-Recharge-Version: 2021-11.

- POST/subscriptions
- GET/subscriptions/{id}
- PUT/subscriptions/{id}
- DELETE/subscriptions/{id}
- GET/subscriptions
- POST/subscriptions/{id}/set_next_charge_date
- POST/subscriptions/{id}/change_address
- POST/subscriptions/{id}/cancel
- POST/subscriptions/{id}/activate
- POST/subscriptions/skip_gift
- POST/subscriptions/{id}/charges/skip
- GET/subscriptions/{id}/charges/skip/preview
- POST/addresses/{address_id}/subscriptions-bulk-change-address
- PUT/bundles/{purchase_item_id}
#The subscription object
Subscriptions are individual items a customer benefit from on a recurring basis.
These fields are deprecated, however they will not be removed from this API version.
product_title is deprecated. Use title instead. shipping_date is deprecated. Use scheduled_at instead. shopify_id is deprecated. Use shopify_order_id instead. address_is_active is deprecated. Please ignore, not an applicable field.Attributes
- idintegerUnique numeric identifier for the subscription.
- An object containing variant values stored on the
Subscription. Each key holds an object with the storedvalueand anoverrideboolean that istruewhen the value was set explicitly on theSubscription. The object is empty when no values are stored.Only returned by the retrieve and list endpoints for stores that have enhanced subscription responses enabled.Show child attributesHide child attributes55 new
- The fulfillment service of the variant, as
valueandoverride. - The weight of the variant in grams, as
valueandoverride. - The tax code of the variant, as
valueandoverride. - Whether the variant is taxable, as
valueandoverride. - The vendor of the variant, as
valueandoverride.
- address_idintegerUnique numeric identifier for the address the subscription is associated with.
- customer_idintegerUnique numeric identifier for the customer the subscription is tied to.
- analytics_dataobjectAn object used to contain analytics data such as utm parameters.
Show child attributesHide child attributes1
- utm_paramsarray of objectsAn array containing
utm_paramobjects.Show child attributesHide child attributes7
- utm_campaignstringThe UTM campaign.
- utm_contentstringThe UTM content.
- utm_data_sourcestringThe source of the campaign parameter.
- utm_sourcestringThe UTM source.
- utm_mediumstringThe UTM medium.
- utm_termstringThe UTM term.
- utm_timestampstringThe UTM timestamp.
- cancellation_reasonstringReason provided for cancellation.
- Additional comment for cancellation. Maximum length is 1024 characters.
- cancelled_atdatetimeThe time the subscription was cancelled.
- charge_interval_frequencyintegerThe number of units (specified in
order_interval_unit) between eachCharge. For example,order_interval_unit=monthandcharge_interval_frequency=3, indicate charge every 3 months.Chargesmust use the same unit types as orders. - An object containing the related objects requested with the
includequery parameter.Only returned when theincludequery parameter is passed on the retrieve or list endpoints.Show child attributesHide child attributes917 new
- The add-on relationships of the
Subscriptionwith other subscriptions.Returned whenincludecontainsaddons. Only populated for stores with add-on subscriptions enabled.Show child attributesHide child attributes33 new
- The role of the related subscription:
childwhen the related subscription is an add-on of thisSubscription,parentwhen thisSubscriptionis an add-on of the related subscription.Possible valueschildparent - Unique numeric identifier of the parent
Subscriptionin the relationship. - Unique numeric identifier of the add-on
Subscriptionin the relationship.
- The
AddresstheSubscriptionis associated with.Returned whenincludecontainsaddress. - The bundle product that matches the product of the
Subscription.nullif the product is not a bundle.Returned whenincludecontainsbundle_product. - The
BundleSelectionlinked to theSubscription.nullif there is none.Returned whenincludecontainsbundle_selections. - The charge activity records created in the last 90 days for the
Chargesthat contain theSubscription.Returned whenincludecontainscharge_activities. - The
CustomertheSubscriptionis tied to.Returned whenincludecontainscustomer. - The entitlements granted to the
Customerby theSubscription.Returned whenincludecontainscustomer_entitlements.Show child attributesHide child attributes55 new
- Unique numeric identifier for the customer entitlement.
- The description of the entitlement feature.
- The time the entitlement expires.
nullif it does not expire. - The lookup key of the entitlement feature.
- The name of the entitlement feature.
- A list containing the date on which the
Subscriptionexpires as an add-on, ornullif it has no expiration.Returned whenincludecontainsexpires_at. Only populated for stores with add-on subscriptions enabled. - The
Metafieldsattached to theSubscription.Returned whenincludecontainsmetafields.
- Value is
trueif theSubscriptionis for a digital item, meaning the item does not require shipping and itsPlangrants at least one entitlement. Alwaysfalsefor stores that do not have digital subscriptions enabled. - Unique numeric identifier of the
Chargethat is waiting for a payment confirmation for thisSubscription. TheSubscriptioncannot be modified while this value is set.Only returned for stores that have SEPA Direct Debit or iDEAL payments enabled. - Unique numeric identifier of the
PlantheSubscriptionis linked to.Only returned for stores that have plan IDs in subscription responses enabled. - created_atdatetimeThe time the subscription was created.
- Set the number of charges until subscription expires.
- external_product_idobjectAn object containing the product id as it appears in external platforms.
Show child attributesHide child attributes1
- ecommercestringThe product id as it appears in the external e-commerce platform. The
external_product_idof theProductrecord in Recharge, linking aPlanto aProduct.
- external_variant_idobjectAn object containing the variant id as it appears in external platforms.
Show child attributesHide child attributes1
- ecommercestringThe variant id as it appears in the external e-commerce platform. The
external_variant_idof theProductrecord in Recharge, linking aPlanto aProduct.
- has_queued_chargesbooleanRetrieves
trueif there is queued charge. Otherwise, retrievesfalse. - is_prepaidbooleanValue is set to
trueif it is a prepaid item. - is_skippablebooleanValue is set to
trueif it is not a prepaid item - is_swappablebooleanValue is set to
trueif it is not a prepaid item and if in Customer portal settings swap is allowed for customers. - max_retries_reachedbooleanRetrieves
trueif charge has an error max retries reached. Otherwise, retrievesfalse. - Date of the next charge for the subscription.
- order_day_of_monthintegerThe set day of the month order is created. Default is that there isn’t a strict day of the month when the order is created.This is only applicable to subscriptions with
order_interval_unit:“month”. - order_day_of_weekintegerThe set day of the week order is created. Default is that there isn’t a strict day of the week order is created.This is only applicable to subscriptions with
order_interval_unit = “week”.
Value of 0 equals to Monday, 1 to Tuesday etc. - order_interval_frequencyintegerThe number of units (specified in
order_interval_unit) between each order. For example, order_interval_unit=month and order_interval_frequency=3, indicate order every 3 months. Max value: 1000 - order_interval_unitstringThe frequency unit used to determine when a subscription's order is created.Possible values
dayweekmonth - presentment_currencystringThe presentment currency of the subscription.
- pricestringThe price of the item before discounts, taxes, or shipping have been applied.
- product_titlestringThe name of the product in a store's catalog.
- propertiesarray of objectsA list of line item objects, each one containing information about the subscription. Custom key-value pairs can be installed here, they will appear on the connected queued charge and after it is processed on the order itself.
- quantityintegerThe number of items in the subscription.
- skustringA unique identifier of the item in the fulfillment. In cases where SKU is blank, it will be dynamically pulled whenever it is used.
- sku_overridebooleanFlag that is automatically updated to
truewhen SKU is passed on create or update. Whensku_overrideistrue, the SKU on the subscription will be used to generate charges and orders. Whensku_overrideisfalse, Recharge will dynamically fetch the SKU from the corresponding external platform variant. - statusstringThe status of the subscription.Possible values
activecancelledexpiredEXPIRED- This status occurs when the maximum number of charges for a product has been reached. - updated_atdatetimeThe date time at which the purchase_item record was last updated.
- variant_titlestringThe name of the variant in a shop’s catalog.
{
"subscription": {
"id": 89559201,
"address_id": 48563471,
"customer_id": 43845860,
"analytics_data": {
"utm_params": []
},
"cancellation_reason": null,
"cancellation_reason_comments": null,
"cancelled_at": null,
"charge_interval_frequency": "30",
"created_at": "2021-02-25T21:27:19+00:00",
"expire_after_specific_number_of_charges": null,
"external_product_id": {
"ecommerce": "2103271587891"
},
"external_variant_id": {
"ecommerce": "18261278883891"
},
"has_queued_charges": true,
"is_digital": false,
"is_prepaid": true,
"is_skippable": false,
"is_swappable": false,
"max_retries_reached": false,
"next_charge_scheduled_at": "2020-07-15",
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": 15,
"order_interval_unit": "day",
"presentment_currency": "USD",
"price": 5,
"product_title": "Powder Milk 50.00% Off Auto renew",
"properties": [
{
"name": "Colour",
"value": "White"
},
{
"name": "Package Material",
"value": "Paper"
}
],
"quantity": 3,
"sku": null,
"sku_override": false,
"status": "active",
"updated_at": "2020-07-10T10:30:51+00:00",
"variant_title": "1 / Powder"
}
}#Create a subscription
POST/subscriptions
Scope
write_subscriptionsWhen creating a subscription via API,
order_interval_frequency and charge_interval_frequency values do not necessarily need to match the values set in the respective Plans. The product, however, does need to have at least one Plan in order to be added to a subscription.charge_interval_frequency, order_interval_frequency and order_interval_unit are only required when plan_id is not provided.Query parameters
- If set to
true, theQUEUEDcharges linked to theSubscriptionare regenerated before the response is returned. If omitted orfalse, the charges are regenerated asynchronously.
Body parameters
- Unique numeric identifier of the customer’s address.
- An object used to contain analytics data such as utm parameters.
Show child attributesHide child attributes18 new
- An array containing
utm_paramobjects.Show child attributesHide child attributes77 new
- The UTM campaign.
- The UTM content.
- The source of the campaign parameter. Required for each
utm_paramobject. - The UTM medium.
- The UTM source.
- The UTM term.
- The UTM timestamp. Required for each
utm_paramobject.
- Reason for cancellation. Can only be set when
statusiscancelledorexpired. - The time the subscription was cancelled. Can only be set when
statusiscancelledorexpired. Defaults to the current time whenstatusiscancelled. - The number of units, specified in
order_interval_unit, between each charge. - A list of up to 10 custom key-value pairs to attach to the
Eventsgenerated by this request. They are returned in thecustom_attributesof thoseEvents. - The number of charges until the subscription expires.
- This will set the first charge date of a new subscription.
- order_day_of_monthintegerThis is populated when order_interval_unit has value “month”. Default value is 0.
- order_day_of_weekintegerThis is populated when order_interval_unit has value “week”.
- The number of units, specified in order_interval_unit, between each order.
- The frequency unit used to determine when a subscription order is created.Possible values
dayweekmonth - plan_idintegerA Recharge Plan id that provides interval information. Automatically fills the following properties from the plan if they were not provided directly: charge_interval_frequency, expire_after_specific_number_of_charges, order_day_of_month, order_day_of_week, order_interval_frequency, order_interval_unit.
- The presentment currency of the
price. It must match the currency of theAddress. Required whenpriceis provided and the currency of theAddressis not the store's default currency. - pricestringThe price of the product.
- Set to
trueto indicate that thepricein the request was explicitly chosen by the caller instead of being calculated by Recharge. - product_titlestringThe name of the product.
- propertiesarray of objectsA list of key/value pairs representing properties of the subscription.
- The quantity of the product.
- external_product_idobjectUnique numeric identifier of the product id.
Show child attributesHide child attributes1
- ecommercestringThe product id as it appears in the external e-commerce platform. The
external_product_idof theProductrecord in Recharge, linking aPlanto aProduct.
- Unique numeric identifier of the product variant id.
Show child attributesHide child attributes1
- ecommercestringThe variant id as it appears in the external e-commerce platform. The
external_variant_idof theProductrecord in Recharge, linking aPlanto aProduct.
- A unique identifier of the item in the fulfillment.
- When
true, theskustored on theSubscriptionis used instead of the SKU of the product variant. - statusstringDefault is set to
active.Possible valuesactivecancelledexpired - The name of the product variant.
curl -X POST 'https://api.rechargeapps.com/subscriptions' \
-H 'X-Recharge-Version: v2' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"address_id": 48563471,
"charge_interval_frequency": "30",
"next_charge_scheduled_at": "2021-12-17",
"order_interval_frequency": "30",
"order_interval_unit": "day",
"properties": [
{
"name": "Colour",
"value": "Yellow"
},
{
"name": "Bottle Material",
"value": "Glass"
}
],
"external_variant_id": {
"ecommerce": "32165284380775"
},
"quantity": 3
}'{
"subscription": {
"id": 63898947,
"address_id": 48563471,
"customer_id": 37657002,
"analytics_data": {
"utm_params": {
"utm_source": "facebook",
"utm_medium": "cpc"
}
},
"cancellation_reason": null,
"cancellation_reason_comments": null,
"cancelled_at": null,
"charge_interval_frequency": 30,
"created_at": "2020-02-19T17:40:09+00:00",
"expire_after_specific_number_of_charges": null,
"external_product_id": {
"ecommerce": "4381728735283"
},
"external_variant_id": {
"ecommerce": "32165284380775"
},
"has_queued_charges": true,
"is_digital": false,
"is_prepaid": false,
"is_skippable": true,
"is_swappable": false,
"max_retries_reached": false,
"next_charge_scheduled_at": "2021-12-17",
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": 30,
"order_interval_unit": "day",
"presentment_currency": "USD",
"price": "10.00",
"product_title": "ABC Shirt",
"properties": [
{
"name": "Color",
"value": "Blue"
},
{
"name": "Size",
"value": "Large"
}
],
"quantity": 1,
"sku": "TOM0001",
"sku_override": false,
"status": "active",
"updated_at": "2020-02-19T17:40:10+00:00",
"variant_title": "Blue star"
}
}#Retrieve a subscription
GET/subscriptions/{id}
Retrieve a subscription using the Recharge
subscription_id.Scope
read_subscriptionsQuery parameters
- A comma-separated list of related objects to return in the
includeattribute of theSubscription.address,customerandcustomer_entitlementsalso require theread_customersscope, andcharge_activitiesalso requires theread_ordersscope.addonsandexpires_atonly return data for stores with add-on subscriptions enabled.Possible valuesaddressaddonsbundle_productbundle_selectionscharge_activitiescustomercustomer_entitlementsexpires_atmetafields
curl 'https://api.rechargeapps.com/subscriptions/27363808' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"subscription": {
"id": 63898947,
"address_id": 48563471,
"customer_id": 37657002,
"analytics_data": {
"utm_params": {
"utm_source": "facebook",
"utm_medium": "cpc"
}
},
"cancellation_reason": null,
"cancellation_reason_comments": null,
"cancelled_at": null,
"charge_interval_frequency": 30,
"created_at": "2020-02-19T17:40:09+00:00",
"expire_after_specific_number_of_charges": null,
"external_product_id": {
"ecommerce": "4381728735283"
},
"external_variant_id": {
"ecommerce": "32165284380775"
},
"has_queued_charges": true,
"is_digital": false,
"is_prepaid": false,
"is_skippable": true,
"is_swappable": false,
"max_retries_reached": false,
"next_charge_scheduled_at": "2021-12-17",
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": 30,
"order_interval_unit": "day",
"presentment_currency": "USD",
"price": "10.00",
"product_title": "ABC Shirt",
"properties": [
{
"name": "Color",
"value": "Blue"
},
{
"name": "Size",
"value": "Large"
}
],
"quantity": 1,
"sku": "TOM0001",
"sku_override": false,
"status": "active",
"updated_at": "2020-02-19T17:40:10+00:00",
"variant_title": "Blue star"
}
}#Update a subscription
PUT/subscriptions/{id}
Update an existing subscription.
Scope
write_subscriptionsUpdating parameters like
When updating subscription
When updating
frequency, charge_interval_frequency, order_interval_frequency, order_interval_unit will cause our algorithm to automatically recalculate the next charge date (next_charge_scheduled_at). If you want to change the next charge date (next_charge_scheduled_at) we recommend you to update these parameters first. When updating subscription
status attribute from cancelled to active, following attributes will be set to null: cancelled_at, cancellation_reason and cancellation_reason_comments When updating
order_interval_unit OR order_interval_frequency OR charge_interval_frequency all three parameters are required.Query parameters
- commitbooleanControls whether the
QUEUEDcharges linked to the subscription should be regenerated upon subscription update. By default the flag is set tofalsewhich will delay charge regeneration 5 seconds. This enables running multiple calls to perform changes and receive responses much faster since the API won’t wait for a charge regeneration to complete. Setting this parameter totruewill cause charge regeneration to complete before returning a response. - force_updatebooleanIf set to
True, updates will also be applied toCANCELLEDsubscriptions. IfnullorFalse, onlyACTIVEsubscriptions will be updated.
Body parameters
- Unique numeric identifier of the
Addressto move theSubscriptionto. TheAddressmust belong to the sameCustomerand use the same currency as theSubscription. - An object used to contain analytics data such as utm parameters. The UTM parameters passed are added to the ones already stored on the
Subscription.Show child attributesHide child attributes18 new
- An array containing
utm_paramobjects.Show child attributesHide child attributes77 new
- The UTM campaign.
- The UTM content.
- The source of the campaign parameter. Required for each
utm_paramobject. - The UTM medium.
- The UTM source.
- The UTM term.
- The UTM timestamp. Required for each
utm_paramobject.
- Reason for cancellation. Can only be set when
statusis passed ascancelledorexpiredin the same request. - Additional comment for cancellation. Maximum length is 1024 characters. Can only be set when
statusis passed ascancelledorexpiredin the same request. - The time the subscription was cancelled. Can only be set when
statusis passed ascancelledorexpiredin the same request. - charge_interval_frequencyintegerThe number of units (specified in order_interval_unit) between each charge. Required when updating order_interval_unit.
WARNING: This update will remove skipped and manually changed charges. - A list of up to 10 custom key-value pairs to attach to the
Eventsgenerated by this request. They are returned in thecustom_attributesof thoseEvents. - The number of charges until subscription expires.
- An object containing the product id as it appears in external platforms.
Show child attributesHide child attributes11 new
- The product id as it appears in the external e-commerce platform.
- external_variant_idobjectUnique number identifier of the product variant in your external platform.
Show child attributesHide child attributes1
- ecommercestringThe variant id as it appears in the external e-commerce platform. The
external_variant_idof theProductrecord in Recharge, linking aPlanto aProduct.
- The date of the next charge for the
Subscription. It cannot be in the past. - order_day_of_monthintegerThe day of the month the order is created on.
WARNING: this update will remove skips and manually changed charges. - order_day_of_weekintegerThe day of the week the order is created on.
WARNING: this update will remove skips and manually changed charges. - order_interval_frequencyintegerThe number of units (specified in order_interval_unit) between each order. Required when updating order_interval_unit.
WARNING: This update will remove skipped and manually changed charges. - order_interval_unitstringThe frequency unit used to determine when a subscription order is created.
WARNING: This update will remove skipped and manually changed charges.Possible valuesdayweekmonth - If set to
true, allows interval changes that are otherwise rejected, such as changing the charge or order frequency of a prepaidSubscription, or changing aSubscriptionto a prepaid frequency. - plan_idintegerA Recharge Plan id that provides interval information. Automatically fills the following properties from the plan if they were not provided directly: charge_interval_frequency, expire_after_specific_number_of_charges, order_day_of_month, order_day_of_week, order_interval_frequency, order_interval_unit.
- The presentment currency of the
price. It must match the currency of theSubscription. Required whenpriceis provided and the currency of theSubscriptionis not the store's default currency. - pricestringThe price of the item before discounts, taxes, or shipping has been applied.
- Set to
trueto indicate that thepricein the request was explicitly chosen by the caller instead of being calculated by Recharge. - product_titlestringThe name of the product.
- propertiesarray of objectsA list of key/value pairs representing properties of the subscription.
- quantityintegerThe number of items in the subscription.
- skustringA unique identifier of the item in the fulfillment.
- sku_overridebooleanFlag is automatically updated to
truewhen SKU is passed on create or update. Whensku_overrideistrue, the SKU on the subscription will be used to generate charges and orders.
Whensku_overrideisfalse, Recharge will dynamically fetch the sku from the corresponding external platform variant. - The status of the
Subscription. When set tocancelledwithoutcancelled_at, the cancellation time is set to the current time.Possible valuesactivecancelledexpired - Flag instructing to pull the
pricefrom the product variant passed.You need to pass the variant_id underexternal_variant_id.ecommerceand set this attribute totruein the request for the flag to work. - variant_titlestringThe name of the product variant.
curl -X PUT 'https://api.rechargeapps.com/subscriptions/27363808' \
-H 'X-Recharge-Version: v2' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"quantity": 4
}'{
"subscription": {
"id": 63898947,
"address_id": 48563471,
"customer_id": 37657002,
"analytics_data": {
"utm_params": {
"utm_source": "facebook",
"utm_medium": "cpc"
}
},
"cancellation_reason": null,
"cancellation_reason_comments": null,
"cancelled_at": null,
"charge_interval_frequency": 30,
"created_at": "2020-02-19T17:40:09+00:00",
"expire_after_specific_number_of_charges": null,
"external_product_id": {
"ecommerce": "4381728735283"
},
"external_variant_id": {
"ecommerce": "32165284380775"
},
"has_queued_charges": true,
"is_digital": false,
"is_prepaid": false,
"is_skippable": true,
"is_swappable": false,
"max_retries_reached": false,
"next_charge_scheduled_at": "2021-12-17",
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": 30,
"order_interval_unit": "day",
"presentment_currency": "USD",
"price": "10.00",
"product_title": "ABC Shirt",
"properties": [
{
"name": "Color",
"value": "Blue"
},
{
"name": "Size",
"value": "Large"
}
],
"quantity": 1,
"sku": "TOM0001",
"sku_override": false,
"status": "active",
"updated_at": "2020-02-19T17:40:10+00:00",
"variant_title": "Blue star"
}
}#Delete a subscription
DELETE/subscriptions/{id}
We now have a feature for deleting a subscription.
Scope
write_subscriptionsQuery parameters
- If set to
true, theQUEUEDcharges linked to theSubscriptionare regenerated before the response is returned. If omitted orfalse, the charges are regenerated asynchronously.
Body parameters
- send_emailbooleanWhen your store setting indicates that cancellation emails should be sent, this value determines if the email should be sent for the specified subscription cancellation.If set to
true, cancellation emails will be sent for the specified subscription cancellations. If set tofalse, cancellation emails will not be sent.
curl -X DELETE 'https://api.rechargeapps.com/subscriptions/27363808' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{}#List subscriptions
GET/subscriptions
Returns a list of all your subscriptions.
HTTP request examples
GET /subscriptions GET /subscriptions?created_at_min=2018-10-10&created_at_max=2019-10-16 GET /subscriptions?customer_id=<customer_id>Scope
read_subscriptionsWhen
cursor is passed, limit is the only other query parameter that can be passed with it.Query parameters
- address_idstringReturn the subscriptions linked to the given
address_id.Not compatible withaddress_ids. - address_idsstringReturn the subscriptions linked to the given
address_ids.Accepts a comma separated list of address_ids as value.
Not compatible withaddress_id - If
true, only return the subscriptions whose product variant belongs to an active, published bundle product. Onlytrueis accepted; omit the parameter to list all subscriptions. - created_at_maxstringReturn the subscriptions created before the given date.
- created_at_minstringReturn the subscriptions created after the given date.
- cursorstringReturn either the next or previous page of subscriptions using
next_cursororprevious_cursorattributes in the response. - customer_idstringReturn the subscriptions linked to the given Recharge customer id.
- Return the subscriptions linked to the customer with the given id in the external e-commerce platform.
- external_variant_idstringReturn the subscriptions linked to the given external_variant_id
- idsstringComma-separated list of
subscription_idsto filter - A comma-separated list of related objects to return in the
includeattribute of theSubscriptions.address,customerandcustomer_entitlementsalso require theread_customersscope, andcharge_activitiesalso requires theread_ordersscope.addonsandexpires_atonly return data for stores with add-on subscriptions enabled.Possible valuesaddressaddonsbundle_productbundle_selectionscharge_activitiescustomercustomer_entitlementsexpires_atmetafields - If
true, the response also contains anonetimesarray with theOnetimesmatching the same filters. Only applied whenaddress_id,customer_idorexternal_customer_idis also passed.Only available for stores that have the option to include onetimes in the subscriptions list enabled. - limitstringThe number of results.
- The page to show.Page-based pagination has been deprecated but still available to use for pages up to a 100. If you need data past this point, use cursor pagination.
- Sort the results by the given attribute and direction. Defaults to
id-desc.Possible valuesid-ascid-desccreated_at-asccreated_at-descupdated_at-ascupdated_at-desc - statusstringReturn the subscriptions with specified status.Possible values
activecancelledexpired - updated_at_maxstringReturn the subscriptions updated before the given date.
- updated_at_minstringReturn the subscriptions updated after the given date.
curl 'https://api.rechargeapps.com/subscriptions?limit=3' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"next_cursor": "next_cursor",
"previous_cursor": "previous_cursor",
"subscriptions": [
{
"id": 63898947,
"address_id": 42171447,
"customer_id": 37657002,
"analytics_data": {
"utm_params": {
"utm_source": "facebook",
"utm_medium": "cpc"
}
},
"cancellation_reason": null,
"cancellation_reason_comments": null,
"cancelled_at": null,
"charge_interval_frequency": 1,
"created_at": "2020-02-19T17:40:09+00:00",
"expire_after_specific_number_of_charges": 5,
"external_product_id": {
"ecommerce": "4381728735283"
},
"external_variant_id": {
"ecommerce": "32165284380775"
},
"has_queued_charges": false,
"is_digital": false,
"is_prepaid": false,
"is_skippable": true,
"is_swappable": false,
"max_retries_reached": false,
"next_charge_scheduled_at": "2021-12-17",
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": 1,
"order_interval_unit": "month",
"presentment_currency": "USD",
"price": "10.00",
"product_title": "ABC Shirt",
"properties": [
{
"name": "Color",
"value": "Blue"
},
{
"name": "Size",
"value": "Large"
}
],
"quantity": 1,
"sku": "TOM0001",
"sku_override": false,
"status": "active",
"updated_at": "2020-02-19T17:40:10+00:00",
"variant_title": "Blue star"
}
]
}#Change a subscription next charge date
POST/subscriptions/{id}/set_next_charge_date
Update an existing subscription’s next charge date.
Scope
write_subscriptionsIf there are two active subscriptions with the same
address_id, and you update their next_charge_date parameters to match, their charges will get merged into a new charge with a new idQuery parameters
- If set to
true, theQUEUEDcharges linked to theSubscriptionare regenerated before the response is returned. If omitted orfalse, the charges are regenerated asynchronously. - If
true, the date change is also recorded as a pause of theSubscriptionand thesubscription/pausedwebhook is sent.
Body parameters
- The next charge date desired.
- A list of up to 10 custom key-value pairs to attach to the
Eventsgenerated by this request. They are returned in thecustom_attributesof thoseEvents.
curl -X POST 'https://api.rechargeapps.com/subscriptions/27363808/set_next_charge_date' \
-H 'X-Recharge-Version: v2' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"date": "2021-08-05"
}'{
"subscription": {
"id": 27363808,
"address_id": 42171447,
"customer_id": 37657002,
"analytics_data": {
"utm_params": {
"utm_source": "facebook",
"utm_medium": "cpc"
}
},
"cancellation_reason": null,
"cancellation_reason_comments": null,
"cancelled_at": null,
"charge_interval_frequency": 1,
"created_at": "2020-02-19T17:40:09+00:00",
"expire_after_specific_number_of_charges": null,
"external_product_id": {
"ecommerce": "4381728735283"
},
"external_variant_id": {
"ecommerce": "32309455192167"
},
"has_queued_charges": true,
"is_digital": false,
"is_prepaid": false,
"is_skippable": true,
"is_swappable": false,
"max_retries_reached": false,
"next_charge_scheduled_at": "2021-08-05",
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": 1,
"order_interval_unit": "month",
"presentment_currency": "USD",
"price": "10.00",
"product_title": "ABC Shirt",
"properties": [
{
"name": "Color",
"value": "Blue"
},
{
"name": "Size",
"value": "Large"
}
],
"quantity": 1,
"sku": "TOM0001",
"sku_override": false,
"status": "active",
"updated_at": "2020-02-19T17:40:10+00:00",
"variant_title": "Blue star"
}
}#Change a subscription address
POST/subscriptions/{id}/change_address
Update an existing subscription’s address.
Scope
write_subscriptionsBody parameters
- Unique id of the address that need to be associated with subscription.
- next_charge_scheduled_atstringThe next charge date desired.
curl -X POST 'https://api.rechargeapps.com/subscriptions/27363808/change_address' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token' \
-H 'Content-Type: application/json' \
-d '{
"address_id": 23397943
}'{
"subscription": {
"id": 27363808,
"address_id": 42171447,
"customer_id": 37657002,
"analytics_data": {
"utm_params": {
"utm_source": "facebook",
"utm_medium": "cpc"
}
},
"cancellation_reason": null,
"cancellation_reason_comments": null,
"cancelled_at": null,
"charge_interval_frequency": 1,
"created_at": "2020-02-19T17:40:09+00:00",
"expire_after_specific_number_of_charges": null,
"external_product_id": {
"ecommerce": "4381728735283"
},
"external_variant_id": {
"ecommerce": "32309455192167"
},
"has_queued_charges": true,
"is_digital": false,
"is_prepaid": false,
"is_skippable": true,
"is_swappable": false,
"max_retries_reached": false,
"next_charge_scheduled_at": "2021-08-05",
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": 1,
"order_interval_unit": "month",
"presentment_currency": "USD",
"price": "10.00",
"product_title": "ABC Shirt",
"properties": [
{
"name": "Color",
"value": "Blue"
},
{
"name": "Size",
"value": "Large"
}
],
"quantity": 1,
"sku": "TOM0001",
"sku_override": false,
"status": "active",
"updated_at": "2020-02-19T17:40:10+00:00",
"variant_title": "Blue star"
}
}#Cancel a subscription
POST/subscriptions/{id}/cancel
Cancel an active subscription.
Scope
write_subscriptionsAn involuntary subscription cancelled due to max retries reached will trigger the charge/max_retries_reached webhook.
Query parameters
- If set to
true, theQUEUEDcharges linked to theSubscriptionare regenerated before the response is returned. If omitted orfalse, the charges are regenerated asynchronously.
Body parameters
- cancellation_reasonstringReason for subscription cancellation.
- Cancellation reason comment. Maximum length is 1024 characters.
- send_emailbooleanIf set to
false, subscription cancelled email will not be sent to customer and store owner. Note: even if set to True, there are some conditions where an email will not be sent. They are: inactive subscription_cancellation email template, customer or subscription was created on the same day, subscription is for a membership, email already sent for this subscription in the last 24 hours, customer has other active subscriptions or onetimes - If set to
true, the cancellation reason and comments can be replaced on aSubscriptionthat was already cancelled after reaching the maximum number of charge attempts.
curl -X POST 'https://api.rechargeapps.com/subscriptions/27363808/cancel' \
-H 'X-Recharge-Version: v2' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"cancellation_reason": "other reason"
}'{
"subscription": {
"id": 27363808,
"address_id": 42171447,
"customer_id": 37657002,
"analytics_data": {
"utm_params": {
"utm_source": "facebook",
"utm_medium": "cpc"
}
},
"cancellation_reason": null,
"cancellation_reason_comments": null,
"cancelled_at": null,
"charge_interval_frequency": 1,
"created_at": "2020-02-19T17:40:09+00:00",
"expire_after_specific_number_of_charges": null,
"external_product_id": {
"ecommerce": "4381728735283"
},
"external_variant_id": {
"ecommerce": "32309455192167"
},
"has_queued_charges": true,
"is_digital": false,
"is_prepaid": false,
"is_skippable": true,
"is_swappable": false,
"max_retries_reached": false,
"next_charge_scheduled_at": "2021-08-05",
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": 1,
"order_interval_unit": "month",
"presentment_currency": "USD",
"price": "10.00",
"product_title": "ABC Shirt",
"properties": [
{
"name": "Color",
"value": "Blue"
},
{
"name": "Size",
"value": "Large"
}
],
"quantity": 1,
"sku": "TOM0001",
"sku_override": false,
"status": "active",
"updated_at": "2020-02-19T17:40:10+00:00",
"variant_title": "Blue star"
}
}#Activate a subscription
POST/subscriptions/{id}/activate
Activate a cancelled subscription.
Scope
write_subscriptionsWhen activating subscription, following attributes will be set to null:
cancelled_at, cancellation_reason and cancellation_reason_comments.Query parameters
- If set to
true, theQUEUEDcharges linked to theSubscriptionare regenerated before the response is returned. If omitted orfalse, the charges are regenerated asynchronously.
Body parameters
- A list of up to 10 custom key-value pairs to attach to the
Eventsgenerated by this request. They are returned in thecustom_attributesof thoseEvents.
curl -X POST 'https://api.rechargeapps.com/subscriptions/27363808/activate' \
-H 'X-Recharge-Version: v2' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{}'{
"subscription": {
"id": 27363808,
"address_id": 42171447,
"customer_id": 37657002,
"analytics_data": {
"utm_params": {
"utm_source": "facebook",
"utm_medium": "cpc"
}
},
"cancellation_reason": null,
"cancellation_reason_comments": null,
"cancelled_at": null,
"charge_interval_frequency": 1,
"created_at": "2020-02-19T17:40:09+00:00",
"expire_after_specific_number_of_charges": null,
"external_product_id": {
"ecommerce": "4381728735283"
},
"external_variant_id": {
"ecommerce": "32309455192167"
},
"has_queued_charges": true,
"is_digital": false,
"is_prepaid": false,
"is_skippable": true,
"is_swappable": false,
"max_retries_reached": false,
"next_charge_scheduled_at": "2021-08-05",
"order_day_of_month": null,
"order_day_of_week": null,
"order_interval_frequency": 1,
"order_interval_unit": "month",
"presentment_currency": "USD",
"price": "10.00",
"product_title": "ABC Shirt",
"properties": [
{
"name": "Color",
"value": "Blue"
},
{
"name": "Size",
"value": "Large"
}
],
"quantity": 1,
"sku": "TOM0001",
"sku_override": false,
"status": "active",
"updated_at": "2020-02-19T17:40:10+00:00",
"variant_title": "Blue star"
}
}#Gift a skipped subscription
POST/subscriptions/skip_gift
Gift a skipped
Subscription to a recipient.Scope
write_subscriptionsOnly available for stores that have gifting of skipped shipments enabled; other stores receive a 401 error. The response contains the
Onetimes created for the recipient in an onetimes array.Body parameters
- A list containing the
SubscriptionIDs to be skipped. - An object that contains information associated with the giftee's Address
Show child attributesHide child attributes11
- The street associated with the giftee
Address. - address2stringAny additional information associated with the giftee
Address. - The city associated with the giftee address.
- companystringThe company associated with the giftee address.
- 2-letter country code.
- The giftee's first name associated with the address.
- The giftee's last name associated with the address.
- phonestringThe giftee's phone number associated with the address.
- The state or province associated with the giftee address.
- The zip or postal code associated with the giftee address.
- Email address for the giftee.will be required for sending the notification to the giftee.
Response attributes
- idintegerUnique numeric identifier for the
Onetimepurchase. - address_idintegerUnique numeric identifier for the address the
OnetimePurchase is associated with (cannot be used withnext_charge_scheduled_at) - created_atdatetimeThe time the
Onetimeitem was first created. - customer_idintegerUnique numeric identifier for the customer the
Onetimepurchase is tied to. - external_product_idstringAn object containing the product id as it appears in external platforms.
Show child attributesHide child attributes1
- ecommercestringThe product id as it appears in the external e-commerce platform. The
external_product_idof theProductrecord in Recharge, linking aPlanto aProduct.
- external_variant_idstringAn object containing the variant id as it appears in external platforms.
Show child attributesHide child attributes1
- ecommercestringThe variant id as it appears in the external e-commerce platform. The
external_variant_idof theProductrecord in Recharge, linking aPlanto aProduct.
- is_cancelledbooleanFlag indicating if the the onetime is cancelled.
- next_charge_scheduled_atdatetimeDate of the
Onetimepurchase execution.Cannot be used withadd_to_next_charge - pricestringThe price of the item before discounts, taxes, or shipping have been applied.
- product_titlestringThe name of the product in a shop’s catalog.
- propertiesarray of objectsAn array containing key value pairs for any supplementary data.
- quantityintegerThe number of items in the
Onetimepurchase. - skustringA unique identifier of the item in the fulfillment.
- sku_overridebooleanFlag that is automatically updated to
truewhen SKU is passed onPOSTorPUT.Whensku_overrideistrue, theskuon theOnetimewill be used to generateChargesandOrders.
Whensku_overrideisfalse, Recharge will dynamically fetch theskufrom the correspondingexternal_platform_variant. - updated_atstringThe time the
Onetimepurchase was last updated. - variant_titlestringThe name of the variant in a shop’s catalog.
curl -X POST 'https://api.rechargeapps.com/subscriptions/skip_gift' \
-H 'X-Recharge-Version: v2' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"recipient_address": {
"address1": "1776 Washington Street",
"address2": "",
"city": "Los Angeles",
"company": "Recharge",
"country_code": "US",
"first_name": "John",
"last_name": "Doe",
"phone": "5551234567",
"province": "California",
"zip": "90404",
"email": "fake@example.com"
},
"purchase_item_ids": [
27363808,
27363809
]
}'{
"onetimes": [
{
"id": 16909886,
"address_id": 45154492,
"created_at": "2021-05-24T19:14:25+00:00",
"customer_id": 40565990,
"external_product_id": {
"ecommerce": "4950280863846"
},
"external_variant_id": {
"ecommerce": "32139793137766"
},
"is_cancelled": false,
"is_digital": false,
"next_charge_scheduled_at": "2021-12-17T05:00:00+00:00",
"price": "6.00",
"product_title": "ABC Shirt",
"properties": [
{
"name": "Color",
"value": "Blue"
}
],
"quantity": 1,
"sku": "TOM0001",
"sku_override": false,
"updated_at": "2021-05-24T19:30:14+00:00",
"variant_title": "Blue star"
}
]
}#Skip a future charge for a subscriptionNew
POST/subscriptions/{id}/charges/skip
Skip an upcoming charge date of a
Subscription for which no Charge exists yet. A Charge with the status skipped is created for the date, or the Subscription is added to a Charge that is already skipped on that date. If a Charge containing the Subscription already exists on the date, use the skip a charge endpoint instead.Scope
write_ordersBody parameters
- The date of the upcoming charge to skip. It must be at least one day in the future, match a date in the customer's upcoming delivery schedule, and be within the number of days the store allows charges to be skipped in advance (90 by default).
curl -X POST 'https://api.rechargeapps.com/subscriptions/129593/charges/skip' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"charge": {
"id": 880000001,
"address_id": 120000001,
"status": "skipped",
"type": "recurring",
"scheduled_at": "2027-01-15"
}
}#Preview skipping the next charge of a subscriptionNew
GET/subscriptions/{id}/charges/skip/preview
Retrieve the date of the next charge of a
Subscription and the date its following charge would be scheduled on if the next charge were skipped. Nothing is changed by this request. A 400 error is returned when the Subscription has no upcoming charge.Scope
read_subscriptionscurl 'https://api.rechargeapps.com/subscriptions/129593/charges/skip/preview' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"subscription_id": 510000001,
"current_next_charge_date": "2027-01-15",
"expected_next_charge_date": "2027-02-15"
}#Bulk change subscription addressesNew
POST/addresses/{address_id}/subscriptions-bulk-change-address
Move several
Subscriptions from the Address in the path to other addresses of the same Customer in one request. Every Subscription must currently belong to the Address in the path, and each destination Address must use the same currency.Scope
write_subscriptionsQuery parameters
- commitbooleanIf set to
true, theQUEUEDcharges linked to theSubscriptionare regenerated before the response is returned. If omitted orfalse, the charges are regenerated asynchronously.
Body parameters
- The list of subscriptions to move.
Show child attributesHide child attributes3
- Unique numeric identifier of the
Subscriptionto move. - Unique numeric identifier of the
AddresstheSubscriptionis moved to. - next_charge_scheduled_atdatetimeThe next charge date desired for the
Subscriptionon the newAddress. It must be in the future.
curl -X POST 'https://api.rechargeapps.com/addresses/191897/subscriptions-bulk-change-address' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"subscriptions": [
{
"id": 510000001,
"address_id": 120000002,
"customer_id": 90000001,
"status": "active",
"next_charge_scheduled_at": "2027-01-15"
}
]
}#Update a bundle subscription and its contentsNew
PUT/bundles/{purchase_item_id}
Update a
Subscription or Onetime for a bundle product and the contents of its BundleSelection in a single request. The request accepts the same body parameters as the update a subscription endpoint, plus items. It can only be used when the current or the new product is a bundle product, and only for items with the status active or onetime.Scope
write_subscriptionsQuery parameters
- commitbooleanIf set to
true, theQUEUEDcharges linked to theSubscriptionare regenerated before the response is returned. If omitted orfalse, the charges are regenerated asynchronously.
Body parameters
- external_product_idobjectAn object containing the product id as it appears in external platforms.
Show child attributesHide child attributes1
- ecommercestringThe product id as it appears in the external e-commerce platform.
- external_variant_idobjectAn object containing the variant id as it appears in external platforms.
Show child attributesHide child attributes1
- ecommercestringThe variant id as it appears in the external e-commerce platform.
- itemsarray of objectsThe list of items that make up the contents of the bundle.
Show child attributesHide child attributes5
- The id of the collection the item belongs to.
- The product id of the item as it appears in the external e-commerce platform.
- The variant id of the item as it appears in the external e-commerce platform.
- pricestringThe price of the item. It cannot be negative.
- The quantity of the item.
- plan_idintegerA Recharge
Planid that provides interval information for theSubscription.
curl -X PUT 'https://api.rechargeapps.com/bundles/241376' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"subscription": {
"id": 510000001,
"address_id": 120000001,
"customer_id": 90000001,
"status": "active",
"quantity": 1,
"price": "45.00",
"items": [
{
"id": 7700001,
"collection_id": "400000000001",
"external_product_id": "8000000000001",
"external_variant_id": "44000000000001",
"quantity": 2,
"price": "0.00"
}
]
}
}