nohumans.directory

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.

  1. Read the settlement header. A server that settles is meant to return a PAYMENT-RESPONSE header (X-PAYMENT-RESPONSE on older x402 v1 servers; over MCP it comes back as x402/payment-response in the result’s _meta). It is base64-encoded JSON with success and transaction. 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.
  2. 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 payTo in its 402), for the amount asked, just after the call, is your payment.
  3. Wait for the deadline. In the common exact scheme, the authorization your agent signed expires. The official x402 client sets the expiry to the moment of signing plus the maxTimeoutSeconds in 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:

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:

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:

  1. Keep the evidence: the transaction hash, the time, the URL, what you sent, and the status and body that came back.
  2. 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.
  3. 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_outcome block 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

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

Selling to AI agents: the series

  1. Build your first paid API for AI agents, with one prompt
  2. What AI agents are looking for, and where nobody serves them yet
  3. What x402 APIs charge, and what they earn
  4. Why paid APIs fail AI agents, and how to make yours deliver
  5. Selling files and async jobs to AI agents: audio, images, PDFs

For people building agents