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 authenticatedGETs.
Payment methods
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.Delegations and remaining budget
{ 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:{ totalResults, page, offset, transactions: [ … ] }).Credit balance per plan
For each plan you hold, query your balance with your wallet as the holder:
- REST
- TypeScript
- Python
{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.Related
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.