Core Concepts
Subscriptions
Manage recurring billing relationships between customers and plans.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Manage recurring billing relationships between customers and plans.
| Field | Description |
|---|---|
code | Public subscription code, such as SUB_a1b2c3d4. |
customerId | Customer being billed. |
planId | Plan used for billing. |
paymentSourceId | Saved payment source, when available. |
amount | Subscription amount in minor units. |
currency | Subscription currency. |
interval | Billing interval. |
trialStartDate | Trial start date, if the plan has a trial. |
trialEndDate | Trial end date, if the plan has a trial. |
currentBillingCycleStart | Current billing period start. |
currentBillingCycleEnd | Current billing period end. |
status | Subscription lifecycle status. |
curl -X POST https://api.example.com/v1/subscription/ \
-H "Content-Type: application/json" \
-H "X-Api-Key: sub_xxx" \
-d '{
"customerEmailOrCode": "customer@example.com",
"planCode": "PLN_8AbC123x"
}'