Skip to main content

Getting Started with X402 Echo Merchant

Use the Echo Merchant to validate your x402 client in minutesβ€”no server to deploy.

Echo Merchant Website

Visit the Echo Merchant Website to test your client against a live x402-powered merchant.

What you need

  • An x402 client implementation (see examples below)
  • A private key suitable for the network you’re testing

Step 1 β€” Pick a client example

Start from one of the reference clients and run it locally: These examples already implement the x402 flow (handling 402, constructing the Payment Payload, retrying with PAYMENT-SIGNATURE, and decoding PAYMENT-RESPONSE).

Step 2 β€” Point your client at the Echo Merchant

Visit the Echo Merchant Website to see the supported networks and endpoints for the Echo Merchant. For example:

Step 3 β€” Run and observe

Run the client. You should see:
  1. Initial 402 Payment Required response with PAYMENT-REQUIRED header
  2. A retry with PAYMENT-SIGNATURE header containing your payment
  3. A 200 OK response with PAYMENT-RESPONSE header containing settlement details
The tokens you sent are refunded automatically and PayAI covers the fees.