Search Documentation
Search for a documentation page...
Subscription Plans API
REST API endpoints for managing recurring purchase plans.
Subscription plans let customers buy products on a recurring schedule at a discount. A plan's billing frequency is cadence (month or week) multiplied by interval (e.g. cadence month × interval 3 = every quarter). discountPercent is the discount applied versus a one-time purchase. Each plan can be assigned to a set of products that customers may subscribe to.
List Subscription Plans
Returns subscription plans ordered by position. Each plan includes the IDs of products it's assigned to.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 50 | Plans per page (1-100) |
offset | number | 0 | Plans to skip |
query | string | — | Search term for plan name |
active | boolean | — | Filter by active status |
Response (200)
Get Subscription Plan
Returns a single subscription plan by UUID, including assigned product IDs.
Response (200)
Create Subscription Plan
Creates a recurring purchase plan. Assign products by passing their UUIDs in products.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Plan display name, e.g. "Monthly delivery" |
cadence | string | Yes | Billing cadence unit: month or week |
interval | number | No | Number of cadence units between charges (default: 1) |
discountPercent | number | No | Percentage discount vs. one-time purchase (0-100) |
description | string | No | Optional plan description |
benefits | string | No | Optional plan benefits text |
position | number | No | Sort order (lower shows first) |
active | boolean | No | Whether the plan is selectable (default: true) |
products | string[] | No | Product UUIDs offered on this plan (replaces the existing set) |
Response (201)
Returns the created subscription plan (same shape as Get Subscription Plan).
Update Subscription Plan
Partially updates a subscription plan. Only provided fields change. Passing products replaces the entire assigned product set.
Request Body
All fields from Create Subscription Plan are accepted and optional.
Response (200)
Returns the updated subscription plan.
Delete Subscription Plan
Hard-deletes the subscription plan by UUID.