Methods
| Method | Description |
|---|---|
subscribe(request) | Subscribe a customer to a plan |
cancel(subscriptionId) | Cancel an active subscription |
list(query?) | List subscriptions with optional filters |
get(subscriptionId) | Get a subscription by ID |
pay(subscriptionId, request) | Make a payment on a subscription |
Subscribe
Subscribe request fields
| Field | Type | Required | Description |
|---|---|---|---|
plan_id | string | Yes | The plan to subscribe to |
customer_id | string | Yes | The customer subscribing |
payment_method_id | string | Yes | Payment method for billing |
Cancel a subscription
List subscriptions
Get a subscription
Pay a subscription
Manually trigger a payment on a subscription (e.g., for retry after a failed automatic payment):Subscription statuses
Subscriptions move through several statuses during their lifecycle, including active, paused, cancelled, and expired states.Response data
| Field | Type | Description |
|---|---|---|
id | string | Subscription ID |
plan_id | string | Associated plan ID |
customer_id | string | Subscribing customer ID |
status | Status | Current subscription status |
payment_method_id | string | Payment method used |
next_billing_date | string | Next billing date |
created_at | string | ISO timestamp |
updated_at | string | ISO timestamp |