Subscriptions
Recurring revenue with a lifecycle you can read
Create a monthly or yearly price, send your customer to the checkout and follow every subscription through five states. Each change arrives as a webhook event, so your app always knows who has access.
Test mode runs the full lifecycle without charging anyone.
Members club
Monthly plan · R$49.00/month
sub_5Hn2RtK8wPz4Bq- Current status
- Active
- Next charge
- Dec 3, 2026
Subscription history
Trial started
Aug 20, 2026The customer subscribed with a card. No charge during the trial.subscription.createdFirst charge paid
Sep 3, 2026Trial over: R$49.00 charged and the subscription is active.charge.paidRenewed
Oct 3, 2026R$49.00 charged for the new period.subscription.renewedRenewal declined
Nov 3, 2026The card had insufficient funds. The subscription is past due.subscription.past_duePayment recovered
Nov 5, 2026The customer updated the card and the renewal was paid.subscription.renewed
Five states
trialing, active, past_due, paused and canceled. Nothing in between.
One event per change
Every transition sends a webhook, so access follows the state.
Monthly or yearly
Two prices on the same product, each with its own checkout.
The lifecycle
Pick a state and see what moves it
Every subscription is in exactly one state. Choose one to see what it means, how it gets there, where it can go next and which webhook event tells your system.
Products and prices
One product, monthly or yearly
A product holds what you sell. Each price sets an amount and an interval. Offer both on your pricing page and open the checkout for the price the customer picks.
- Prices are set per product, with a monthly or a yearly interval.
- The price id goes in the request that creates the subscription.
- Changing plans mid-period is not part of the current proposal.
Examples follow a provisional API contract proposal. There is no SDK; requests are plain HTTP.
When a renewal fails
A failed renewal is a state, not a surprise
The subscription moves to past_due and your system gets two events. What happens next is up to the next charge: it is paid and the subscription returns to active, or you pause or cancel it.
charge.failed
The renewal charge was not paid. The payload carries the failure_code.
subscription.past_due
The subscription is now past_due. This is your cue to warn the customer.
charge.paid
A later attempt is paid, for example after the customer updates the card.
subscription.renewed
The subscription is back to active and the new period starts.
If it is not recovered, you decide: subscription.paused or subscription.canceled.
Warning: Retry policy: to be announced
{ "id": "evt_3Uu4Vv5Ww6Xx7Y", "object": "event", "type": "subscription.past_due", "api_version": "2026-11-01", "created_at": "2026-12-03T12:00:12.000Z", "data": { "object": { "id": "sub_5Hn2RtK8wPz4Bq", "object": "subscription", "customer_id": "cus_8Hq2LmZr4TxN1a", "product_id": "prod_6Rj8YdF3nQs5Kv", "price_id": "price_9Tm4BxW2gLp7Zc", "status": "past_due", "method": "card", "started_at": "2026-09-03T12:00:00.000Z", "current_period_start": "2026-11-03T12:00:00.000Z", "current_period_end": "2026-12-03T12:00:00.000Z", "canceled_at": null, "cancel_at_period_end": false } }}Provisional API contract proposal — not an operational endpoint.
Questions about subscriptions
Short answers. When something is not defined yet, we say so.
Start with one monthly price
Create an account, add a product with a price and follow a test subscription through its states before your first real customer.
