{"uid":"cap_RcsVI4EM08uQtqzmBe8bO","slug":"x402-payment-route-optimizer-01253e3f","name":"x402 Payment Route Optimizer","description":"Takes what the caller holds and what the seller accepts and works out which combinations can settle the amount. All costs are brought into USD, otherwise no comparison is possible: gas on the source chain plus, where needed, the cost of a swap or a bridge. Routes that require a swap or a bridge are marked explicitly - they often look cheaper on paper and are slower and riskier in practice. Every assumption is named in assumptions; nothing is folded in silently. Limits: gas costs are ORDERS OF MA","url":"https://x402.halowerk.com/route/optimize?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"priority":{"enum":["guenstig","schnell","sicher"],"type":"string","default":"guenstig","description":"Which ranking to put first. All three are always returned."},"available":{"type":"array","items":{"type":"object","required":["chain","asset","balance"],"properties":{"asset":{"type":"string","description":"Asset address or symbol."},"chain":{"type":"string","description":"CAIP-2 chain, for example eip155:8453."},"balance":{"type":"number","minimum":0,"description":"Balance in USD equivalent."}},"additionalProperties":false},"maxItems":30,"minItems":1,"description":"What the caller holds."},"amount_usd":{"type":"number","minimum":0.000001,"description":"Amount to be paid, in USD."},"accepted_by_seller":{"type":"array","items":{"type":"object","required":["chain","asset"],"properties":{"asset":{"type":"string"},"chain":{"type":"string"},"scheme":{"type":"string","description":"Payment scheme, usually exact."}},"additionalProperties":false},"maxItems":30,"minItems":1,"description":"What the seller accepts."}}},"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_EccCRVPvKdRL8XwyIXwsB","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":"Determines which token/chain combinations a buyer holds can settle a given payment amount to a seller, computing all-in USD costs including gas, swap, and bridge fees, with explicit route classification.","exampleAgentPrompt":"I hold USDC on Base and ETH on mainnet — can you figure out which combination is cheapest to settle a $5 x402 payment to a seller who accepts USDC on Base or ETH on Ethereum, including all gas costs, and flag any routes that need a swap or bridge?","exampleUseCases":[{"title":"Cheapest route for multi-chain wallet","prompt":"I have ETH on mainnet, USDC on Base, and some MATIC — which of these is the cheapest all-in way to settle a $2 x402 payment to a seller who accepts USDC on Base or USDC on Polygon, factoring in gas and any swaps needed?"},{"title":"Avoiding bridge risk on a payment","prompt":"Before I pay this x402 endpoint, tell me which of my holdings can settle $10 without needing a bridge or swap — I want direct routes only, and show me the estimated gas cost in USD for each."},{"title":"Agent auto-selecting optimal payment token","prompt":"My agent wallet has WETH on Arbitrum and USDC on Base. Work out every possible way to pay a $0.50 x402 charge to a seller accepting USDC on Base or ETH on mainnet, rank them by total USD cost including gas, and mark which ones involve a bridge."}],"resultDescription":"A list of feasible settlement routes, each with the token and chain combination, total all-in cost in USD (gas + optional swap/bridge fees), a route type label (direct, swap-required, or bridge-required), and a named assumptions block explaining every cost estimate used. Routes requiring swaps or bridges are explicitly flagged as slower and riskier despite potentially lower paper cost.","failureModes":["No feasible route found if buyer holds no tokens the seller accepts and no swap/bridge path exists","Gas cost estimates may be orders of magnitude off for unusual chains or congested conditions (noted in description as a known limit)","Stale price feeds could cause incorrect USD normalization","Missing or malformed buyer holdings or seller acceptance list returns an error","Unsupported chain combinations may not produce bridge cost estimates"],"whenToPreferThis":"Use this endpoint when an AI agent or wallet needs to automatically select the optimal token and chain to settle an x402 payment, especially when the buyer holds multiple tokens across multiple chains and cost minimization matters. Prefer this over manual route selection when swap or bridge paths are in play and the agent must transparently surface all-in costs and risks before committing to a payment.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T00:39:05.013Z","isFirstParty":false,"canonicalSlug":"x402-payment-route-optimizer-01253e3f"}