402 Clinic

Your x402 payment failed and the only feedback was a bare 402? Paste the broken payload — the clinic tells you exactly what is wrong and how to fix it. Free. No payment, no signup.

Try it

API

POST https://api.mekongtradeintel.com/clinic/diagnose
Content-Type: application/json

{ "payload": <object | base64 string>, "endpoint": "tokenprice" }

Response: { ok, class, explanation, fix_steps, corrected_template, checked_against } — the corrected template is a ready-to-sign payload for this fleet: network eip155:8453 (Base), asset USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, payTo 0x198f3895551B309fF5C5F59e690FB0823d10EA93.

Error classes

ClassMeaning
expiredThe authorization's validity window has passed (or has not started). The #1 killer: a 300-second window plus clock skew.
wrong-networkSigned for a chain other than Base mainnet (eip155:8453).
wrong-assetThe payment asset is not USDC on Base.
wrong-payeeauthorization.to / accepted.payTo is not the seller's address.
amount-mismatchauthorization.value differs from the amount in the 402 requirements (atomic units, 6 decimals).
malformedNot valid JSON/base64, missing authorization fields, or no signature.
unknownStructurally valid — the failure is facilitator-side (balance, nonce reuse, EIP-712 domain). The response lists what to check.

Built by Mekong Trade Intelligence — pay-per-call APIs for AI agents, settled in USDC on Base. Discovery: openapi.json · /.well-known/x402