An AI agent can’t pay
Your agent gets a 402 it can’t satisfy, or its payment is rejected.
Symptom: Your agent gets a 402 it can’t satisfy, or its payment is rejected.
Why this happens
AI agents pay for Swop products with x402, a standard built on HTTP's "402 Payment Required". The agent asks for the product, Swop answers with a 402 that says exactly what to pay (USDC on Base, to whom, how much), the agent signs that payment and asks again, and gets the product and a receipt. The agent pays no gas. If anything in the signed payment doesn't match the 402, it's rejected.
Walk through it
Answer one question at a time. The first no is almost always the cause.
Does the first request return a 402 with an accepts list?
How to check: GET the product’s buy URL from the store listing without a payment header.
Check these in order
1. Does the first request return a 402 with an accepts list?
How to check: GET the product’s buy URL from the store listing without a payment header.
If not: If you get 404 or HTML, use the buyUrl from /api/v5/x402/store/<swop.id>. See Store listing.
2. Are you paying the offer with scheme exact on network eip155:8453 (USDC on Base)?
How to check: Pick the accepts entry for Base. Other networks aren’t accepted for Swop products.
If not: Sign the Base USDC offer. See Facilitator and networks.
3. Does the wallet hold enough USDC, and does the signed authorization match the 402 exactly?
How to check: “Payment verification failed” means the amount, payTo, chain ID or USDC contract differs, validBefore has passed, or the balance is too low.
If not: Top up USDC on Base, sign again from the fresh 402, and retry promptly. See Pay from an agent.
4. Are you sending the payment in the PAYMENT-SIGNATURE (or X-PAYMENT) header?
How to check: Base64-encoded JSON of the signed payment. Swop accepts both header names.
If not: Send it in one of those headers on the retry.
5. Did the retry return 200 rather than a settlement error or 400 missing?
How to check: “Payment settlement failed” means the transfer couldn’t be submitted. A 400 with missing means options or shipping details are needed.
If not: Settlement: retry with a fresh nonce. Missing: send the X-ORDER header with the options or shipping details. A 200 with duplicate: true means it already settled; nothing was charged twice. See Pay from an agent.
Still stuck?
Email support@swopme.co with your swop.id, roughly when it happened, and any order, checkout or request ID. Never send your secret key. You can also use the Ask button on any page.