Skip to main content

Create a Card-backed Subscription

In a nutshell

A card-backed subscription starts with hosted checkout. The first payment tokenizes the customer’s card, and future renewals use the saved tokenized card reference.

Flow

1. Create a plan

2. Create a customer

3. Initialize checkout

The engine uses the plan’s amount and currency, enables card tokenization, and returns a checkout link.

4. Listen for webhooks

After payment, listen for events such as payment_method.attached, invoice.paid, subscription.created, and payment_success.

Subscription status

The current public status for an active subscription is active. Trial dates are represented with trialStartDate and trialEndDate.