Plans & Credits Management

Understand how plans work, how credits are granted on a schedule, and how to manage subscription lifecycles.

Free vs paid plans

Plans define how many credits an account receives and on what schedule. A free plan might grant a small number of credits once, while a paid plan can auto-grant credits monthly or on any recurring interval. You can create as many plan tiers as you need.

Recurring auto-grants

Plans can be configured with a schedule (e.g. monthly) to automatically grant credits to all assigned accounts. This happens server-side — you don't need to call any API for recurring grants. Credits are added at the start of each billing period based on the plan configuration.

Manual grants

Use the grant API when you need to add credits outside the normal schedule — for example, after a successful one-time payment, as a promotional bonus, or when a customer purchases an add-on credit pack.

First subscription flow

  1. Customer completes checkout in your payment provider (Stripe, etc.)
  2. Your webhook handler receives the payment confirmation
  3. Call the Credits API to assign the corresponding plan to the account
  4. Credits are granted immediately and recurring grants begin on schedule

Cancellation

When a subscription is cancelled (via your payment provider's webhook), remove the plan assignment from the account. This stops future auto-grants. You can choose whether to let the remaining balance expire or stay available until used.