Extensions

Payment Identifier

Let clients attach a stable idempotency key so repeat submissions return the same outcome instead of double-charging or double-fulfilling.

Why use it

  • Useful for retries, agent loops, and unreliable networks.
  • Server and/or facilitator can deduplicate using the same payment payload field.

How it works

  • Your server advertises payment-identifier support and whether an id is required.
  • The client supplies an id on the payment payload; consumers that understand the extension can cache or reject duplicates.

Highlighting Request

  1. Request

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

    GET
    GET

    Sells access and publishes payment requirements.

    GET

    Verifies signatures and submits chain transactions on behalf of merchants.

  2. 402

    Your server advertises payment-identifier support and whether an id is required.

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

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    { "x402Version": 2 }

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Sells access and publishes payment requirements.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    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.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Sells access and publishes payment requirements.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    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.

    verify
    verify

    Verifies signatures and submits chain transactions on behalf of merchants.

    verify
  5. Settle

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

    Sells access and publishes payment requirements.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

    Verifies signatures and submits chain transactions on behalf of merchants.

    Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.
  6. Response

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

    200
    200

    Sells access and publishes payment requirements.

    200

    Verifies signatures and submits chain transactions on behalf of merchants.

Learn more

For engineers

Extension key payment-identifier.

Server advertises in PaymentRequired extensions; both resource servers and facilitators may read PaymentPayload—dedupe can happen at either or both layers.

  • info.required boolean and optional id length bounds (16–128 chars) per schema.
  • Id acts as idempotency key for repeated submissions.