The API below is live and you can build against it today. Automatic renewal
billing is still rolling out — subscriptions you create will not charge a
second time on their own yet. Get in touch if
you want to be on the early list.
Why stablecoin subscriptions work differently
Card subscriptions are pull payments. You store a card and charge it whenever a period ends, without the customer doing anything. Stablecoins are push payments. Only the holder of a wallet can move funds out of it, so nothing can silently charge your customer. CreptaPay handles this in two ways:Recurring invoices
Each cycle we create a payment and send your customer a pay link. They
settle it from any wallet or exchange, on any supported network.
On-chain auto-debit
Your customer approves a spending cap once, and the contract pulls each
cycle. True auto-renew, but self-custody EVM wallets only.
collection_mode. Recurring invoices work for
every customer, so that is the default.
Plans
A plan is the template: the price, the cadence, and how long a late payer has to catch up.interval and interval_count combine, so 3 and month bills quarterly.
Plans are priced in fiat. Your customer pays the stablecoin equivalent at
checkout, and you are credited in stablecoins.
Grace periods
grace_days is how long after a period ends a subscriber can still pay before
their subscription expires. You choose it per plan — a gym might allow a day,
an annual B2B contract a fortnight.
The grace deadline is frozen onto the subscription when each period starts.
Shortening a plan’s grace period later never moves a deadline a subscriber has
already been given.
Subscribing a customer
customer_id instead to subscribe someone you already have on file.
Changing a plan’s price
Plans are fully editable, price and cadence included. Existing subscribers are never affected. When a customer subscribes, the plan’s terms are copied onto their subscription. Billing reads that copy, never the plan. So a plan is a template for new sign-ups rather than a live price that reaches backwards into people who already signed up.on_legacy_terms tells you the plan has since been repriced and this
subscriber has not moved. To move them onto current pricing, call
apply-plan-terms — it takes effect from the next period and leaves the
period they have already paid for alone.
Subscription statuses
Canceling
Canceling defaults to the end of the paid-for period. The subscription staysactive with cancel_at_period_end: true until then, so a customer keeps what
they paid for.
at_period_end: false to end it immediately.