Solidgate Docs
Sign in

Integrate subscriptions

Configure API access, create products and customers, set up recurring billing, handle webhook events, and manage cancellations with Solidgate

Solidgate subscriptions handle recurring billing from creation to renewal in Billing 2.0. Configure products, prices, and customers once, then create subscriptions. Set up webhook handling to track every lifecycle change.

Step 1. Get API credentials

To use the Solidgate API, you need API keys. Get your keys before proceeding with the integration:

Step 2. Create product

A product represents what you sell. Create a product before setting up a subscription. Products are shared across Billing 1.0 and Billing 2.0. You can create and manage products in the Hub or through the SolidgateAPI v1.

Step 3. Create price

A price defines the recurring cost of a product. Create at least one recurring price before creating a subscription. The price sets the amount, currency, and billing period (for example, $9.99 per month). Prices are shared across Billing 1.0 and Billing 2.0. You can create and manage prices in the Hub or through the SolidgateAPI v1.

Step 4. Create customer

A subscription requires a customer record to identify who is being billed. A customer can be an existing record or created specifically for the subscription. You can create and manage customers in the Hub or through the SolidgateAPI v2.

Step 5. Create subscription and collect payment

Create a subscription and collect the first payment: automatically, using a saved payment instrument through the API, or when the customer submits payment through the Payment Form or Payment Link.

Checkout payment flow

Pass a checkout object when you initialize the Payment Form. Set mode to subscription, include a customer ID and at least one recurring line item referencing a product_price_id. Also pass a merchant_reference value to identify the subscription. It must be unique within the channel and cannot be changed after creation.

Do not pass amount, currency, product_id, or invoice_id together with checkout. The Payment Form calculates the total automatically.


  1. Initialize the Payment Form. Solidgate previews the first charge. No subscription is created yet.
  2. Update the checkout, if needed. Change line items, the coupon, or trial details before payment. Apply a single coupon using checkout.discounts with either coupon_id or coupon_code.

  3. The customer pays. Solidgate creates the subscription, generates the activation invoice, and collects the payment.
  4. Receive the response that includes the invoice ID.

To create a subscription with the Payment Link, generate a shareable payment link with the Subscription payment type to collect the first payment without embedding a form.

Trial subscriptions

If you configure a trial period, the subscription starts in TRIALING status. For free trials, no charge is made until the trial ends. For paid trials, a single charge is collected at trial start for the trial amount.

When the trial ends, Solidgate generates a new invoice for the first regular billing cycle and charges the saved payment instrument automatically.

Handle events

To track the subscription lifecycle and get updates about its status, subscribe to subscription and invoice webhook events. Solidgate sends a SUBSCRIPTION_ACTIVATED event when the first payment completes. Listen for this event to trigger access provisioning.

Subscription events

EventDescription
SUBSCRIPTION_CREATEDA subscription was created. The first invoice has been generated.
SUBSCRIPTION_ACTIVATEDThe first invoice was paid. The subscription is now active and renewals begin automatically. Primary signal for provisioning access.
SUBSCRIPTION_TRIAL_ACTIVATEDThe subscription entered a trial period. No regular billing until the trial ends.
SUBSCRIPTION_UPDATEDThe subscription was updated (for example, items, discount, or billing configuration changed).
SUBSCRIPTION_CANCELLEDThe subscription was cancelled. No further invoices are generated.
SUBSCRIPTION_SCHEDULED_FOR_CANCELLATIONA cancellation was scheduled for a future date. The subscription remains active until the scheduled time.
SUBSCRIPTION_EXPIREDThe first invoice was voided and the subscription expired without activating.

Invoice events

In addition to subscription events, Solidgate sends invoice webhook events for each invoice generated by the subscription. These are useful for tracking payment outcomes at the invoice level.

Provision access to your product

When the subscription becomes active, grant your customer access to the product or service they subscribed to. Use the SUBSCRIPTION_ACTIVATED webhook event as the trigger.

On each successful renewal, Solidgate sends an INVOICE_PAID event. You can use it to extend access for the next billing period or to confirm that billing is still active.

Revoke access when you receive one of the following events:

  • SUBSCRIPTION_CANCELLED: the subscription was cancelled immediately.
  • INVOICE_PAYMENT_FAILED: a renewal payment failed and the subscription moved to redemption. Depending on your business model, you may keep access during the retry window or revoke immediately.
  • INVOICE_UNPAID: all recovery attempts for a renewal invoice are exhausted and the subscription moves to UNPAID.
Looking for help? Contact us
Stay informed with Changelog