Per seat or flat
A per-seat plan is a price per seat bought with quantity; several items (up to 20 prices) on one subscription.
Test modeDucat runs on Stripe's test mode for now, so no real card is charged.
Features
Everything a recurring plan needs, through one resource: start it from checkout or a saved card, change the plan or the seats with a preview of the cost first, and cancel or take it back.
A per-seat plan is a price per seat bought with quantity; several items (up to 20 prices) on one subscription.
The upcoming invoice shows the prorations and total before a change; pass its proration_date to charge exactly what the customer saw. create_prorations, none or always_invoice.
trial_period_days or trial_end, and end a trial now to charge the first period.
cancel_at_period_end keeps access until the period ends and can be taken back; DELETE cancels at once.
Stripe retries on its schedule; GET /v1/dunning lists past_due and unpaid subscriptions with their failed invoices, and you can try the card again now.
A subscription charged to a saved card, or a plan rise, past your standing limit waits for a person's approval. Checkout needs none: the customer pays themselves.
TypeScript
// ducat(): the small fetch helper from the quickstart (/docs/quickstart)
const preview = await ducat("GET",
`/v1/subscriptions/${subId}/upcoming-invoice?price=${priceId}&quantity=4`);
// show preview.total to the customer, then:
await ducat("PATCH", `/v1/subscriptions/${subId}`, {
price: priceId,
quantity: 4,
proration_date: preview.proration_date,
});Python
# ducat(): the small helper from the quickstart (/docs/quickstart)
preview = ducat("GET",
f"/v1/subscriptions/{sub_id}/upcoming-invoice?price={price_id}&quantity=4")
# show preview["total"] to the customer, then:
ducat("PATCH", f"/v1/subscriptions/{sub_id}", {
"price": price_id,
"quantity": 4,
"proration_date": preview["proration_date"],
})curl
curl -s "https://api.ducatpay.dev/v1/subscriptions/sub_…/upcoming-invoice?price=price_…&quantity=4" \
-H "authorization: Bearer $DUCAT_TOKEN"
curl -s -X PATCH https://api.ducatpay.dev/v1/subscriptions/sub_… \
-H "authorization: Bearer $DUCAT_TOKEN" \
-H "content-type: application/json" \
-d '{"price": "price_…", "quantity": 4, "proration_date": 1800000000}'| Endpoint | What |
|---|---|
POST /v1/subscriptions | on a saved card; trial_period_days, trial_end, promotion_code |
GET | DELETE /v1/subscriptions/{id} | read it; cancel now |
PATCH /v1/subscriptions/{id} | price, quantity, proration_behavior, or cancel_at_period_end alone |
GET /v1/subscriptions/{id}/upcoming-invoice | the preview: prorations, total, proration_date |
POST /v1/subscriptions/{id}/end-trial | charge the first period now |
GET /v1/customers/{id}/subscriptions | newest first, every status |
GET /v1/dunning, POST /v1/invoices/{id}/pay | failing subscriptions; pay an invoice now |
Available in test mode Works today on Stripe's test mode.
Related: Customer portal, Invoices, SaaS subscriptions
Sign up, make a key, and take a test payment in a few minutes. No card needed.