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.
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.GetActiveSubscriptions(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 }})
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.