Answers · agent payments
Our AI agent pays APIs with x402. Yesterday it paid for a report the endpoint never delivered, and the seller says x402 payments can't be refunded. Is that true, which x402 payment schemes let a seller give money back, and what should we look for before our agent pays?
Last updated
TL;DR: It depends on the scheme the seller offers. The x402 exact scheme moves a fixed amount once and its specification defines no refund: any remedy is the seller's own arrangement. What protects the buyer under exact is the payment flow. In the default authorization flow the payment settles only after the seller's handler succeeds, so an error leaves the client uncharged; in the upfront flow the payment commits first, so an error can leave you charged with nothing delivered. The upto scheme caps the charge at a signed maximum and may settle zero, but also defines no refund. Two schemes do return money: auth-capture lets the seller void a hold, capture less than the maximum or refund after capture until a refund deadline, and lets the buyer reclaim a hold the seller never captured; batch-settlement lets the seller refund unclaimed channel funds and gives the buyer a timed withdrawal. In both, a refund is started by the seller's side, not by the buyer. Before your agent pays, read the scheme and payment flow in the 402 response and prefer exact with the authorization flow, or auth-capture, for anything you may need back.
What should I check, step by step?
1. Read the scheme field in the seller's 402 response before paying. exact and upto define no refund; auth-capture and batch-settlement define ways to return funds.
- For exact, prefer the authorization payment flow. The x402 spec says clients SHOULD choose it when both are offered, because the payment settles only after the seller's handler succeeds.
- Treat an exact payment in the upfront flow as final. If the handler errors after settlement, the spec says any remedy is the seller's own arrangement, so ask the seller directly and keep the transaction reference.
- Use upto for metered calls when you want a hard ceiling: the settled amount must be at or below the signed maximum and may be zero, but nothing comes back once it settles.
- For purchases you may need to undo, look for auth-capture and note its two deadlines: captureDeadline (after which you can reclaim an uncaptured hold yourself) and refundDeadline (the last moment the seller can refund).
- Don't expect the buyer to trigger an auth-capture refund. capture, void and refund are not client-authorized; only reclaim of an uncaptured hold is yours to call.
- With batch-settlement, know that refunds of unclaimed channel funds come from the seller's side, and your own way out is a timed withdrawal that waits out the channel's withdrawal delay (15 minutes to 30 days).
- Record every x402 payment your agent makes with the scheme, flow, amount, payTo and settlement reference, so a refund request names exactly which payment it is about.
Can you get a refund on an x402 exact or upto payment?
The exact scheme transfers a specific amount the seller knows in advance. By default it uses the authorization flow: verify, run the resource, then settle. The specification says authorization SHOULD be preferred, and clients SHOULD choose it when a resource offers both, because the payment commits only after the resource handler succeeds, so a handler error leaves the client uncharged.
- exact MAY also use the upfront flow, which settles before the resource runs. The spec is plain about the cost: a handler error then leaves the client charged with nothing delivered, "this specification defines no refund, and any remedy is the resource server's own arrangement."
- The upto scheme authorizes up to a maximum and settles the actual amount once the resource has run. The settled amount MUST be at or below the authorized maximum and MAY be zero, each authorization settles at most once, and it can't use upfront. It defines no refund either, so its protection is the ceiling and the zero-charge option, not money coming back.
How do x402 auth-capture refunds, voids and reclaims work?
The auth-capture scheme (v1.1, August 18, 2026) has the client authorize a maximum, after which the payment has a lifecycle. In the escrow flow, the scheme's default, authorize places a hold before the resource runs; afterwards the seller can capture (repeatable up to the held total) or void the rest, and refund later. In the authorization flow there is no hold: the seller charges after the resource runs and can refund later.
- refund returns captured funds and is repeatable up to the amount captured and not yet refunded, until refundDeadline. reclaim is the client's own escape hatch: once captureDeadline passes with the hold uncaptured, the client recovers it without the seller or facilitator. The spec's comparison table puts it simply: exact is not reversible, auth-capture is, with void before capture, refund after and reclaim by the client.
- charge amounts, capture, void and refund are not client-authorized; the seller's side consents to them. In the EVM binding, refund liquidity is pulled from the payment's operator through a refund collector, and a facilitator must not become an unexpected source of value, so a refund depends on the seller's side funding it before the refund deadline.
How do refunds work in x402 batch-settlement channels, and what should an agent check before paying?
The batch-settlement scheme on EVM is a payment channel for repeat buyers. The seller (receiver or its receiverAuthorizer) can make a cooperative refund of up to the channel balance minus what has been claimed, directly or with a signature that anyone can relay.
- The buyer's escape hatch is a timed withdrawal: the payer starts it, the seller can still claim outstanding vouchers during the grace period, and after the channel's withdrawal delay (between 15 minutes and 30 days) the payer finalizes it and gets back whatever unclaimed funds remain.
- So the useful check happens before the agent pays: which scheme, which flow, what deadlines. If the answer is exact with upfront, the payment is final unless the seller chooses to help. If you need recourse, set your agent's x402 policy to pay only under schemes and flows that give it, and keep a record of each payment outside the agent so a dispute names the exact settlement.
How do I ask Rightshold about this (free, no key)?
Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then ask: “Our research agent paid 0.40 USDC under x402 exact (upfront flow) for a report from api.example.com and got an error, no report. Record what was paid, under which scheme and flow, and the settlement reference, so our refund request to the seller names this exact payment.”
{
"tool": "record_action",
"arguments": {
"action_type": "agent.payment_disputed",
"outcome": "failure",
"occurred_at": "2026-11-24T19:00:00Z",
"client_event_id": "x402:research-agent:report-0412",
"summary": "x402 exact (upfront flow) payment of 0.40 USDC on Base to api.example.com for /v1/report; handler returned an error after settlement and no report was delivered; settlement tx 0x... ; refund requested from the seller by email",
"action_sha256": "<sha256 of the 402 response, payment payload and settle response>"
}
}- Needs your API key (or accept_terms:true once to open a free account; the key comes back once). It returns a ledger-committed receipt of what you submitted and when, kept outside the agent.
- It proves the entry was recorded, not that the seller owes or will send a refund. It doesn't read the chain or the seller's API; the hash ties the receipt to the exact payment records you hashed.
- REST, free: POST /v1/x402/price-tag decodes a 402 response so you can see the scheme, amount, token, network and payTo before your agent pays.
Rightshold isn't affiliated with the x402 Foundation, any facilitator or any seller, and can't see or reverse x402 payments. Scheme behavior is as the x402 specifications on GitHub (exact, upto, auth-capture v1.1 with its EVM binding, and batch-settlement EVM) read on November 24, 2026; they can change, and a seller's or facilitator's implementation may differ. Not legal or financial advice.
What are the sources?
- x402 specification: exact scheme (payment flows and refunds)
- x402 specification: upto scheme
- x402 specification: auth-capture scheme (v1.1)
- x402 specification: auth-capture EVM binding (refund funding)
- x402 specification: batch-settlement EVM (refund and withdrawal)
Related
- How to read an x402 402 Payment Required response as a price
- How to set per-request and per-run spend caps for x402 agent payments
- How to stop an AI agent from paying twice when it retries
- Can you dispute a purchase your AI agent made with your card?
Not legal advice. JSON · Markdown · All answers
Get a free API key in one call
No card and no email needed. 100 free credits; the license and policy checks stay free without a key.
curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_... # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
-H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'
