Skip to main content
Use a smart-account spend permission when the buyer approves repeated USDC charges. The permission bounds the spender, token, amount per period, start time, and end time; your backend decides when each scheduled charge runs.

Demo

The demo above is mock only. If you want to see onchain demos on Vibenet, head to Base chain demos.

Charge an Active Permission

First collect and store a permission with the Spend Permissions guide. At each billing time, check its current status before preparing calls.
TypeScript backend
Every call receipt succeeds, the period’s remainingSpend decreases, and the recipient receives the scheduled amount.

Handle Renewal Failures

Treat these outcomes as normal billing states:
  • Revoked or expired: stop retries and ask the buyer for a new permission.
  • Insufficient token balance: notify the buyer and retry according to your billing policy.
  • Period allowance exhausted: wait for nextPeriodStart or collect a new permission.
A spend permission is not a subscription scheduler. Run billing from a durable job queue, use an idempotency key for each billing period, and reconcile the emitted transfer before marking an invoice paid.

See Also

Spend Permissions SDK

Request, inspect, spend, and revoke permissions.

Subscriptions API Reference

Review the subscription lifecycle and SDK surface.