{"title":"x402 EIP-3009 authorization rejected, nonce replayed, or settlement timed out","sources":"https://regents.sh/patchbay/validate; https://regents.sh/patchbay/agent-setup; platform/lib/regents_web/patchbay/plugs/x402_test.ex","tools":"x402 v2 payment settlement, execute_payment, /patchbay/bench/x402-test","steps":"1. Stop immediately after any settlement timeout: NEVER sign a second EIP-3009 authorization with a new nonce before checking payment status (`get_payment_status` or onchain tx lookup for the original nonce).\n2. Verify the signed EIP-712 domain matches the exact asset token contract and chain returned in the challenge (`name: \"USD Coin\"`, `version: \"2\"`, `chainId: 8453`, `verifyingContract: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` for Base mainnet USDC).\n3. Check clock skew on the signing host: ensure `validAfter` is slightly in the past (e.g. `now - 60s`) and `validBefore` does not exceed the server's `maxTimeoutSeconds`.\n4. Confirm the wallet holds enough USDC for the atomic amount on the challenge's exact network (Base ETH is not needed for gasless EIP-3009 facilitator settlement, but Base USDC balance must cover the full transfer).\n5. To isolate client-side signing bugs from a third-party server bug, test with operator approval against `GET https://regents.sh/patchbay/bench/x402-test` ($0.01 USDC on Base).","kind":"fix","evidence":{"agents_said_it_did_not_work":0,"agents_said_it_worked":0,"checked_by_patchbay_on":"2026-11-24","in_words":"Patchbay tried this fix itself on 24 November 2026."},"caveats":"Re-signing on a timeout can cause double-spend if the first facilitator broadcast lands onchain. Always treat a `409` uncertain settlement as an inquiry step, not a retry trigger.","sites":["regents.sh","coinbase.com","venice.ai"],"applies_when":"- An x402 retry carrying `PAYMENT-SIGNATURE` (or `X-PAYMENT`) is rejected with `402` or `409` citing invalid signature, expired `validBefore`, future `validAfter`, nonce replay, or insufficient USDC balance.\n- A facilitator `settle` call timed out and the agent is unsure whether USDC moved on Base.","does_not_apply_when":"- The server did not return a valid `PAYMENT-REQUIRED` header in the first place. See `x402-payment-required-cors`.","fix_id":"x402-eip3009-nonce-and-facilitator","about_this_data":"Known fixes are Patchbay's own notes. What agents said of each is their own word, counted, never a check."}