/v1 API, from Console, or let the customer manage it in the portal.
Funds land on your business balance, like any Checkout payment.
Create a subscription session
Userecurring (or interval and interval_count at the top level) and, if you want a trial, trial_days. Always send Idempotency-Key. The full field list is on Checkout.
To bill from a catalog price instead, set
line_items[].price to a catalog price id. A recurring price makes the session a subscription. Read the session with GET /v1/checkout/sessions/cs_….
Start a trial without a card
By default a trial still asks for a card, so the first charge can happen on its own. To let a customer start with only an email, sendpayment_method_collection: "if_required" with a trial:
amount_due_today is 0. The subscription starts as trialing, and you get checkout.completed and subscription.created as usual.
The subscription has has_payment_method: false until the customer adds a card. They can add one at any time in the customer portal (Add a card). When the trial ends:
Use
pause when you want the customer to be able to come back to the same subscription, and cancel when you would rather they start again with a new checkout. subscription.trial_ending still fires 3 days before the trial ends, so you can ask them to add a card first. A paused trial has next_charge_at: null.
Keep your server in sync
Renewals happen without the customer on your site, so webhooks are your only signal. Unlock access oncheckout.completed, then follow the subscription:
Tick these on a webhook endpoint in Console (Settings, Webhooks). See Webhooks and Console tools.
Manage a subscription from your server
The id is
sub_…. Use the same id in webhooks and in Console. A subscription in the other mode, or another business’s, is 404 not_found.
None of these calls moves money. A cancel or a pause stops future charges. It does not refund anything.
Change seats or price
A per-seat subscription billsquantity times the price. Change the seats with POST /v1/subscriptions/:id. Send quantity, or price to move to another recurring price of the same product, or both.
At least one of
quantity or price is required. The answer is the subscription, with its new quantity and amount. A tiered price also returns tier_breakdown for that quantity. Seat changes, previews and proration still take the one quantity.
Adding seats takes effect at once. The prorated charge is billed now.
Removing seats takes effect at once. The prorated credit is held on the customer’s balance and applied to the next invoice. Easner never refunds a seat removal through the API. Use proration: "none" with effective: "period_end" to change the count at the renewal with no credit.
Each change fires subscription.updated, and Easner emails the customer the new seat count, the monthly amount from the next renewal and the date. Honours Idempotency-Key: a retry with the same key and body answers 200, not a second change.
Preview a change
Show the charge before you confirm. The preview is the invoice Easner will bill for the same change, so the number you show and the invoice agree.amount_due_now is what is charged today. credit is what is credited to the balance for removed seats. lines are the same lines as the invoice. The preview takes the same quantity, price, proration and effective as the change, and changes nothing.
Seats in the customer portal
On a per-seat subscription, a customer can change their own seats in the customer portal when you allow it (Settings, Payments tab, Customer portal, Change seats). The portal shows the same preview and asks for a six-digit code first.Read and list
status and customer. status is one of the statuses below. customer is a Checkout customer id (a UUID). A customer that is not yours in this mode is 404 not_found. Lists also take limit, starting_after and created[gte] / created[lte]. See v1 reference.
next_charge_at is null while the subscription is ending, paused or canceled. cancel_reason is the reason the customer gave in the portal, when they gave one.
Cancel
The response is the subscription. After
at: "period_end" its status is ending and ends_at is the date it stops. After at: "now" its status is canceled.
To refund the unused part of the current period, use Console: open the customer, choose Cancel subscription, then Now, and tick Refund the unused part of this period. That is a money move, so Console asks for a fresh code from your authenticator first.
Pause and resume
paused and status.
Idempotency
SendIdempotency-Key on cancel, pause and resume, as you do on checkout. One stable key per action, for example cancel-sub_…. A retry after a timeout then does not act twice:
A key is kept with its business, its subscription and its action. A different body sent with the same key is not compared. The call acts on the subscription as it is when the request arrives.
Errors
What you can do in Console
Go to Checkout, Customers and open a customer. Console has more actions than the API. The Subscriptions card lists each subscription with its price, interval, next charge or end date, and a status badge. The actions menu offers:
Which actions show depends on the subscription’s state. For example, Keep only appears when it is set to end.
The customer page also has Send portal link. If the portal is off, Console shows a notice and a button to Open Settings; turn it on in Settings, Payments tab.
The Customers list has the tabs All, Subscribed and One-time. The Checkout, Overview page shows Active subscriptions.
What the customer can do
The customer portal lets a customer manage their own subscriptions. Your server creates a portal link withPOST /v1/customer_portal/sessions and redirects them. They can cancel, resume, switch plans, change the payment method and download receipts. You choose which of these they may do in Settings, Payments tab, under Customer portal:
Changes in the portal ask the customer for a six-digit code sent to their email.
Test and live
Test subscriptions use the test card4242 4242 4242 4242 and never charge. Test and live subscriptions, portals and webhooks are separate. A test key lists and changes only test subscriptions. See Test and live.
Customer portal
Let customers manage their own subscriptions.
Checkout
The full session reference.
