Echo Merchant

A free testing service to validate your x402 client implementation. Test payment flows without spending real crypto.

What is Echo Merchant?

Echo Merchant is a publicly available x402 test server that responds with HTTP 402 but doesn't require actual payment. Perfect for testing your client implementation before deploying to production.

Endpoints

GEThttps://echo.payai.network/echo

Returns the request body as JSON response. Use this to test basic x402 flow.

POSThttps://echo.payai.network/echo

Echoes back the POST body. Test payment flow with request payloads.

Testing Your Client

Use Echo Merchant to verify your x402 client handles the payment flow correctly:

1

Make Initial Request

Your client makes a request to Echo Merchant without payment proof

2

Receive 402 Response

Server responds with HTTP 402 and payment headers

3

Parse Payment Instructions

Your client should parse the payment headers correctly

4

Simulate Payment

Echo Merchant accepts any payment proof format for testing

5

Retry & Get Response

Retry with payment proof header and receive the actual response

Example with cURL

Test the basic flow with cURL:

Initial Request (no payment)

curl -v https://echo.payai.network/echo

Response: HTTP 402 with payment headers

Retry with Payment Proof

curl https://echo.payai.network/echo \
  -H "X-Payment-Proof: test-proof-123" \
  -H "X-Payment-Network: base-sepolia"

Response: HTTP 200 with echoed content

Example with JavaScript

const response1 = await fetch('https://echo.payai.network/echo');

if (response1.status === 402) {
  // Parse payment instructions
  const paymentHeader = response1.headers.get('X-Accept-Payment');
  const paymentAddress = response1.headers.get('X-Payment-Address');
  
  console.log('Payment required:', paymentHeader);
  
  // Retry with mock payment proof
  const response2 = await fetch('https://echo.payai.network/echo', {
    headers: {
      'X-Payment-Proof': 'test-signature-123',
      'X-Payment-Network': 'base-sepolia'
    }
  });
  
  const data = await response2.json();
  console.log('Success:', data);
}

Next Steps

Once you've validated your x402 client against Echo Merchant:

  • Use proper x402 client libraries for production
  • Connect to real services on Nova402 marketplace
  • Implement actual blockchain transaction signing
  • Handle payment confirmations and errors properly

Ready for Production?

Learn how to integrate real x402 clients into your applications.

Client Integration Guide
Nova402