Documentation Index Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
Use this file to discover all available pages before exploring further.
Creates a new subscription for an existing customer.
Mutation
Mutation
Variables
Response
mutation ProvisionSubscription ( $input : ProvisionSubscriptionInput ! ) {
provisionSubscriptionV2 ( input : $input ) {
subscription {
subscriptionId
status
startDate
currentBillingPeriodEnd
plan {
refId
displayName
}
addons {
addon {
refId
displayName
}
quantity
}
prices {
billingPeriod
price {
amount
currency
}
}
trialEndDate
}
entitlements {
feature {
refId
displayName
}
isGranted
usageLimit
hasUnlimitedUsage
}
}
}
Parameters
input
ProvisionSubscriptionInput
required
Input for provisioning a subscription Plan reference ID to subscribe to
Resource ID for multi-resource subscriptions
Addons to include in subscription When subscription should start (defaults to now)
trialOverrideConfiguration
TrialOverrideConfigurationInput
Trial period override configuration Whether to apply a trial period
Specific date when the trial ends
Behavior when trial ends: CANCEL_SUBSCRIPTION or CONVERT_TO_PAID
Coupon to apply to the subscription Initial quantities for pay-per-unit features
entitlements
[SubscriptionEntitlementInputV2]
Entitlements to provision with the subscription (for custom plans). Supports both feature and credit entitlements. feature
SubscriptionFeatureEntitlementInput
Feature entitlement configuration. Common fields shown below — see the full type reference for all available fields. Usage limit for the feature
Whether the feature has unlimited usage
credit
SubscriptionCreditEntitlementInput
Credit entitlement configuration Credit type reference ID (e.g. "currency-api-credits")
Number of credits to grant per cadence
Credit renewal cadence: MONTH or YEAR
Wait for payment before activating
Return Type
Returns a ProvisionSubscriptionResult with:
Field Type Description subscriptionCustomerSubscription The created subscription entitlements[Entitlement] Resulting entitlements
Examples
With Trial Period
{
"input" : {
"customerId" : "customer-123" ,
"planId" : "plan-pro" ,
"trialOverrideConfiguration" : {
"isTrial" : true ,
"trialEndBehavior" : "CONVERT_TO_PAID"
}
}
}
With Addons
{
"input" : {
"customerId" : "customer-123" ,
"planId" : "plan-pro" ,
"billingPeriod" : "ANNUAL" ,
"addons" : [
{ "addonId" : "addon-seats" , "quantity" : 10 },
{ "addonId" : "addon-storage" , "quantity" : 2 }
]
}
}
Scheduled Start
{
"input" : {
"customerId" : "customer-123" ,
"planId" : "plan-enterprise" ,
"startDate" : "2024-02-01T00:00:00Z"
}
}
Custom Plan with Entitlements
Custom plans use the entitlements field to define what the subscription grants — this can include feature entitlements (access flags, usage limits) and credit entitlements (recurring credit allocations).
{
"input" : {
"customerId" : "customer-123" ,
"planId" : "plan-enterprise-custom" ,
"entitlements" : [
{
"feature" : {
"featureId" : "feature-seats" ,
"usageLimit" : 50
}
},
{
"feature" : {
"featureId" : "feature-sso" ,
"hasUnlimitedUsage" : true
}
},
{
"credit" : {
"customCurrencyId" : "currency-api-credits" ,
"amount" : 100000 ,
"cadence" : "MONTH"
}
}
]
}
}
Common Use Cases
Create paid subscription for customer on free plan.
Multi-product subscription
Add subscription to additional product for existing customer.
Provision paid subscription when trial customer converts.