For AI agents
x402 vs AP2: two agent payment protocols, and what both leave out
x402 and AP2 answer different questions. x402 answers "how does software pay for this request?" by settling a stablecoin payment inside an HTTP exchange. AP2 answers "who authorised this purchase?" with signed mandates that travel with the payment. Neither says what happens when the purchase turns out to be wrong. That part, recourse, has to be added.
Side by side
The two are often mentioned together because both are about agents paying. They sit at different layers.
| x402 | AP2 | |
|---|---|---|
| What it is | A way to pay over HTTP using the 402 Payment Required status | The Agent Payments Protocol: a way to prove what a person authorised an agent to buy |
| Question it answers | How is this request paid for? | Who approved this purchase, and on what terms? |
| Core object | A signed stablecoin payment attached to a request | A chain of signed mandates: the intent, the checkout and the payment |
| Money it moves | Stablecoins, settled on-chain | None by itself; it works with cards, bank transfers and stablecoins |
| Best at | Small, instant payments between machines | Purchases made for a person, where proof of consent matters |
| After settlement | Final. No refund or dispute step | A receipt that says success or error. No dispute step |
What x402 does
A server that wants paying answers a request with status 402 and a price. The client signs a stablecoin payment, attaches it and repeats the request. The payment settles on-chain and the server responds with what was bought.
There are no accounts, no API keys and no invoices, which is why it suits an agent paying a fraction of a cent for an API call. The payment is final when it settles. x402 refunds covers what that means in practice.
What AP2 does
AP2 does not move money. It standardises the evidence around a payment: signed mandates recording what the person asked the agent to do, the checkout they approved and the payment that followed. A merchant or a payment provider can check those and know the agent was acting with authority.
It is payment-method neutral. The mandates can accompany a card payment or a stablecoin transfer. What AP2 produces at the end is a receipt of what happened.
What neither defines: recourse
Both protocols end at settlement. x402 has paid the seller. AP2 has recorded who authorised what. If the agent bought the wrong thing, or the seller never delivers, neither gives the person a window to reconsider.
Card payments solve this with chargebacks, at a cost to sellers. A stablecoin payment has no chargeback. The alternative is to make the payment wait: put the funds in a contract that pays the seller on an agreed date unless the buyer disputes first.
That is what Stabledrop adds. It takes a payment, holds it in a non-custodial payment contract on Base for a stated period, and signs a statement of what happened in the AP2 receipt format, so an AP2 verifier can read the result unchanged. A dispute freezes the funds, and they are released when any two of the buyer, the seller and the Third Voter agree on a split.
A worked example
A research agent is asked to commission a market report from a freelance analyst for $600.
- Along the way it pays for data. It queries three paid APIs at a cent or two per call. x402 suits this: the amounts are trivial and each response is delivered as it is paid for.
- It carries proof of its instructions. The mandates say the person asked for a report on this subject, up to this budget. That is AP2's job, and it lets the analyst trust that the agent is acting for somebody.
- It pays the analyst. This is the payment that could go wrong: $600, a stranger, and delivery a week away. Sent directly, the money is gone whether or not the report arrives. Sent as a protected payment, it is committed to the analyst today and released on the payout date, unless the person disputes first.
Three different jobs, and no single protocol does all of them.
Which to use
- Paying per request, in tiny amounts, between machines: x402.
- Proving a person authorised a purchase: AP2, with whichever payment method suits.
- A purchase a person would want to check before the seller is paid: a payment with a dispute window, which is what Stabledrop provides for agents.
They combine. An agent can carry AP2 mandates, pay small costs with x402 along the way, and settle the purchase itself as a protected payment.
Questions people ask
Is AP2 a competitor to x402?
No. AP2 is about authorisation and evidence, and x402 is about settlement. A stablecoin payment made under AP2 can be settled the same way an x402 payment is.
Who is behind each protocol?
x402 was started by Coinbase and is developed in the open. AP2 was published by Google with partners from the payments industry. Both are open specifications.
Can a payment made under x402 or AP2 be disputed?
Not through either protocol. A dispute needs the funds to still be somewhere they can be frozen, which means paying into a contract with a payout date in place of paying the seller directly.
Does Stabledrop implement AP2?
It produces AP2 receipts. It settles a payment into a contract with a dispute window and signs the result in AP2's receipt format. It does not verify mandates; a caller that has them remains responsible for checking them.
What is an AP2 mandate?
A signed statement of consent. One records what the person asked for, another the checkout they approved, another the payment. Together they show the agent did what it was told.