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
4. Listen for webhooks
After payment, listen for events such aspayment_method.attached, invoice.paid, subscription.created, and payment_success.
Subscription status
The current public status for an active subscription isactive. Trial dates are represented with trialStartDate and trialEndDate.