Provision, update, cancel, list, and migrate subscriptions using Stigg backend SDKs.
Subscription management
Provisioning subscriptions
When a customer subscribes to a new plan (upgrade, downgrade, or initial subscription), a subscription needs to be provisioned in Stigg.You provide the customer ID and target plan ID. For paid subscriptions, the billing period (monthly or annually) is required. Additional optional parameters include:
A customer can have both a non-trial and a trial subscription to different plans of the same product in parallel.
When a customer with a trial subscription for plan X creates a new subscription for the same plan, it will be created as a non-trial (paid) subscription.
When a customer already has an active subscription for a product and a new one is created, the existing subscription is automatically cancelled.
You can explicitly skip the trial period by providing a skip-trial flag.
Updating subscriptions
Update an existing subscription without creating a new one, keeping the original start date and billing cycle. You can:
Update subscription metadata
Update unit quantity for per-unit pricing (e.g., adding or removing seats)
Add or remove add-ons (only if compatible with the plan)
Update the promotion code
Update the billing period
When integrated with a billing solution, modifying quantities or add-ons generates a prorated invoice.
Cancel all scheduled updates or pending payment updates for a given subscription.
await stiggClient.cancelSubscriptionScheduledUpdates({ subscriptionId: 'subscription-plan-essentials', status: SubscriptionScheduleStatus.Scheduled, // or SubscriptionScheduleStatus.PendingPayment});
Listing active subscriptions
Retrieve a list of a customer’s active subscriptions. For products that support multiple active subscriptions, pass one or more resource IDs to filter by resource.
const subscriptions = await stiggClient.getActiveSubscriptionsList({ customerId: 'customer-demo-01', resourceId: 'resource-01', // optional, pass it to get subscription of specific resource});
data = await client.get_active_subscriptions_list(GetActiveSubscriptionsInput( **{ "customerId": "customer-demo-01", "resourceId": "resource-01", # optional, pass it to get subscription of specific resource }))
result, err := client.GetActiveSubscriptionsList(context.Background(), stigg.GetActiveSubscriptionsInput{ CustomerID: "customer-demo-01", ResourceID: Ptr("resource-01"), // optional, pass it to get subscription of specific resource})
resp = client.request(Stigg::Query::GetActiveSubscriptionsList, { "input": { "customerId": "customer-demo-01", "resourceId": "resource-01", # optional, pass it to get subscription of specific resource }})
var resp = stigg.query( GetSubscriptionQuery.builder() .input(GetSubscriptionInput.builder() .subscriptionId("subscription-01") .build()) .build());
var res = await stigg.GetSubscription.ExecuteAsync(new GetSubscriptionInput(){ SubscriptionId = "subscription-01",});
Listing subscriptions with filtering
Query subscriptions with rich filtering, sorting, and cursor-based pagination. Useful for admin dashboards, audits, and reporting.Supported filter operators include equality, inequality, inclusion, and exclusion for strings and enums, as well as comparison operators for dates. Filters support logical AND/OR composition.Sortable fields include creation date, customer ID, environment ID, product ID, resource ID, and status.