Deprecation Notice: /products v.2021-01
Recharge plans to deprecate the /products
endpoint (v.2021-01) by June 30, 2025. It is recommended to use the /plans
endpoint (v.2021-11) instead to achieve equivalent functionality and take advantage of improved flexibility.
Platform
- Shopify Checkout Integration
- Migrated Shopify Checkout Integration
- BigCommerce Checkout Integration
- Custom
Benefits of using /2021-11/plans
/2021-11/plans
The /plans
endpoint decouples product setup from subscription logic, allowing you to create more robust and flexible plans.
Benefits include:
- Support for multiple discount types
- Ability to set different frequency units
- Plan creation and updates through dedicated endpoints
- Bulk operations for plan management
Replace /products
calls with /plans
/products
calls with /plans
Use the following replacements when migrating to /plans
:
Action | Old endpoint | New endpoint |
---|---|---|
Create a plan | POST /2021-01/products | POST /2021-11/plans See Create a plan for more information. |
Update a plan | PUT /2021-01/products/{id} | PUT /2021-11/plans/{id} See Update a plan for more information. |
Bulk create plans | Not available | POST /2021-11/plans/bulk_create See Bulk create plans for more information. |
Bulk update plans | Not available | PUT /2021-11/plans/bulk_update See Bulk update plans for more information. |
Check if a product supports subscriptions or onetime purchases
To check purchase options using /plans, send a request with the external product ID:
GET /2021-11/plans?external_product_id={product_id}
Review the "type" field in each plan object. Values include:
- onetime
- subscription
Example response
{
"plans": [
{
"id": 15417753,
"title": "2 month subscription with 30% discount",
"type": "subscription"
},
{
"id": 15417752,
"title": "1 month subscription with 10% discount",
"type": "subscription"
},
{
"id": 15415637,
"title": "Sauce",
"type": "onetime"
}
]
}
Updated 2 days ago