Subscribe to a plan
Create (or switch) a subscription to a paid plan. Returns the payment params; then call /pay-tx and /confirm to pay.
Body
| Field | Type | Description |
|---|---|---|
planrequired | builder | scale | enterprise | The plan to subscribe to. |
couponoptional | string | Promo code — discounts the USDC cycle amount (validate first via GET /v1/billing/coupon/:code). |
monthsoptional | 1 | 3 | 6 | 12 | Prepay several 30-day cycles in ONE transfer (default 1). |
Response fields
| Field | Type | Description |
|---|---|---|
subscription.status | string | incomplete until a USDC transfer is confirmed. |
subscription.amountUsdc | number | USDC to transfer for the period (months × cycle price, after any coupon). |
subscription.coupon | object | null | { code, cyclesRemaining } when a coupon is attached. |
payment | object | { 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.