OrbitDocs

Plans

Define what you charge and how often.

A plan is an off-chain template: a name, an amount and an interval. When a customer subscribes, the plan's values are copied into their onchain vault.

Plan fields

FieldTypeExampleNotes
namestringPro MonthlyShown at checkout
usdc_amountinteger290000000Raw units, 7 decimals (29 USDC)
interval_secondsinteger2592000Minimum gap between pulls
merchant_iduuidOwner of the plan

Common intervals

Cadenceinterval_seconds
Daily86400
Weekly604800
30 days2592000
365 days31536000

Intervals are fixed durations in ledger time, not calendar months. A "monthly" plan of 2592000 bills every 30 days.

Create a plan

Go to Dashboard → Subscription Plans → New plan, fill in the name, price and cadence, then copy the embed code or checkout link.

Changing a price

Existing vaults keep the terms they were created with. To move a subscriber to a new price, they call create_vault again with the new amount. This resets the cadence, so schedule it right after a pull.

On this page