Skip to content
In the news TRM Labs × Finray: audit-ready crypto transaction monitoring for banking
Finray

Decode an x402 payment header

Paste an x402 header and see what it asks for or pays. You get the decoded JSON, each field in plain words, and checks on the amount, the recipient, the validity window and the nonce. It runs in your browser.

With or without the header name. Base64 may be URL-safe or unpadded.

For a payload: paste the server's payment required here to compare the value and the recipient with it.

Shows a human amount next to the atomic one. Look up the decimals of the token in its contract; there is no default.

Samples (synthetic)

Paste a header to start. Nothing is sent anywhere.

Amount, atomic units

0

 

Decoded JSON
Nothing decoded yet.

What it is

  1. Not checked yet: Version v2 uses PAYMENT-SIGNATURE; v1 used X-PAYMENT.
  2. Not checked yet: Required fields scheme, network, amount, asset, payTo, maxTimeoutSeconds.
  3. Not checked yet: Network CAIP-2: a namespace, a colon, a reference.
  4. Not checked yet: Amount A string of digits in atomic units.
  5. Not checked yet: Time to pay maxTimeoutSeconds, shown in minutes.

What it pays

  1. Not checked yet: Recipient match authorization.to equals payTo.
  2. Not checked yet: Value match authorization.value equals the amount.
  3. Not checked yet: Validity window validAfter and validBefore, against your clock.
  4. Not checked yet: Nonce 32 bytes in hex.
  5. Not checked yet: Signature shape 65 bytes in hex. Never verified.

Fields

FieldValueWhat it means
The fields of the decoded object appear here, each with a meaning from the specification.

Checked in your browser. Nothing you type is sent, stored or put in the address bar.

How it works

x402 puts a payment inside an HTTP request. The server asks in one header, the client pays in another, and the server reports the settlement in a third. Each carries base64 of JSON. The decoder finds out which object you pasted, shows it field by field and runs ten checks on its shape. It reads the header; it does not check what the header says against a chain.

CheckRuleWhere it is written
Version Version 2 uses the headers PAYMENT-REQUIRED (server to client), PAYMENT-SIGNATURE (client to server) and PAYMENT-RESPONSE (server to client). Version 1 used X-PAYMENT, and its requirements came in the body of the 402 response. A v1 object gets a plain note on what changed. x402 spec v2 HTTP transport; x402 spec v1
Required fields In v2 each requirement has scheme, network, amount, asset, payTo and maxTimeoutSeconds, and the payment required object carries resource. extra is optional. In v1 the amount is maxAmountRequired, and resource and description sit inside each requirement. x402 spec v2; x402 spec v1
Network In v2 the network is written in CAIP-2: a namespace, a colon and a reference, such as eip155:8453. x402 spec v2
Amount The amount is a string of digits in the asset's smallest unit (atomic units). The decoder shows it raw. Give the token's decimals to see a human amount; the page does not guess them. x402 spec v2
Recipient match For the exact scheme on EVM networks the payload carries an authorization with from, to, value, validAfter, validBefore and nonce. The to address should equal the payTo the server asked for. x402 exact scheme on EVM
Value match The authorization value should equal the amount of the requirement. The decoder uses the accepted requirement inside the payload, or the payment required you paste in the second box. x402 spec v2; x402 exact scheme on EVM
Validity window validAfter and validBefore are Unix times. The decoder shows them as UTC dates and compares them with your browser's clock: not yet valid before validAfter, expired from validBefore. x402 exact scheme on EVM
Time to pay maxTimeoutSeconds is the longest the server allows to complete the payment. The decoder shows it in minutes. x402 spec v2
Nonce The nonce is 32 bytes, written in hex as 0x and 64 hex characters. The token contract does not accept the same nonce twice. x402 exact scheme on EVM; x402 guide
Signature shape The signature is 65 bytes, so 0x and 130 hex characters. Only the length is looked at. x402 exact scheme on EVM

The three headers

In version 2 the headers are these. The decoder also takes the JSON on its own, a bare base64 value, or a header line with or without its name.

HeaderSent byBase64 of
PAYMENT-REQUIREDServer, with the 402 responsePaymentRequired: what the server asks for.
PAYMENT-SIGNATUREClient, when it repeats the requestPaymentPayload: the chosen requirement and the signed payment.
PAYMENT-RESPONSEServer, with the served responseSettlementResponse: success, transaction, network and payer.

What the decoder does not do

It never verifies a signature and never talks to a chain or a facilitator. A header that passes every check here can still be refused, replayed or unfunded: the decoder cannot see the token contract, the payer's balance or whether a nonce was already used. It reads one header at a time, and it takes the clock of your browser as the time.

The meanings and checks follow the exact scheme on EVM networks. A payload for another scheme, or one that uses the Permit2 transfer method, is shown field by field, and the authorization checks wait.

Examples

Each example loads a synthetic header into the decoder: zero addresses, a made-up nonce and a made-up signature.

  • A v2 payment required

    Synthetic, built from the x402 spec v2 field list

    Header
    PAYMENT-REQUIRED
    Shows
    One accepted way to pay: 10000 atomic units on eip155:8453, to the zero address, within 60 seconds.

    All required fields are present and the network is in CAIP-2 form.

  • A v2 payment payload

    Synthetic, built from the x402 exact scheme on EVM

    Header
    PAYMENT-SIGNATURE
    Shows
    A payload that pays the 10000 atomic units asked for, to the same address.

    The recipient and the value match the requirement, the nonce is 32 bytes and the window is open.

  • A v2 payload with problems

    Synthetic

    Header
    PAYMENT-SIGNATURE
    Shows
    A payload that pays another address, 20000 units, with a short nonce and a window that has closed.

    The recipient, value, nonce and window checks fail, each with the two values side by side.

  • A v1 header

    Synthetic, built from the x402 spec v1

    Header
    X-PAYMENT
    Shows
    A version 1 payload, with the network written as a name.

    The version note says the header is PAYMENT-SIGNATURE in v2.

Where Finray does this for you

Corebanq

Corebanq has an MCP server.

AI agents can initiate payments through Corebanq.

The customer institution sets the limits and approvals for those payments itself, in the Corebanq Configurator.

Sources

Last verified

  1. x402 Foundation, x402 Protocol Specification, protocol version 2
  2. x402 Foundation, x402 HTTP transport, version 2 (the three headers)
  3. x402 Foundation, exact scheme on EVM networks (EIP-3009 authorization)
  4. x402 Foundation, x402 Protocol Specification, version 1
  5. Finray, x402 for AI agent payments, and where MCP fits (sources read 23 November 2026)

Not stated by the sources, and so not claimed here: the name of a v1 response header, the number of decimals of any token (enter it yourself), and what a facilitator does beyond what the guide says. The specification itself is the reference; if this page and the specification differ, the specification is right.

A team member will respond within one business day with availability windows.

Book a Corebanq briefing
Certificate of Registration NQA · UKAS Management Systems
ISO/IEC 27001:2022 Certificate of Registration issued by NQA to Finray Technologies Ltd, certificate number 215646, valid 21 October 2025 to 21 October 2028
Search
Type to search across Finray, products, company, and journal.

    Press Esc to close · ↵ to open the highlighted result.

    Book a briefing Step 1 of 3

    What you need

    Which platforms are in scope.

    For example a licence application, an audit or a ledger build-out.

    Prefer email? Write to partnership@finray.tech

    What happens after you book

    • A team member will respond within one business day with availability windows.
    • Corebanq runs as Cloud SaaS, Private SaaS or an Enterprise Licence.
    • After the briefing, the full Corebanq and XZiel API references are issued with test-environment access.
    • Due-diligence documents, such as a summary of the April 2026 independent penetration test, are available under NDA.