Overview
Importing your existing data into Stigg is a key milestone in the integration process. This guide will walk you through the process step-by-step, ensuring a smooth transition and uninterrupted operations.Entities that can be imported
- Customers
- Subscriptions
- Usage data

Prerequisites
- Your pricing has been modeled in Stigg.
- NodeJS must be installed.
- Obtain the Server API key of the environment that you’d like to import the data to.
- Export the above Server API key as an environment variable:
Importing customers
Using the CLI
Create a file calledcustomers.json that contains all the customers that will be imported to the environment.
The file should be in the following schema:
Using the API and SDKs
Using theimportCustomerBulk endpoint.
Importing subscriptions
Before importing subscriptions, ensure that the relevant customers have been imported to Stigg.
Free plans
Using the CLI
To migrate subscriptions to free plans, create a file calledfree-subscriptions.json that contains all of the subscriptions that should be imported.
The file should be in the following schema:
Using the API and SDKs
Using theimportSubscriptionBulk endpoint.
Paid plans
To migrate subscriptions to paid plans, repeat the below process for each subscription:- Provision a subscription in Stigg with the start date of the subscription that currently exists in your billing provider and include the
billingInformation.isBackdated: trueproperty. Doing so will create the subscription as backdated in the billing provider and ensure that customers will be billed again for the subscription starting from the next billing period. You may optionally sync additional metadata for the subscription that’s synced to the billing provider to indicate that this is a migrated subscription by passing thebillingInformation.metadataproperty when provisioning the subscription Stigg. - Cancel the original subscription in your billing provider immediately and without prorations.

Custom plans
Using the CLI
To migrate subscriptions to custom plans, create a file calledcustom-subscriptions.json that contains all of the subscriptions that should be imported.
The file should be in the following schema:
Using the API and SDKs
Using theimportSubscriptionBulk endpoint.
Importing feature usage
Importing feature usage is supported only for metered features with a Calculated Usage meter type.
Before importing feature usage, ensure that the relevant customers have been imported to Stigg.
Using the CLI
Create a file calledusage.json that contains all the features’ up-to-date usage.
The file should be in the following schema:
The import function is idempotent; therefore, attempting to import usage multiple time will yield the same result.
Using the API and SDKs
Leverage thereportUsageBulk endpoint while passing the updateBehavior: UsageUpdateBehavior.SET property in each of the usage reports.