Extensions

About extensions

Extensions are optional add-ons to a v2 payment-required response. They do not change how much a buyer pays or which scheme settles—they add discovery metadata, sign-in, gas sponsorship, attribution, and other capabilities sellers and facilitators can opt into.

Why they exist

Core x402 stays small and chain-agnostic. Extensions let the ecosystem ship new buyer and seller experiences without rewriting the base protocol. You implement only the extensions your product needs.

Highlighting Request

  1. Request

    Wallet, agent, or app that selects an offer and signs payment.

    Core x402 stays small. Extensions are optional.

    Core x402 stays small. Extensions are optional.

    Core x402 stays small. Extensions are optional.

    Sells access and publishes payment requirements.

    Core x402 stays small. Extensions are optional.

    Verifies signatures and submits chain transactions on behalf of merchants.

  2. 402

    Extensions are named keys on the v2 payment-required payload.

    Wallet, agent, or app that selects an offer and signs payment.

    Each extension entry pairs info with a JSON Schema. They do not change the amount or the scheme.

    Each extension entry pairs info with a JSON Schema. They do not change the amount or the scheme.

    Each extension entry pairs info with a JSON Schema. They do not change the amount or the scheme.

    Each extension entry pairs info with a JSON Schema. They do not change the amount or the scheme.

    Each extension entry pairs info with a JSON Schema. They do not change the amount or the scheme.

    Each extension entry pairs info with a JSON Schema. They do not change the amount or the scheme.

    Each extension entry pairs info with a JSON Schema. They do not change the amount or the scheme.

    Each extension entry pairs info with a JSON Schema. They do not change the amount or the scheme.

    { "x402Version": 2 }

    Sells access and publishes payment requirements.

    Each extension entry pairs info with a JSON Schema. They do not change the amount or the scheme.

    Verifies signatures and submits chain transactions on behalf of merchants.

  3. Pay and retry

    Wallet, agent, or app that selects an offer and signs payment.

    Clients attach extension data only when the server advertised it.

    Clients attach extension data only when the server advertised it.

    Clients attach extension data only when the server advertised it.

    Sells access and publishes payment requirements.

    Clients attach extension data only when the server advertised it.

    Verifies signatures and submits chain transactions on behalf of merchants.

  4. Verify

    Wallet, agent, or app that selects an offer and signs payment.

    Sells access and publishes payment requirements.

    Some extensions stop at the server and client. Others include the facilitator.

    Some extensions stop at the server and client. Others include the facilitator.

    Some extensions stop at the server and client. Others include the facilitator.

    Verifies signatures and submits chain transactions on behalf of merchants.

    Some extensions stop at the server and client. Others include the facilitator.
  5. Settle

    Wallet, agent, or app that selects an offer and signs payment.

    Sells access and publishes payment requirements.

    Settlement itself stays on the payment scheme.

    Settlement itself stays on the payment scheme.

    Settlement itself stays on the payment scheme.

    Verifies signatures and submits chain transactions on behalf of merchants.

    Settlement itself stays on the payment scheme.
  6. Response

    Wallet, agent, or app that selects an offer and signs payment.

    The resource response is unchanged.

    The resource response is unchanged.

    The resource response is unchanged.

    Sells access and publishes payment requirements.

    The resource response is unchanged.

    Verifies signatures and submits chain transactions on behalf of merchants.

Topics on this site

Extension docs (x402 repo) (opens in a new tab)
For engineers

On the wire, extensions appear as named keys on v2 payment-required payloads. Each entry pairs info (data) with a JSON Schema for info.

  • Canonical definitions live under specs/extensions/ in the x402 repository.
  • Integration guides for several extensions live under docs/extensions/.