# An AI agent can’t pay (/docs/troubleshooting/agent-cant-pay)

{/* Generated by scripts/gen-troubleshooting.mts from lib/troubleshoot.ts. Edit those, not this file. */}

**Symptom:** Your agent gets a 402 it can’t satisfy, or its payment is rejected.

## Why this happens [#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 [#walk-through-it]

Answer one question at a time. The first **no** is almost always the cause.

<Diagnose guide="agent" />

## Check these in order [#check-these-in-order]

### 1. Does the first request return a 402 with an accepts list? [#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/&lt;swop.id&gt;. See [Store listing](/docs/agent-payments/store-listing).

### 2. Are you paying the offer with scheme exact on network eip155:8453 (USDC on Base)? [#2-are-you-paying-the-offer-with-scheme-exact-on-network-eip1558453-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](/docs/agent-payments/facilitator-and-networks).

### 3. Does the wallet hold enough USDC, and does the signed authorization match the 402 exactly? [#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](/docs/agent-payments/pay-from-an-agent).

### 4. Are you sending the payment in the PAYMENT-SIGNATURE (or X-PAYMENT) header? [#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? [#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](/docs/agent-payments/pay-from-an-agent).



## Still stuck? [#still-stuck]

Email [support@swopme.co](mailto: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.
