Skip to main content
An agent that pays for services should know where it stands: how many credits are left on each plan, and how much budget remains on its delegations. This flow pulls that status over the REST API so the agent can warn you — or top up — before it runs dry mid-task.

Useful for

  • A pre-flight check before a run: does the agent have enough credits and delegation budget to finish?
  • A “what do I have” report across every plan you hold and every delegation you’ve granted.
  • Top-up triggers: detect when a balance or budget is low and act before it hits zero.

Try it yourself

How it works

All three checks are simple authenticated GETs.
1

Payment methods

Returns your cards and your stablecoin (erc4337) wallet, each with status. The erc4337 method’s id is your wallet/holder address — you’ll use it as the holder when checking plan balances.
2

Delegations and remaining budget

Returns { totalResults, page, offset, delegations: [ … ] }, each with spendingLimitCents, amountSpentCents, remainingBudgetCents, status, and expiresAt. (Delegation and transaction lists use totalResults; the plan/agent lists use total — mind the difference if you write one pagination helper for both.) Drill into one delegation’s charges with:
(returns { totalResults, page, offset, transactions: [ … ] }).
3

Credit balance per plan

For each plan you hold, query your balance with your wallet as the holder:
{yourAddress} is the id of your erc4337 payment method from step 1 (or the userWallet from an embed session). Returns { planName, planType, isSubscriber, balance, pricePerCredit, … }balance is your remaining credits.
The receipt from a purchase (creditsRedeemed / remainingBalance, returned by settle or decoded from the payment-response header) is also a live proof of your balance right after a buy.

Buy access

Top up when a balance runs low.

Enroll a card & delegate

Grant a fresh budget when a delegation is spent or expired.

Order Plans

Buy credits upfront for stablecoin plans.