CORE CONCEPTS
Subscription Lifecycle
Understand how subscriptions are created, billed, paused, resumed, changed, and cancelled in Sobtra.
How subscriptions work
A subscription connects a customer to a plan and price. It tracks the subscription's status, billing period, and relevant lifecycle dates.
Customer
Identifies the person or business subscribing to your service.
Plan and price
Define the selected subscription offering and its billing terms.
Billing period
Tracks the current period and relevant billing dates.
Status
Indicates the subscription's current lifecycle state.
Lifecycle operations
Create
Create a subscription using a customer, plan, price, and billing-period information.
Pause
Pause an eligible subscription according to the backend's supported rules.
Resume
Resume a paused subscription.
Cancel
Cancel a subscription immediately or according to the supported cancellation behavior.
Reactivate
Reactivate a subscription when its current state allows it.
Renew
Renew an eligible subscription.
Change plan
Change the subscription's price immediately or at the end of its billing period where supported.
Expire
Expire an eligible subscription.
Trials
Subscriptions may have trial dates. A subscription can enter a trialing state when a trial is configured. Sobtra also exposes operations for starting and ending a trial where supported.
Billing and invoices
The subscription lifecycle is connected to invoice generation and payment processing. When billing is due, Sobtra's billing workflow can generate an invoice and attempt payment through the selected gateway.
- Invoices record the amount due for a billing event.
- Payments track payment attempts and their outcomes.
- A failed payment may require recovery or further customer action.
- The subscription's resulting status depends on the operation and billing outcome.
Changing plans
Sobtra exposes a change-plan operation with an effective option that can be immediate or at the end of the billing period. The precise billing result depends on the selected option and backend rules.
Recommended integration behavior
- Store the subscription ID returned by Sobtra.
- Use the API to retrieve current subscription state when needed.
- Process relevant events and update your application's access rules.
- Make subscription-related operations resilient to retries.
- Test cancellation, trial expiration, failed billing, and plan changes before going live.