{"uid":"cap_IbtmdSRI-1GC7GE9lsi3I","slug":"erc-20-allowance-checker-with-balance-and-sufficiency-verdict-dba0ebb7","name":"ERC-20 Allowance Checker with Balance and Sufficiency Verdict","description":"Get an ERC-20 allowance with the owner's balance and a sufficiency verdict for the amount you plan to pull. ERC-20 allowance of a spender on an owner (USDC by default), with the owner's balance and, if you pass ?amount=, a verdict: i…","url":"https://api.x-402.online/v1/chain/allowance?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_3kuR1sBp0BYjM_pOExw24","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the ERC-20 allowance granted by an owner to a spender (USDC by default), along with the owner's token balance and a sufficiency verdict if a target amount is provided.","exampleAgentPrompt":"Check if the spender contract 0xABC...123 has enough USDC allowance to pull 200 USDC from wallet 0xDEF...456 on Base — and tell me the current balance and whether the allowance is sufficient.","exampleUseCases":[{"title":"Pre-flight DeFi transaction check","prompt":"Before I approve this swap, check if the DEX contract 0xRouter...999 already has USDC allowance from my wallet 0xMyWallet...111 on Base, and whether the existing allowance covers 500 USDC."},{"title":"Agent payment authorization guard","prompt":"My agent is about to pull 100 USDC from 0xUser...222 using spender 0xAgent...333 — can you verify the allowance and balance are both sufficient before it proceeds?"},{"title":"Allowance audit for a wallet","prompt":"Look up the USDC allowance that 0xProtocol...444 has over 0xHolder...555, and show me the owner's current USDC balance so I can decide whether to revoke or top up the approval."}],"resultDescription":"Returns the current ERC-20 allowance (in token units and human-readable), the owner's token balance, the token metadata (symbol, decimals), and — if an amount was supplied — a boolean sufficiency verdict indicating whether the allowance covers the requested amount.","failureModes":["Invalid or malformed owner/spender address returns a 400 error","Unsupported chain ID or token contract returns an error or empty result","RPC node unavailability causes a 503 or timeout","Missing required query parameters (owner, spender) returns a 422 validation error","Amount parameter provided in wrong format may be ignored or cause parsing error"],"whenToPreferThis":"Use this endpoint when an AI agent or workflow needs to verify on-chain ERC-20 approval status before attempting a transferFrom or similar pull-payment operation — especially for USDC on Base. It combines three checks (allowance, balance, sufficiency) in a single call, avoiding multiple RPC round-trips. Prefer it over raw RPC calls when you need a human-readable verdict without writing blockchain query code.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-03T00:39:42.771Z","isFirstParty":false,"canonicalSlug":"erc-20-allowance-checker-with-balance-and-sufficiency-verdict-dba0ebb7"}