Overview
Pandabase handles the full subscription lifecycle — billing, retries, 3D Secure authentication, invoices, and cancellation. You create a product withtype: SUBSCRIPTION, and the platform takes care of everything else.
How it works
- Create a subscription product with a billing interval (weekly, monthly, or yearly)
- Customer checks out — pays the first charge (or starts a free trial)
- Card is saved — Pandabase stores the payment method securely for future charges
- Automatic renewals — the platform charges the customer on each billing cycle
- Invoices sent — customers receive a PDF invoice email on every charge
- Lifecycle events — webhooks fire on every state change
Creating a subscription product
Settype to SUBSCRIPTION and configure the billing interval:
| Field | Options | Description |
|---|---|---|
billingInterval | WEEKLY, MONTHLY, YEARLY | How often the customer is charged |
trialDays | 0–365 | Free trial period before first charge (optional) |
Checkout flow
Create a checkout session with a subscription product — the checkout UI automatically adapts:- Shows the billing interval (e.g. “$19.99 / month”)
- Shows trial info if applicable (e.g. “7-day free trial, then $19.99/month”)
- Restricts payment to card and Link (required for recurring billing)
- Shows a consent checkbox before payment
- Button text changes to “Subscribe” or “Start subscription”
Subscription statuses
| Status | Description |
|---|---|
TRIALING | Customer is in a free trial — no charges until trial ends |
ACTIVE | Billing is active, customer is being charged on schedule |
PAST_DUE | Payment failed — retrying automatically or awaiting 3DS verification |
PAUSED | Billing paused by merchant — no charges until resumed |
CANCELLED | Subscription ended — no further charges |
Free trials
Settrial_days on the product to offer a free trial:
TRIALING status and the first charge happens automatically when the trial ends.
Failed payments and retries
When a renewal payment fails, Pandabase:- Moves the subscription to
PAST_DUE - Fires a
SUBSCRIPTION_PAST_DUEwebhook - Emails the customer about the failed payment
- Retries automatically with backoff:
- Retry 1: 24 hours later
- Retry 2: 48 hours later
- Retry 3: 72 hours later
- If all retries fail, the subscription is cancelled
3D Secure on renewals
Some banks require 3D Secure authentication for recurring charges. When this happens:- The subscription moves to
PAST_DUE - The customer receives an email with a secure verification link
- The customer clicks the link and completes the bank’s authentication
- The payment is processed and the subscription returns to
ACTIVE
Managing subscriptions
Via API
UseSUBSCRIPTIONS_READ and SUBSCRIPTIONS_WRITE permissions on your API token:
Via Customer Portal
Customers can view and cancel their subscriptions at mypandabase.com. Cancellation is always at period end — customers retain access until the current billing period expires.Cancellation behavior
| Who cancels | Behavior |
|---|---|
| Merchant (default) | Cancels at end of current billing period |
| Merchant (immediate) | Cancels immediately, revokes access, revokes licenses if revoke_on_refund is enabled |
| Customer | Always cancels at end of current billing period |
| System (max retries) | Cancels after 4 failed payment attempts |
Webhook events
Six events are available for subscription state changes:| Event | When |
|---|---|
SUBSCRIPTION_CREATED | First payment or trial setup succeeds |
SUBSCRIPTION_RENEWED | Renewal payment succeeds |
SUBSCRIPTION_PAST_DUE | Renewal failed or needs 3DS |
SUBSCRIPTION_CANCELLED | Cancelled by merchant, customer, or max retries |
SUBSCRIPTION_PAUSED | Merchant paused billing |
SUBSCRIPTION_RESUMED | Merchant resumed billing |
Invoices
Customers automatically receive a PDF invoice via email on:- The first subscription payment
- Every renewal payment
Limitations
- Only one subscription item per checkout (no mixing with one-time items)
- Billing is in USD only (multicurrency renewals are a future enhancement)
- Price is locked at creation — changing the product price does not affect existing subscriptions
- Subscription upgrades/downgrades are not yet supported — cancel and re-subscribe
