Create a plan
A plan sets the billing mode, the rates for usage events and outcomes, and the limits. Prepaid plans keep a balance in one credit type and price in credits (credits_per_unit). Postpaid plans accrue charges in the plan currency (unit_amount_decimal) and invoice them at the end of each period. Rates can change until the first subscription starts; after that, create a new plan.
Authentication
A secret key (rl_sk_test_..., rl_sk_live_...) or a restricted key with limited scopes (rl_rk_test_..., rl_rk_live_...). A restricted key can carry agent: true and an expires_at, and is what a coding agent should hold. Keys end in a checksum so secret scanners can recognize them. People create, roll and revoke keys in the dashboard; GET /v1/api_keys lists them, masked.
Request
prepaid: a credit balance that must cover charges, topped up or granted in advance. postpaid: charges accrue in money and are invoiced at period end.
Prepaid. The credit type (ID or key) the balance is kept in.
recurring_fee and included_credits are per seat, multiplied by the subscription’s quantity. Default false.
The spend limit each new subscription on the plan starts with. A customer-set limit may replace it, up to ceiling.
Response
prepaid: a credit balance that must cover charges, topped up or granted in advance. postpaid: charges accrue in money and are invoiced at period end.
recurring_fee and included_credits are per seat, multiplied by the subscription’s quantity. Default false.
The spend limit each new subscription on the plan starts with. A customer-set limit may replace it, up to ceiling.