Guides › For people building agents
Your agent paid an x402 API and got nothing back: what to do
Published 24 November 2026. The figures come from our own purchases with real USDC, checked against Base: correction #26 (audit of 7 October 2026) and report #7. The protocol details were checked against the x402 specification on the date above.
Your agent called a paid API, attached a payment, and got back an error, a timeout, a second payment request, or an answer that is not what was promised. The first question is not “why”. It is “was the money taken?”, because the answer decides whether a retry is safe and whether there is anything to recover.
Usually it was not. In our own records, most failed purchases never moved any money. But about one in five did, and an agent that simply tries again can pay twice.
Why a failed call often costs nothing
With x402, your agent does not send money when it calls. It signs a payment authorization and sends it with the request. The seller’s server then has that authorization settled on chain, usually through a facilitator. If the server fails before it settles, the authorization is never used and nothing moves.
When we audited every purchase in our log that had a signed payment attached and still did not deliver, 651 in all, 127 had settled on Base and 515 had not (9 could not be checked). The response that came back does not tell you which: among 89 purchases that answered 405 Method Not Allowed after the payment was attached, at least 31 had settled. Some servers take the payment first and check the request afterwards.
Step 1: find out whether you were charged
Check in this order.
- Read the settlement header. A server that settles is meant to return a
PAYMENT-RESPONSEheader (X-PAYMENT-RESPONSEon older x402 v1 servers; over MCP it comes back asx402/payment-responsein the result’s_meta). It is base64-encoded JSON withsuccessandtransaction. A transaction hash there means the payment was sent to the chain: look it up. No header does not prove you were not charged; a server can settle and then fail before it answers. - Look on chain. Open the paying wallet’s address on a Base block explorer and look at its
token transfers, not its transactions: the facilitator sends the transaction, so it does not appear as one your
wallet sent. A USDC transfer to the seller’s payment address (the
payToin its 402), for the amount asked, just after the call, is your payment. - Wait for the deadline. In the common
exactscheme, the authorization your agent signed expires. The official x402 client sets the expiry to the moment of signing plus themaxTimeoutSecondsin the seller’s 402, so the 402 itself tells you how long to wait. Once the deadline has passed and no transfer from your wallet has appeared, nothing can be taken for that call any more.
Step 2: do not pay again until you know
A retry signs a new authorization, and that is a new payment. If the first one settled, you have now paid twice for one answer. So:
- Not charged, and the error says your request was wrong (a missing or invalid parameter, the wrong method): fix the request and try once more.
- Not charged, and the server refused the payment itself or wants more than payment: stop. Trying again will fail the same way.
- Charged, and nothing usable came back: stop. Do not retry. Go to step 4.
- Not sure yet: wait for the deadline in step 1, then decide.
Step 3: read what came back
Of the 651 failed purchases in our audit, 283 answered with a second 402, 101 with 404, 89 with 405, 55 with 401 and 53 with 502; 70 had other statuses. What each usually means for your agent:
- 402 again, after paying: the server did not accept the payment, or did not see it. Check whether it settled anyway, and never send the same request with a new payment just because it asked again.
- 400 or 422: the request was refused. Read the error body for the field it wants, and compare with the listing’s schema or example.
- 404 or 405: wrong path or wrong method, for example a route that only takes POST. Check the chain before fixing it: a 405 can come after the money.
- 401 or 403: the route wants something besides payment, such as a key or an account. Payment alone will not get you through.
- 500, 502, 503, a timeout or a dropped connection: the seller’s server failed. Check the chain before anything else: the server may have settled before it failed.
- 202 with a job or status link: not necessarily a failure. The work may still be running. Follow the link the answer gives, and do not pay again.
- 200 with something you did not ask for (empty, the wrong shape, stale data): the seller delivered something. Judge it against what the listing promised; if it falls short, it is a failed purchase too.
Step 4: if you were charged and got nothing
x402 payments are final: there is no chargeback built into the protocol, and a refund is up to the seller. We never handle the payment, so we cannot refund it either. What you can do:
- Keep the evidence: the transaction hash, the time, the URL, what you sent, and the status and body that came back.
- Ask the seller. Use the contact on their site or documentation, with the evidence. A seller can refund you, and one who hears about a broken route can fix it for the next buyer.
- Report it here. A report puts your outcome on the API’s public record, so the next agent that checks
it can see it. It costs nothing and needs no account. It must be signed by the wallet that paid, and we check it
against the payment on Base, so nobody can report a purchase they did not make. Every listing record carries a
report_outcomeblock with the exact message to sign. With viem:import { privateKeyToAccount } from "viem/accounts"; const account = privateKeyToAccount(PAYER_KEY); // the paying wallet const txHash = "0x...".toLowerCase(); // your payment const ok = false; // no delivery const message = "nohumans.directory report v1\nlisting_id: LISTING_ID" + "\ntx_hash: " + txHash + "\nok: " + ok; await fetch("https://api.nohumans.directory/v1/reports", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ listing_id: "LISTING_ID", ok, tx_hash: txHash, payer_signature: await account.signMessage({ message }) }), });A report counts toward the API’s ranking once three different paying wallets have reported it. Report the purchases that worked too (ok: true): they are evidence as well.
Next time: lose less
- Check before paying. If our latest purchase of an API failed, its record says so, and whether it would fail for every buyer or only for some requests. Before your agent pays an x402 API, check it explains the rules.
- Cap every payment at the most you would pay for one call, and keep the paying wallet small. Let your AI agent pay for APIs shows how.
- Send a complete request the first time. Use the listing’s example or schema, and its free sample where it has one. Many failures are requests the seller could not serve, and some sellers settle before they say so.
The prompt
Add this to your agent’s instructions, next to its rules for paying.
After any paid call that fails (an error, a timeout, a second 402, or an answer that is not what was promised): 1. Do not pay the same request again yet. A retry is a new payment. 2. Find out whether the first payment settled. Read the PAYMENT-RESPONSE header (X-PAYMENT-RESPONSE on older servers) for a transaction hash. If there is none, look on Base for a USDC transfer from our wallet to the seller's payTo just after the call. If the authorization's deadline has passed and there is no transfer, it did not settle. 3. If it did not settle and the error says our request was wrong (missing or invalid input, wrong method), fix the request and try once more. If it answered 402 again after we paid, or 401 or 403, stop. 4. If it answered 202 with a job or status link, follow that link. Do not pay again. 5. If it settled and nothing usable came back, stop and do not retry. Tell me the transaction hash, the URL, the status code and what came back. If I agree, report it with ok: false to https://api.nohumans.directory/v1/reports, signed by the wallet that paid (the listing's report_outcome shows the exact message). Never ask me for a wallet recovery phrase or private key.
Every record here is dated evidence of how an API behaved when we checked, not a guarantee, and a settled payment that bought nothing counts against an API whatever the cause. Definitions: methodology.
Sources: our signed purchase log, checked read-only against Base on 7 October 2026
(correction #26; the 405 figure is a lower bound, report #7); the x402 v2 specification, its exact scheme for EVM, and the official client
(@x402/evm 2.32.0), read 24 November 2026.
Your next step
- Building an agent that pays? Connect it and set limits, then check every API before it pays.
- Selling an API? Make sure it delivers, and settle only after you have served the answer.
Selling to AI agents: the series
- Build your first paid API for AI agents, with one prompt
- What AI agents are looking for, and where nobody serves them yet
- What x402 APIs charge, and what they earn
- Why paid APIs fail AI agents, and how to make yours deliver
- Selling files and async jobs to AI agents: audio, images, PDFs
For people building agents
- Before your agent pays an x402 API, check it
- Let your AI agent pay for APIs, without paying for broken ones
- Your agent paid an x402 API and got nothing back: what to do (you are here)