Docs/Billing/Subscribe to a plan

Subscribe to a plan

POST/v1/billing/subscribe🔑 API key required

Create (or switch) a subscription to a paid plan. Returns the payment params; then call /pay-tx and /confirm to pay.

Body

FieldTypeDescription
planrequiredbuilder | scale | enterpriseThe plan to subscribe to.
couponoptionalstringPromo code — discounts the USDC cycle amount (validate first via GET /v1/billing/coupon/:code).
monthsoptional1 | 3 | 6 | 12Prepay several 30-day cycles in ONE transfer (default 1).

Response fields

FieldTypeDescription
subscription.statusstringincomplete until a USDC transfer is confirmed.
subscription.amountUsdcnumberUSDC to transfer for the period (months × cycle price, after any coupon).
subscription.couponobject | null{ code, cyclesRemaining } when a coupon is attached.
paymentobject{ kind:'usdc-transfer', treasury, mint, amountUsdc, status } — what you'll pay, where. With a 100%-off coupon: { required: false, kind: 'free-cycle' } — just call /confirm.
Enterprise is custom-priced (returns 402 custom_pricing — contact sales). Switching plans replaces the previous subscription; its already-paid period carries over as entitlement until it ends.
Next: POST /v1/billing/pay-tx { wallet } for the unsigned transfer, then POST /v1/billing/confirm.