{"uid":"cap_PnwahXsEJ5USuS7Pc-4af","slug":"intent402-approve-check-2fed26bf","name":"intent402 Approve Check","description":"Check if a token approval is needed and return the approval transaction if so.","url":"https://intent402.dylan-caponi.workers.dev/approve-check","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"example":{"type":"string"}}},"responseSchema":{"type":"json","example":{"approved":false,"requiredAmount":"100000000","currentAllowance":"0","approvalTransaction":{"to":"0x...","data":"0x...","value":"0","chainId":8453}}},"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_1hhD0u9E_zsoezMoh6rgs","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":"Checks whether a token approval is in place and returns an unsigned approval transaction if more allowance is needed before executing a swap or transfer.","exampleAgentPrompt":"Before executing my USDC swap on Base, check whether my wallet 0xABC...123 has approved enough allowance — and if not, give me the unsigned approval transaction I need to sign first.","exampleUseCases":[{"title":"Pre-swap allowance check for DeFi agent","prompt":"I want to swap 100 USDC on Base — can you check if my wallet 0xABC...123 has approved the router contract to spend that amount, and if not, give me the approval transaction to sign?"},{"title":"Automated on-chain workflow gating","prompt":"Before my agent submits the on-chain order, check whether the required token allowance is already in place for my address on Base, and return any approval transaction needed so I can sign it first."},{"title":"Token allowance audit before contract interaction","prompt":"Check if my wallet has enough ERC-20 allowance approved for the lending protocol contract on Base — if the current allowance is below 100,000,000 units, give me the unsigned approve transaction."}],"resultDescription":"Returns a JSON object indicating whether the current allowance is sufficient (approved: true/false), the required token amount, the current allowance, and if approval is needed, a fully-formed unsigned transaction object (to, data, value, chainId) that the agent or user can sign and broadcast to grant the necessary token allowance.","failureModes":["Invalid or missing wallet/token address returns an error","Unsupported chain ID may cause resolution failure","Malformed request body returns 400-level error","RPC node unavailability may cause timeout or 5xx","Insufficient USDC payment (below $0.005) results in 402 Payment Required"],"whenToPreferThis":"Use this endpoint when an AI agent needs to pre-flight check token approvals before executing an EVM transaction on Base, especially in automated DeFi workflows where the agent must determine whether a signing step is required before proceeding. It is ideal when you need an unsigned, ready-to-sign approval transaction returned programmatically rather than constructing ERC-20 calldata manually. Prefer this over generic RPC calls when you want intent-level resolution rather than raw contract interaction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:37:56.891Z","isFirstParty":false}