x402 Forge is part of Fizzlfizzl.eu ↗
x402 Forge Upgrade your toolBundlesCatalog

Catalog / x402-payment-verify

x402 payment verifier (EVM exact)

Checks offline that a signed x402 payment pays exactly what the 402 terms asked and that its signature is the payer's.

Benched Security-tested against the seller traps of our Agent Benchmark Exam.

Buy $1.00

What it does

Offline check of an x402 v2 'exact' EVM payment before a seller settles or trusts it: the PAYMENT-SIGNATURE payload (EIP-3009 TransferWithAuthorization) against the PAYMENT-REQUIRED terms it answers. Same as the @x402/core and @x402/evm 2.31.0 offline verify for a payer without contract code: among the offers with scheme 'exact' on an eip155 network (others, such as Solana offers, are skipped and counted in offers_skipped; with none left the verdict is mismatch, accepted_not_offered), the offer that 'accepted' echoes (every field but extra equal, the offer's extra contained), recipient = payTo, value = amount, validBefore >= now + 6 s, validAfter <= now, field shapes (uint256 decimals, 32-byte 0x nonce, addresses lowercase or exact EIP-55 as viem accepts them), and the EOA signature check: low s and the EIP-712 signature recovered to authorization.from (secp256k1, own Keccak-256; v as 27/28 or y-parity 0/1, as the facilitator normalises it). Deliberate differences: (1) payer code is not read. The SDK checks a payer with contract code (an ERC-1271 wallet or EIP-7702 account) through isValidSignature on the chain, without the low-s rule, so a 65-byte signature that fails the EOA check (signer_mismatch_maybe_contract_wallet, signature_s_not_canonical, r/s or v out of range) is 'unverifiable', never 'invalid'; 'ok' holds for a payer without code (a contract payer's own isValidSignature decides on the chain). (2) ERC-6492 and other non-65-byte signatures are 'unverifiable' (the SDK calls the chain). (3) 'ok' only for an asset in the @x402/evm 2.31.0 DEFAULT_ASSETS table that uses EIP-3009, with the table's EIP-712 name/version: an unknown asset or a Permit2-listed one is 'unverifiable', another name/version is 'invalid' (eip712_domain_not_token, where the SDK's offline step passes and the chain fails). (4) An EIP-712 name or version over 64 characters (table tokens use at most 23) is not hashed: eip712_domain_not_token for a table asset, otherwise 'unverifiable' (eip712_domain_too_long). verdict: ok, mismatch (signed but not these terms or not now), invalid (malformed, or a domain the token does not use), unverifiable; reasons lists every code in a fixed order. No chain reads: balance, used nonces and contract code are not checked. Addresses come back as 40 lowercase hex characters without 0x. Never signs or pays.

Example input
{"payment_signature":"eyJ4NDAyVmVyc2lvbiI6MiwicmVzb3VyY2UiOnsidXJsIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vd2VhdGhlciIsImRlc2NyaXB0aW9uIjoiV2VhdGhlciIsIm1pbWVUeXBlIjoiYXBwbGljYXRpb24vanNvbiJ9LCJhY2NlcHRlZCI6eyJzY2hlbWUiOiJleGFjdCIsIm5ldHdvcmsiOiJlaXAxNTU6ODQ1MyIsImFtb3VudCI6IjEwMDAwIiwiYXNzZXQiOiIweDgzMzU4OWZDRDZlRGI2RTA4ZjRjN0MzMkQ0ZjcxYjU0YmRBMDI5MTMiLCJwYXlUbyI6IjB4MjA5NjkzQmM2YWZjMEM1MzI4YkEzNkZhRjAzQzUxNEVGMzEyMjg3QyIsIm1heFRpbWVvdXRTZWNvbmRzIjozMDAsImV4dHJhIjp7Im5hbWUiOiJVU0QgQ29pbiIsInZlcnNpb24iOiIyIn19LCJwYXlsb2FkIjp7InNpZ25hdHVyZSI6IjB4NTBhMWYzNTBiNGU5ZDA1NWU1YzE1NTk0MjYzYjY1NDJjY2NhMGM1MTUzZTk3ZDc0YWRlYTNmMWJkZTRkNWIxYjZmZjUxYjU1NWY2MDJkMTk0MmQzNGU1ZDZiNDg1Mjg5ZDFiZDBlMjI3OTY0NTA1ZGQ0Y2FjZTkzMzc4YmExMDgxYiIsImF1dGhvcml6YXRpb24iOnsiZnJvbSI6IjB4MTlFN0UzNzZFN0MyMTNCN0U3ZTdlNDZjYzcwQTVkRDA4NkRBZmYyQSIsInRvIjoiMHgyMDk2OTNCYzZhZmMwQzUzMjhiQTM2RmFGMDNDNTE0RUYzMTIyODdDIiwidmFsdWUiOiIxMDAwMCIsInZhbGlkQWZ0ZXIiOiIwIiwidmFsaWRCZWZvcmUiOiIxODAwMDAwMzAwIiwibm9uY2UiOiIweDVhNWE1YTVhNWE1YTVhNWE1YTVhNWE1YTVhNWE1YTVhNWE1YTVhNWE1YTVhNWE1YTVhNWE1YTVhNWE1YTVhNWEifX19","payment_required":"eyJ4NDAyVmVyc2lvbiI6MiwiZXJyb3IiOiJQYXltZW50IHJlcXVpcmVkIiwicmVzb3VyY2UiOnsidXJsIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vd2VhdGhlciIsImRlc2NyaXB0aW9uIjoiV2VhdGhlciIsIm1pbWVUeXBlIjoiYXBwbGljYXRpb24vanNvbiJ9LCJhY2NlcHRzIjpbeyJzY2hlbWUiOiJleGFjdCIsIm5ldHdvcmsiOiJlaXAxNTU6ODQ1MyIsImFtb3VudCI6IjEwMDAwIiwiYXNzZXQiOiIweDgzMzU4OWZDRDZlRGI2RTA4ZjRjN0MzMkQ0ZjcxYjU0YmRBMDI5MTMiLCJwYXlUbyI6IjB4MjA5NjkzQmM2YWZjMEM1MzI4YkEzNkZhRjAzQzUxNEVGMzEyMjg3QyIsIm1heFRpbWVvdXRTZWNvbmRzIjozMDAsImV4dHJhIjp7Im5hbWUiOiJVU0QgQ29pbiIsInZlcnNpb24iOiIyIn19XX0=","now":1800000000}
Answer
{"ok":true,"result":{"verdict":"ok","valid":true,"reason":null,"reasons":[],"matched_offer_index":0,"offers_count":1,"offers_skipped":0,"compared_offer_index":0,"accepted_differences":[],"payment":{"from":"19e7e376e7c213b7e7e7e46cc70a5dd086daff2a","to":"209693bc6afc0c5328ba36faf03c514ef312287c","value":"10000","valid_after":"0","valid_before":"1800000300","nonce":"0x5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a","network":"eip155:8453"},"terms":{"index":0,"scheme":"exact","network":"eip155:8453","chain_id":8453,"asset":"833589fcd6edb6e08f4c7c32d4f71b54bda02913","pay_to":"209693bc6afc0c5328ba36faf03c514ef312287c","amount":"10000","max_timeout_seconds":300,"eip712_name":"USD Coin","eip712_version":"2"},"time":{"now":1800000000,"expiry_margin_seconds":6,"valid_after_ok":true,"valid_before_ok":true,"seconds_left":300},"signature":{"status":"valid","kind":"ecdsa_65","v":27,"s_canonical":true,"digest":"0xf372f84f10216ad4a2c4ba3c90ae17059288c9ac7ebdeb693229a579bf6ed707","domain_used":"terms"},"token":{"symbol":"USDC","decimals":6,"eip712_name":"USD Coin","eip712_version":"2","transfer_method":"eip3009","amount_display":"0.01"},"standard":"HTTP 402 payment protocol v2, exact scheme on EVM (EIP-3009 TransferWithAuthorization): offer matching (exact eip155 offers only, others skipped), field shapes, recipient, amount, time window (6 s margin) and the EOA signature check (low s, ECDSA recovery to from, v 0/1/27/28) as the reference SDK 2.31.0 offline verify for a payer without contract code; deliberate differences: payer code is not read, so a 65-byte signature failing the EOA check is unverifiable, not invalid (the SDK checks a payer with code through ERC-1271 on the chain, without the low-s rule; that may accept it, or refuse one that passes here); ERC-6492 and other non-65-byte signatures unverifiable; only SDK 2.31.0 table assets with EIP-3009 and the table's EIP-712 name/version can be ok; an EIP-712 name or version over 64 characters is not hashed; EIP-712, EIP-55, secp256k1"},"warnings":[]}
Try it free
/try/x402-payment-verify

Buy

Price $1.00, once. One buyer only: the first one owns the tool, we stop selling it and list your copy, and every paid call to it goes to your wallet. Comes with a licence: run it, change it and earn from it; the code itself is not passed on or resold.

  1. Pay with an x402 walletThe buy link is https://forge.fizzl.eu/forge/packages/x402-payment-verify?format=zip. It answers with a payment request (HTTP 402) that an x402 wallet pays in USDC on Base. From Claude, ChatGPT or Grok with the Fizzl Agent Wallet: ask “buy https://forge.fizzl.eu/forge/packages/x402-payment-verify?format=zip”. From code:
    const pay = wrapFetchWithPayment(fetch, client); // see /llms.txt
    const zip = await pay("https://forge.fizzl.eu/forge/packages/x402-payment-verify?format=zip");
  2. Start it with your walletUnzip, npm install, then PAY_TO=0xYourWallet PUBLIC_URL=https://your-host npm start on any Node host.
  3. We list it for youYour copy tells us where it runs; we check it and add it to the x402 Trust Index and the Bazaar under your wallet.
Bought it, and something is wrong?

Paste the receipt you got with the purchase (the X-Forge-Receipt token; a bundle receipt works too) and say what is wrong. Free. We pick it up within the hour; a real fault is fixed, passes the same checks, and you download the new version free at /forge/packages/x402-payment-verify/update with your receipt. No money back through this form.

Missing a tool?

Tell us in one sentence what it should do: what goes in, what comes out. Free, no wallet. Our agents read every suggestion and build the useful ones in the next shift. Want it for sure? Order it for $1.