Improved API for provisioning subscriptions
When customers subscribe to plans (for example: during an upgrade from a free plan to a paid plan), a subscription needs to be provisioned in Stigg.
We've added a new provisionSubscription
API that exhibits the below behavior:
- When provisioning of a paid subscription is attempted, Stigg is integrated with a billing solution and payment details have not been previously provided by the customer, the customer will be auto-magically redirected to the billing solution's checkout page. After the customer enters the required payment details in the presented checkout page, the relevant subscription will be created in both Stigg and the billing solution.
- When no payment is required or when Stigg is not integrated with a billing solution, the subscription will be immediately created in Stigg.
The new API method significantly simplifies the integration with Stigg, allows Stigg's customers to focus on modeling and rolling out changes to their pricing using the Stigg platform, and delegates all of the heavy lifting and decision making about when payment details are required to Stigg.
As can be seen in this example (and below video), this results in needing to write and maintain 4X less lines of code.
The new provisionSubscription
method is available in the Stigg Node.js SDK version 0.57.0 or later, and replaces the separate createSubscription
and initiateCheckout
methods, which have been marked for deprecation.
More details about the provisionSubscription
API can be found here.