{"uid":"cap_I_JxHIIOjP7M-nfS0dYKS","slug":"anywaypossible-com-base-usdc-payment-preflight-60df2b25","name":"anywaypossible.com Base USDC Payment Preflight","description":"Preflight a Base USDC payment before an AI agent signs it. Check live funding and gas, confirm Base chain intent, classify the destination as an EOA or contract, catch zero-address, token-contract, and self-payment hazards, and receive a machine-readable proceed, fund, review, or reject decision. No account or API key.","url":"https://anywaypossible.com/api/treasury","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["address"],"properties":{"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"EVM wallet address on Base"},"expectedChainId":{"enum":[8453],"type":"integer","description":"Expected destination chain. This service only approves Base mainnet (8453)."},"minGasReserveEth":{"type":"string","pattern":"^[0-9]+(\\.[0-9]{1,18})?$","description":"Minimum ETH gas reserve; defaults to 0.00005"},"plannedSpendUsdc":{"type":"string","pattern":"^[0-9]+(\\.[0-9]{1,6})?$","description":"USDC amount the agent plans to spend; defaults to 1.00"},"destinationAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Optional intended payment recipient on Base; enables destination hazard checks"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["receiptId","address","destinationAddress","destinationKind","network","chainId","status","ready","safeToProceed","decision","riskLevel","recommendedAction","eth","usdc","plannedSpendUsdc","minGasReserveEth","usdcShortfall","gasShortfallEth","paymentCapacity","checks","alerts","limitations","blockNumber","observedAt"],"properties":{"eth":{"type":"string"},"usdc":{"type":"string"},"ready":{"type":"boolean"},"alerts":{"type":"array","items":{"type":"string"}},"checks":{"type":"array","items":{"type":"object"}},"status":{"enum":["ready","needs_usdc","needs_gas","needs_funding"],"type":"string"},"address":{"type":"string"},"chainId":{"type":"integer"},"network":{"type":"string"},"decision":{"enum":["safe_to_pay","needs_funding","needs_gas","review_destination","reject"],"type":"string"},"receiptId":{"type":"string","description":"SHA-256 identifier for this timestamped preflight result"},"riskLevel":{"enum":["low","medium","high"],"type":"string"},"observedAt":{"type":"string","format":"date-time"},"blockNumber":{"type":"integer"},"limitations":{"type":"array","items":{"type":"string"}},"safeToProceed":{"type":"boolean"},"usdcShortfall":{"type":"string"},"destinationKind":{"enum":["not_provided","eoa","contract"],"type":"string"},"gasShortfallEth":{"type":"string"},"paymentCapacity":{"type":"object"},"minGasReserveEth":{"type":"string"},"plannedSpendUsdc":{"type":"string"},"recommendedAction":{"type":"string"},"destinationAddress":{"type":["string","null"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_aeB-O9pFJQpQAiXfa60bS","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates a planned Base USDC payment before signing, checking wallet funding, gas reserves, chain ID, and destination address hazards to return a machine-readable proceed/fund/review/reject decision.","exampleAgentPrompt":"Before I sign this payment, preflight my Base wallet 0xABC...123 to confirm I have enough USDC to send 50 USDC to 0xDEF...456 and that I have at least 0.00005 ETH for gas — tell me if it's safe to proceed or what's blocking it.","exampleUseCases":[{"title":"Agent payment safety gate","prompt":"Before sending 25 USDC from my wallet 0xABC...123 to 0xDEF...456 on Base, check that I have enough USDC and ETH gas and that the destination isn't a token contract or zero address — give me a proceed or reject decision."},{"title":"Low-balance funding alert","prompt":"Check my Base wallet 0x111...222 — I'm about to spend 100 USDC but I think I might be short. Tell me the exact USDC and ETH shortfall so I know how much to top up before my agent signs anything."},{"title":"Unknown recipient hazard check","prompt":"I need to pay 10 USDC to address 0x999...888 on Base but I've never paid it before — run a preflight to tell me if it's an EOA or a contract and flag any risks like self-payment or token contract hazards before I approve."}],"resultDescription":"Returns a structured JSON object with a machine-readable decision (safe_to_pay, needs_funding, needs_gas, review_destination, or reject), risk level, readiness boolean, wallet ETH and USDC balances, USDC and gas shortfalls, destination address classification (EOA or contract), a list of named safety checks with pass/fail status, alert strings describing any detected hazards, recommended action, block number, and observation timestamp.","failureModes":["Invalid EVM address format returns a 422 validation error","Unsupported chain ID (non-Base) triggers a reject decision","Destination address identified as zero address returns reject with hazard alert","Wallet with zero balances returns needs_funding decision with shortfall amounts","Network congestion or RPC unavailability may cause delayed or failed balance lookups","Malformed plannedSpendUsdc or minGasReserveEth pattern returns schema validation error"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to gate a Base USDC payment with a structured risk assessment before signing — especially when the destination is unknown, balances may be insufficient, or the agent must produce a machine-readable proceed/reject signal for downstream automation. Prefer this over raw balance checks when you need destination hazard classification (EOA vs contract, zero-address detection, self-payment detection) combined with gas and funding validation in a single call. No API key or account required, making it ideal for lightweight agent pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:37:38.830Z","isFirstParty":false}