Apply subscription changes for a customer Update\Provision a subscription for a customer according to the given subscription input
Create a Subscription
Canceled subscription. Throw exception on errors.
Cancel a subscription scheduled updates
The subscription id
Discards all network connections, background tasks, and other resources held by the client.
Do not attempt to use the client after calling this method.
Create a Customer.
Newly created customer. Throw exception on errors.
use provisionCustomer instead to create both customer and subscription in single operation. See provisionCustomer for more info.
Create a Subscription
Newly created subscription. Throw exception on errors.
use provisionSubscription instead to create subscription or checkout session according to customer and subscription payment requirements. See provisionSubscription for more info.
Delegates a subscription to a different customer (the paying customer of the subscription will not change)
The subscription connected to destinationResource.
Detach customer's payment method.
customer id
Updated customer. Throw exception on errors.
Estimate subscription
Preview of the subscription.
Estimate subscription update
Preview of the subscription.
Fetch customer usage history of a feature.
Array of usage history as data points.
use getUsageHistoryV2 instead.
Get customer's active subscriptions.
customer id
List of active subscriptions.
customer id
List of active subscriptions
Get customer's active subscriptions, for extended subscription data use getSubscription
Get automatic recharge configuration for a customer and currency
Configuration input containing customerId, currencyId, and environmentId
the automatic recharge configuration
Get boolean entitlement of feature for a customer
boolean entitlement.
Get a list of coupons
Get credit entitlement for a customer by currency
credit entitlement
Get credit ledger
the input to get credit ledger for customer
paginated result of the credit ledger data
Get credit usage
the input to get credit usage for customer
the credit usage data
Get a Customer.
customer id
Full customer details.
Get Customer Statistics.
customer id
customer statistics.
Get entitlement for a feature for a customer (feature-only; for credit use getEntitlementV2).
feature entitlement
Use getEntitlementV2 for a unified API with featureId.
This method is retained for backward compatibility and will be removed in a future major version.
Get entitlements per user
OptionalresourceId: stringOptionalresourceId: stringUse getEntitlementsStateV2 for a unified API Get entitlements per user alongside access denied reason
Get entitlements per user alongside access denied reason (feature + credit)
OptionalresourceId: stringGet a single entitlement by reference (supports both feature and credit entitlements).
featureId or currencyId (exactly one), customerId, resourceId, options
Entitlement (for feature) or CreditEntitlement (for credit)
Get enum entitlement of feature for a customer
enum entitlement
Get metered entitlement of feature for a customer
metered entitlement
Get numeric entitlement of feature for a customer
numeric entitlement
Get a list of products
Get subscription
subscription id
the subscription data
Get customer usage history of a feature.
Import a Customer from billing integration. Private information such as email and name are not imported and needs to be sent in order to be persisted in Stigg. Active billing integration is required for this functionality.
the id of the customer in the billing system.
Newly created customer. Throw exception on errors.
Migrate subscription to latest plan and addons version and pricing. using SubscriptionMigrationTime.EndOfBillingPeriod is possible only if Stripe integration is enabled and will migrate the subscription in the end of the current billing period. Using Immediate will perform the migration immediately. Default, migration will happen immediately.
The subscription id
Preview the subscription next invoice
Preview of the next invoice.
Preview subscription provisioning\updates
Preview of the subscription.
Create a Customer and its first subscription
optional customer id, if not provided a random one will be generated.
Newly created customer and subscription. Throw exception on errors.
Provision a Subscription.
Provision subscription result. Throw exception on errors.
Reload entitlements of a customer or customer resource. Note: this method skips the Edge API, so use it only when you need "read-after-write" consistency after entitlements presumably have changed.
OptionalresourceId: stringReport usage for metered entitlement
Report bulk of usages for metered entitlement
array of usages to report
Save (create or update) automatic recharge configuration for a customer and currency Server SDK allows setting grantExpirationPeriod (admin-only control)
Configuration input containing all automatic recharge settings including grantExpirationPeriod
the saved automatic recharge configuration
The subscription connected to destinationResource.
use transferSubscriptionToResource instead Transfer paid subscription from sourceResourceId to destinationResourceId. sourceResourceId must have a paid active subscription. destinationResourceId must have a free active subscription.
Transfers a subscription to a different resource.
The subscription connected to destinationResource.
Update a Customer.
customer id
Updated customer. Throw exception on errors.
Update a Subscription
updated subscription. Throw exception on errors.
StaticinitializeInitialize an instance of the Stigg SDK client.
client configuration object provided by the consumer.
stigg SDK instance.
Stigg Node.js SDK client