Subscription billing is available on Growth plans and above. You need at least one active
payment method configured before creating subscriptions.
Core concepts
| Concept | Description |
|---|---|
| Plan | Defines billing terms: price, interval, token, chain, and optional trial period |
| Subscription | Links a customer to a plan. Tracks status and billing periods. |
| Renewal | Created automatically at each billing interval. Generates a checkout for payment. |
| Entitlement | Feature flags attached to plans for gating access in your application. |
Subscription lifecycle
Subscriptions move through a defined state machine:| Status | Description |
|---|---|
trialing | Trial period active. No payment collected yet. |
active | Current period is paid. Access should be granted. |
past_due | Payment failed after retries. Customer should be notified. |
paused | Paused by merchant. Renewals skipped until resumed. |
canceled | Canceled. Access continues until current_period_end. |
expired | Terminal. Subscription has ended. |
Renewal flow
When a billing period ends, billing.io automatically:- Creates a renewal record (status:
pending) - Generates a checkout for the next payment
- Waits for the customer to pay
paid and the subscription period advances. If payment fails, billing.io retries up to max_attempts. After all retries are exhausted, the subscription moves to past_due.
Entitlements
Entitlements attach feature flags to plans. Use them to gate features based on which plan a customer is subscribed to.| Value Type | Field | Example |
|---|---|---|
boolean | value_boolean | advanced_analytics: true |
numeric | value_numeric | api_requests: 10000 |
string | value_string | support_level: "priority" |
GET /subscriptions/entitlements/check. By centralizing entitlements in billing.io, your application no longer needs to manage billing edge cases — access decisions are derived directly from payment state.
Plan intervals
| Interval | Description |
|---|---|
daily | Billed every day |
weekly | Billed every 7 days |
monthly | Billed every calendar month |
yearly | Billed every calendar year |
Key webhook events
| Event | Recommended Action |
|---|---|
subscription.renewed | Extend access for the new period |
subscription.past_due | Warn the customer, offer retry |
subscription.paused | Restrict feature access |
subscription.canceled | Revoke access at period end |
Code examples
Create a plan
Create a subscription
Pause, resume, and cancel
Pause a subscription
Pause a subscription
Resume a subscription
Resume a subscription
Cancel a subscription
Cancel a subscription