Before we begin
In order to complete this guide in your application code, please make sure that you have:- Modeled your pricing in Stigg
- Installed the Stigg Node.js server SDK
- A Stigg full access key
- Provisioned a customer
Initializing the server SDK
The first step is to initialize Stigg’s server SDK with the full access key of the environment that’s integrated with Stigg:TypeScript
Provisioning a subscription
When a customer subscribes to a new plan (free, paid, trial, etc.), provision a subscription in Stigg. The provision result can be a successfully created subscription, or a redirect link to checkout page of the integrated billing solution in case payment details are required in order to provision the subscription.TypeScript
To redirect customers to a Stripe-hosted checkout page instead of building your own, pass the
checkoutOptions parameter - see Integration when using Stripe-hosted checkout.Additional resources
- REST API
- GraphQL