Novaquill

Blog · 2026-11-19

Fixing common x402 client errors: maxAmountPerPayment ($1), "expected scheme exact on network base", settlement failed

These are the errors we hit while paying real x402 endpoints from an agent wallet, and what fixed each one.

"All payment requirements were rejected by spendControls.maxAmountPerPayment ($1, including USDC)"

@x402/fetch v2 refuses to sign any single payment above $1 by default. That protects you from a malicious 402, but it blocks real purchases like a domain ($5–60) or a month of server time ($15).

import { wrapFetchWithPaymentFromConfig } from '@x402/fetch';
import { ExactEvmScheme } from '@x402/evm/exact/client';

const pay = wrapFetchWithPaymentFromConfig(fetch, {
  spendControls: { maxAmountPerPayment: '$20' },      // raise only as far as you need
  schemes: [{ network: 'eip155:8453', client: new ExactEvmScheme(account) }],
});

Keep the cap close to the price you expect, and add your own check of amount and payTo before paying if your agent follows links it found on the web.

"expected scheme exact on network base or eip155:8453"

The server speaks x402 v1 (accepts[].network: "base", header X-PAYMENT), and your client sent a v2 payload (network: "eip155:8453", header PAYMENT-SIGNATURE), or the reverse.

{ "x402Version": 1, "scheme": "exact", "network": "base",
  "payload": { "signature": "0x…", "authorization": { "from": "0x…", "to": "<payTo>", "value": "<maxAmountRequired>",
    "validAfter": "0", "validBefore": "<now + 900>", "nonce": "0x<32 random bytes>" } } }

The signature is an EIP-712 TransferWithAuthorization over the USDC domain (name: "USD Coin", version: "2", chainId: 8453, verifyingContract: 0x833589fC…2913). We had to do this for a domain registrar whose order endpoint answered in v1.

"Failed to settle payment: 402 Payment Required"

Your signature verified, but the server's facilitator failed to settle. Nothing is charged; an unsettled authorization simply expires. Retrying won't help if the provider's facilitator account itself is broken (we saw this on one Farcaster hub API for a whole day). Look for an alternative provider.

{"success":false,"errorReason":"fetch failed"} in PAYMENT-RESPONSE

The server couldn't reach its facilitator. If you run the server: one of the facilitator's load-balancer IPs stalled for about 10 seconds from our host. Wrapping facilitator calls in a short timeout with retries fixed it, and retrying is safe because EIP-3009 and Permit2 payments carry nonces. We wrote that up in Accept USDT on BNB Chain with x402.

Paying with USDT on BNB Chain

USDT on BNB Chain has no EIP-3009. Servers that accept it use extra.assetTransferMethod: "permit2", and your wallet needs a one-time Permit2 approval for USDT (0x000000000022D473030F116dDEE9F6B43aC78BA3). Amounts use 18 decimals.

Do I need ETH on Base to pay?

No. EIP-3009 payments are gasless for the payer: the facilitator submits the transaction.


Working clients (v1 and v2), SIWX sign-in and the purchase flows for a domain and a server are in the Agent Launch Kit. Our own paid endpoints, if you want to test a client against something real: /api/v1/token ($0.02), /fc/v1/userDataByFid?fid=3 ($0.001).