x402 Conformance

Prove your x402 payments can't double-credit, credit too early or credit on a broken answer, in one CI step.

Experimental. An open, Apache-2.0 set of conformance and safety checks for x402 facilitators and resource servers, on Solana and Base (EVM). It complements x402 and its facilitators and doesn't replace them. It never signs, pays or touches mainnet, and live and resource modes only send GET requests. Passing a check is evidence about one property; it doesn't certify conformance to x402.

Run it

GitHub Action. Save as .github/workflows/x402-conformance.yml:

name: x402 conformance
on: [push, pull_request]
jobs:
  x402:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: atsp-protocol/x402-conformance@v1
        with:
          facilitators: https://x402.org/facilitator   # GET /supported only

With no inputs it runs only the self-test of the suite, F1-F14 and S5. To test your own resource server, add resource-url (your paid route) and start (the command that starts your server, which receives X402_FACILITATOR_URL); servers on Solana devnet and Base Sepolia are graded. To check any paid URL's 402 answer, on any network, add resources. The Action fails closed: a requested check that can't run fails the job. It doesn't touch your job's Node. The Action writes JSON results, a SARIF 2.1.0 file for GitHub code scanning and a JUnit XML report; every failure links to its fix in docs/FIXES.md.

One command, nothing to install (with pipx or uv):

pipx run --spec x402-conformance x402conf live https://x402.org/facilitator
uvx --from x402-conformance x402conf resource https://your.api/paid
npx -y x402-conformance-svm probe --resource http://127.0.0.1:4020/paid --start "node server.js"

CLI (Python 3.10+, no dependencies):

pip install x402-conformance
x402conf live https://x402.org/facilitator   # S0-S4, GET /supported only
x402conf resource https://your.api/paid      # P1-P7, one unpaid GET
x402conf offline                             # F1-F14 and S5 against reference and fault-injected doubles
x402conf report --dir DIR --sarif out.sarif --junit junit.xml --badge badge.json

What it checks

idfails when
Live, read-only (GET /supported)
S0/supported doesn't answer HTTP 200 with JSON
S1the response is missing kinds, extensions or signers (V1-only facilitators are graded against V1)
S2a V2 network isn't written as a CAIP-2 ID
S3a Solana kind uses an old V1 name such as solana-devnet
S4a Solana exact kind has no valid fee payer (a fee payer that isn't a listed signer is a warning)
402 answers of any paid URL, one unpaid GET
P1-P7an unpaid request isn't answered 402, the PaymentRequired object is missing or doesn't decode, or accepts lacks a required field or the scheme's extra (EVM name/version, Solana feePayer), the PAYMENT-REQUIRED header is over 8 KB (warning) or 16 KB (error) (P6), or a non-authorization offer omits extra.paymentFlow (P7, warning)
Safety: against doubles, on devnet and in your resource server
F1a malformed payment is accepted instead of rejected
F2an underpayment or dust amount is accepted
F3the same payment is settled, or served, twice
F4a used memo or nonce is replayed in a new transaction
F5a payment counts as settled before it's confirmed, or settlement_pending comes without a transaction or a network
F6a facilitator timeout or garbage answer turns into a credit
F7a pending payment retried with the same body never reaches its final result, or is credited more than once
F8a payment that failed on chain stays "pending" instead of failing
F9a 503, an HTML page or a truncated /settle answer is credited, or the payment can't be retried
F10a payment is accepted under requirements it wasn't verified for (amount, asset, recipient or network)
F11/verify commits payment state: verifying twice consumes the payment (V2 §7.1)
F12/verify accepts, or refuses without a reason, a payment on a network the facilitator doesn't advertise or in an asset with no token contract
F13a payment in a different asset, at the quoted amount and recipient, is accepted (asset substitution)
F14a payment authorized for another network is accepted when amount, recipient and asset match (network substitution)
S5a facilitator's /supported lists no kinds, or a listed kind gets an exception, or isValid: false with no invalidReason, from /verify (graded on the built-in doubles; live sends only GET /supported)
R0-R10your resource server serves paid content under any of these faults, or omits PAYMENT-RESPONSE (probe in ts/, for servers on Solana devnet or Base Sepolia; a stock @x402/express server passes)
R11a payment for one request unlocks another on your server: the cheap route's payment on the dear one (R11a), an altered payTo, asset or network (R11b), the cheaper method (R11c) or query (R11d), an encoded separator or dot segment reaching a paid handler unpaid (R11e), or sign-in-with-x access recorded for the client's resource.url instead of the settled route (R11f)
R14your server, killed between a successful /settle and its response and restarted, settles the same payment again, asks for payment again, or refuses without naming the transaction or payment id. With --crash
R20a client that times out before /settle answers and retries pays twice for one request: a fresh payment under the same payment-identifier id is settled again (R20a), or a resent payment loses the result it paid for (R20b). With --retry
From code, since 1.5.0 (R17 to R19 since 1.6.0): functions exported by x402-conformance-svm, not run by the CLI or the Action
W1-W3a sign-in-with-x message signed for another site is accepted because Host or X-Forwarded-Host names it (W1), the same signed message signs in twice (W2), or a stale, future or expired message is accepted (W3)
R12, R13one payment-identifier id is settled more than once: by eight parallel requests (R12), or across two replicas (R13)
R15a paid request whose handler answers 5xx, redirects or throws is settled or gets a PAYMENT-RESPONSE
R16, R16aa paid HEAD gets a 2xx, a /settle call or a PAYMENT-RESPONSE (R16), or an unpaid HEAD doesn't get the 402 that GET gets (R16a)
D1a facilitator's /discovery/resources or /discovery/search answer misses V2 section 8 fields, or ignores limit or the network filter
G1an A2A agent's payment-required task isn't input-required with x402.payment.required, or asks for different requirements from the HTTP 402 it mirrors
R17a shared cache in front of the paid route serves the paid content to an unpaid request, because the paid response was not marked private or no-store and does not vary on the payment header
R18content is served while a settlement is pending, late or unanswered, or served twice after it is final, or a refusal hides the transaction
R19on an upfront or escrow offer the resource executes before the settle, or an unsupported flow is accepted
R21a Permit2 payment a third party settled first is granted although the server's own settle failed, or a spent Permit2 payment is granted again
R22the paid response loses the handler's 2xx status or headers: a 201 or a 202 is rewritten to 200
R23a client that disconnects while /settle is in flight is charged, and a resend of the same payment doesn't get the settled result or is charged again
R24a malformed PAYMENT-SIGNATURE (not base64, not JSON or not an object) gets a 5xx, a dropped connection or the content instead of 402 or 400
U1-U3an upto route settles more than the maximum the client signed (U1), reports another amount than it settled (U2), or offers the upfront flow (U3)
B1-B3a batch-settlement route serves a voucher it has already been paid with or no commitment identifier (B1), claims a channel more than once in a run (B2), or records a failed claim as claimed (B3)
X1, X2a paid MCP tool's unpaid call doesn't answer isError with the offer in structuredContent and content[0].text (X1), or a paid call gets the tool's result when /settle times out, answers broken, is pending, fails or is a duplicate (X2)
C1-C3your client hands a 402 to its caller as a success (C1), signs an offer outside its networks or above its maximum (C2), or pays the V1 offer when the 402 also carries V2 (C3)

Results

Live, 2026-10-20 (GET /supported only, 1.3.0)

facilitatorHTTPS0S1S2S3S4note
x402.org/facilitator200passpasspasspasspass
facilitator.payai.network200passpasspasspasspass
x402.dexter.cash200passpasspasspasspass
facilitator.ultravioletadao.xyz200passpasspasspasswarningdevnet fee payer not listed under signers (inferred rule)
facilitator-A (name withheld)200passpasspasspasspass
facilitator.xpay.sh200passpasspasspasspass
x402.polygon.technology200passpasspasspasspass
facilitator.goplausible.xyz200passpassfailpasspassAlgorand IDs use the full 44-character genesis hash; the x402 Algorand spec uses algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73k
facilitator.pieverse.io200passpasspasspasspass
facilitator.x402.rs200passpasspasspasspass
facilitator.daydreams.systems200passpasspasspasspass
facilitator.mogami.tech200passpasspasspasspassV1-only, graded against V1
api.cdp.coinbase.com/platform/v2/x402401fail––––needs credentials; not run with any
facilitator.cascade.fyi–fail––––TLS handshake failed
facilitator.corbits.dev–fail––––TLS handshake failed

Raw bodies and hashes: evidence/2026-10-20-v1.3.0. A failed check is evidence about one property on one day, not a verdict on a facilitator. Operators can report a false positive or ask to be listed.

Seventeen open-source facilitators are also listed as self-hosted columns: each is built at a pinned commit and run on loopback as my own instance against public testnets. S0 to S4 run against them today, and the verify-only F checks follow with XC-51.

Devnet, 2026-10-20 (F1-F6 over real /verify and /settle)

Against my self-hosted reference facilitator (@x402/core 2.28.0 with the @x402/svm 2.28.0 exact scheme) on Solana devnet, using a throwaway test token and throwaway keypairs. No mainnet, no real funds.

checkresulton chain (devnet explorer)
F1 malformed payload fails closedpassnone, /verify only
F2 dust amount is rejectedpassnone, /verify only
F3 the same payload settled twice succeeds oncepass3Z6SFs…
F4 a used memo in a new transaction is rejectedfail2L3Jxe…, 2U31kB…
F5 success only after confirmationpass3GyFs6…
F6 a timeout or garbage answer never creditspasssee run.json

About F4. The reference facilitator deduplicates by transaction (F3 passes) but doesn't track the memo across different transactions, so two different transactions carrying the same memo both settled. Each was a real payment signed by the payer, so the seller was paid twice rather than losing money, but a resource server that binds one purchase to one memo has to reject the second payment itself. The result is recorded as it came out.

Every fault-injected build (open_on_malformed, accept_dust, success_unsent) was caught by the check it targets. Setup transaction: NoU2pE…. Full results and hashes: evidence/devnet.

Free and open core

Apache-2.0. Every check, the Action, the devnet runner and the Lean 4 models of the credit rule are free, forever. Free run for your project: open an issue with your repo or facilitator URL and I'll run the suite, post the results and send a tests-only pull request with the Action and badge. Questions and ideas: Discussions.

Mutation matrix

For every check, the faulty builds it is proven to catch: a facilitator double, a resource-server guard, a Python test or a TypeScript test named in the catalogue. Built from the catalogue by python3 tools/mutation_matrix.py; CI fails when the file is stale or a check catches nothing. The false-positive register is docs/FALSE-POSITIVES.md.

checkprofilecaughtfaulty builds
loading mutation-matrix.json