List active subscription plans
const url = 'https://pay.example.com/v1/plans';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://pay.example.com/v1/plans \ --header 'Authorization: Bearer <token>'Plans are managed in the admin console and shared by both modes; pass one’s id as plan_id. Retired
plans are left out. Requires subscriptions:read.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Active plans
object
object
Per-period price in currency (unified pricing; pegged stablecoins pay it 1:1).
Per-token prices (per_token pricing); chain_id null applies to every chain.
object
Decimal amount as a string (no floats).
Null: every token that settles the price.
immediate: the first period is charged when the payer subscribes.
Trials check that the payer holds one period’s amount.
How long a failed charge is retried before on_unpaid applies.
Seconds after each failed charge.
What the grace period’s end does: unpaid (kept, no more charges) or canceled.
Payers may pause from “my subscriptions”.
Example
{ "data": [ { "pricing_mode": "unified", "start_mode": "immediate", "on_unpaid": "unpaid" } ]}unauthorized: no Authorization: Bearer header, or an unknown or revoked key.
object
object
English, for logs; may change.
Values for a localized message, e.g. {"field": "expires_in", "min": 60, "max": 604800}. Absent when the error has none.
object
object
Example
{ "error": { "code": "unauthorized" }}insufficient_scope: the key lacks the operation’s scope.
object
object
English, for logs; may change.
Values for a localized message, e.g. {"field": "expires_in", "min": 60, "max": 604800}. Absent when the error has none.
object
object
Example
{ "error": { "code": "insufficient_scope" }}