subscription product. Use these endpoints to retrieve, update, pause, resume, or cancel them.
The subscription object
string
Unique identifier. Prefixed with
sub_.string
Always
"subscription".string
The customer this subscription belongs to.
string
The product being subscribed to.
string
One of
trialing, active, past_due, paused canceled, or overdue.string
ISO 8601 timestamp. Start of the current billing period.
string
ISO 8601 timestamp. End of the current billing period.
boolean
If
true, the subscription will cancel at the end of the current period rather than renewing.string
ISO 8601 timestamp. Set when the subscription is canceled.
string
ISO 8601 timestamp. Set when the subscription is paused.
number
Number of trial days, if any.
number
Number of consecutive failed renewal attempts.
object
Arbitrary key-value data.
string
ISO 8601 timestamp.
string
ISO 8601 timestamp.
string
Invoice URL to send to your customer once the status is
overdueList subscriptions
GET /subscriptions?customer_id={customer_id}
Returns all subscriptions for a customer.
string
required
The customer whose subscriptions to list.
Retrieve a subscription
GET /subscriptions/{id}
Fetches the subscription and syncs its status with the Stellar network before returning.
related_resources (the product and asset) and last_attempt (the most recent payment).
Update a subscription
PUT /subscriptions/{id}
Body
boolean
Set to
true to schedule cancellation at the end of the current period, or false to undo a scheduled cancellation.object
Merged with existing metadata.
string
Swap to a different product.
Cancel a subscription
POST /subscriptions/{id}/cancel
Schedules the subscription to cancel at the end of the current billing period. The customer keeps access until current_period_end; no further renewals are charged. On-chain cancellation happens automatically when the period ends.
cancel_at_period_end: true and status still active.
To undo a scheduled cancellation before the period ends, use PUT /subscriptions/{id} with { "cancel_at_period_end": false }.
Pause a subscription
POST /subscriptions/{id}/pause
Resume a subscription
POST /subscriptions/{id}/resume

