Subscriptions are created automatically when a customer completes a checkout for aDocumentation Index
Fetch the complete documentation index at: https://docs.stellartools.dev/llms.txt
Use this file to discover all available pages before exploring further.
subscription product. Use these endpoints to retrieve, update, pause, resume, or cancel them.
The subscription object
Unique identifier. Prefixed with
sub_.Always
"subscription".The customer this subscription belongs to.
The product being subscribed to.
One of
trialing, active, past_due, paused, or canceled.ISO 8601 timestamp. Start of the current billing period.
ISO 8601 timestamp. End of the current billing period.
If
true, the subscription will cancel at the end of the current period rather than renewing.ISO 8601 timestamp. Set when the subscription is canceled.
ISO 8601 timestamp. Set when the subscription is paused.
Number of trial days, if any.
Number of consecutive failed renewal attempts.
Arbitrary key-value data.
ISO 8601 timestamp.
ISO 8601 timestamp.
List subscriptions
GET /subscriptions?customer_id={customer_id}
Returns all subscriptions for a customer.
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
Set to
true to schedule cancellation at the end of the current period.Merged with existing metadata.
Swap to a different product.
Cancel a subscription
POST /subscriptions/{id}/cancel
Cancels immediately on-chain and sets cancel_at_period_end to true.
{ "success": true }.
Pause a subscription
POST /subscriptions/{id}/pause
Resume a subscription
POST /subscriptions/{id}/resume

