Am I charged if an x402 API call fails?

Agents · 6 min read · last reviewed 2026-11-12

It depends on the seller, because x402 itself has no refund rule. In our shop the rule is simple: a payment is settled only when our answer is below 400. Any error answer is not settled, so no money moves. There is one exception, for long jobs, and a few cases where a result you dislike is still a paid result. All of them are below.

Your signature alone does not move money. The seller, through a facilitator, has to settle it. So the question to ask of any x402 seller is: at what moment do you settle? Some settle before doing the work and some after. Our errors and charging page sets out our answer in full, and this guide is the readable version.

The order of events in a quick call

  1. Your client sends the request with a signed payment.
  2. We ask the facilitator to verify it. Nothing has moved yet.
  3. We run the tool.
  4. If the answer is a success, we settle the payment and return the result. If it is an error, we do not settle, and the signed payment is never used.

Error bodies say so directly, for example {"error": "...", "message": "...", "charged": false}. If you are new to the flow, what x402 is covers the basics.

The exception: long service jobs

Quick tools answer within the request. Long jobs cannot, so they work differently, and this is the case to read carefully:

  • Services such as the site report, SEO article, content plan, fix plan and deep security scan answer 202 with a result_url.
  • The payment is settled when the job is accepted, not when it finishes.
  • If the job fails afterwards, there is no automatic on-chain refund. The failure is logged, the owner is alerted and the delivery shows status "error".

Polling the result_url is free. Results and links expire after 30 days. If a paid job failed, email hello@lordevo.com with the transaction hash and we'll review it, usually within 2 business days.

Successful answers you still pay for

A 200 answer means the tool did its job, even if the news is not what you wanted:

  • A dead link is an answer. link-check reporting a 404 at the target has worked, so the $0.0021 applies.
  • An invalid email is an answer. The same goes for an email-validate verdict of "invalid".
  • A partly failed batch is paid in full. page-markdown-batch ($0.005) reports an error for each URL it cannot read, and is free only if every URL fails.
  • Partial bundles can be charged. domain-intel flags a failed part and is not charged only if fewer than 2 parts succeed.
  • A repeat is a new purchase. Some answers are cached for a few minutes. If your agent pays again for the same input, you pay again, even if the answer comes from the cache.

What to do with each error

None of these cost anything, but retrying blindly wastes time. Teach your agent the difference.

  • 400 or 422: bad or unusable input. Fix it, and do not retry as it is.
  • 402 after you paid: the payment was not accepted. Check the USDC balance on Base, the amount and the network, then sign a new payment.
  • 403: usually robots_disallowed. The site does not allow our fetch, so pick another URL.
  • 409 payment_in_use: the same signed payment was sent twice at once. Do not send copies in parallel. Make a new call with a new payment.
  • 429 or 503: busy or at a limit. Wait for Retry-After seconds and retry once.
  • 502: the target site or a backend failed, or the facilitator could not check your payment in time. Retry later.
  • 504: the target took too long. Retry later or use a lighter target.

Can I be charged twice?

Not for one signed payment. One signature pays for one call: a copy sent at the same moment gets the 409 above, and a payment already settled cannot be settled again. There are no idempotency keys, though, so two separate payments are two purchases. If your client times out and signs a new payment for the same call, both can go through. Treat a timeout as "unknown", and check the wallet history before you pay again for anything expensive.

The rare bad case is a settled payment whose answer never reaches you, for example because the connection dropped. We do not have an automatic refund for that. If a paid job failed, email hello@lordevo.com with the transaction hash and we'll review it, usually within 2 business days.

Questions to ask any x402 seller

Everything above describes our shop. Other sellers will differ, and the protocol does not force any of this on them. Before your agent spends much with a new seller, look for answers to these:

  • Do you settle before or after doing the work?
  • Which answers count as a charge? Is an empty result or a partial result a paid one?
  • What happens if a long job fails after you have been paid?
  • Is there a way to reach a person, and do you refund?
  • Do you publish your error codes and limits?

If a seller's documentation answers none of these, keep your spending there small until you have seen how it behaves.

How to waste less

  • Use the free preflight first. It says whether a paid fetch tool would work on a URL: reachability, robots.txt, type and size. You get 30 per IP address per UTC day.
  • Use the free trial to confirm a tool's output suits you before paying.
  • Keep retries in your budget. How to limit what an agent can spend shows how.
curl "https://shop.lordevo.com/api/free/preflight?url=https://example.com&tool=page-markdown"

Questions

Does x402 have refunds?

Not as part of the protocol. A settled USDC payment is final on chain, and any refund would be a separate payment made by the seller. So what matters is when the seller settles, and what they promise.

What does "charged": false mean?

It means the shop did not settle your payment for that request. Your signed authorisation goes unused and no USDC leaves your wallet.

Am I charged if the website I am checking is down?

If the tool answers with an error, such as a 502 or 504, no. Tools whose job is to report status, such as http-ping and link-check, answer normally with the site marked as down, and that is a paid answer.

What if the shop is busy?

You get a 503 with Retry-After. Where possible this is checked before the 402, so you are not asked to pay for something that cannot run right now.

Try a pay-per-call tool

Web, domain and data checks for agents over x402, in USDC on Base. No account and no API key. Prices and inputs for every tool are in the catalogue.