Is x402 safe to use?
Short answer
The protocol limits what a payment can do. Each signature authorizes one transfer of one amount to one address for a short time, and the facilitator cannot change it or hold your funds. The real risks are around it, not in it. Payments are final, a seller can deliver something worthless, and an AI agent holding a funded key can be tricked into spending.
What the protocol protects you from
With the standard exact scheme on EVM networks, the buyer signs a message that says: move this exact amount of this token to this address, valid only between these two times, with this one-time number.
That gives four built-in limits:
- The amount is fixed. The specification states the facilitator cannot modify the amount or the destination.
- It works once. The one-time number means the same signature cannot be used for a second transfer.
- It expires. Outside its time window the authorization is worthless. The offer's
maxTimeoutSecondssets how long that window is. - Nobody else holds your money. The facilitator "does not hold funds or act as a custodian". The transfer goes from your wallet to the seller.
A seller never receives your private key or any standing permission to take more.
What it does not protect you from
Payments are final. A settled exact payment is a completed token transfer. There is no card-style chargeback. Refunds happen only if the seller chooses to send one. (The auth-capture scheme defines holds and refunds, but it is not yet widely available.)
You may not get what you paid for. x402 moves the money. It does not judge the quality of the answer. A dishonest or broken endpoint can take a payment and return nothing useful.
The price is whatever the server says. A client that pays any 402 it sees will pay a wrong or hostile price. Good clients let you set a maximum.
Agents can be manipulated. An AI agent that reads web pages and also holds a funded wallet can be talked into spending by text it reads. This is a risk of the agent, not of x402, but x402 is what makes the spending possible.
Keys can leak. A private key in a config file, a log or a chat window is a lost wallet.
Sensible habits
- Use a dedicated wallet for paying APIs, with a small balance. Top it up as needed. Its balance is your worst-case loss.
- Set a price ceiling per request, and a budget per day if your client or wallet supports one.
- Check before you pay. The 402 checker shows the price and recipient of any endpoint without paying.
- Prefer sellers you can identify, with documentation, a named operator and published terms.
- Keep keys out of prompts and chats. Load them from the environment or use a managed wallet with signing rules.
- Start on a test network. Base Sepolia and Solana Devnet use tokens with no value.
For sellers
The default flow is verify, deliver, then settle. A buyer's funds can move between verification and settlement, so a payment that verified can still fail to settle. Decide whether that small risk is acceptable for your prices, or use the upfront flow, which settles before delivering.
Screening
Some facilitators run sanctions and transaction screening and may decline a payment. That is a property of the facilitator, not of the protocol.
Sources
- The exact scheme on EVM networks
- Facilitator concept, x402 documentation
- x402 version 2 specification
- Schemes overview, x402 documentation
Facts checked against these sources on . Protocols change, so the official specification wins if it disagrees with this page. Read this page as Markdown.
Related questions
Who writes this. Ask402 is published by Havok Holdings LLC, which also runs Agent402, one of the x402 services covered here. Agent402 is labelled wherever it appears. Everything else is described from each project’s own documentation, and nobody pays to be listed.