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
https://echo.payai.network/echoReturns the request body as JSON response. Use this to test basic x402 flow.
https://echo.payai.network/echoEchoes 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:
Make Initial Request
Your client makes a request to Echo Merchant without payment proof
Receive 402 Response
Server responds with HTTP 402 and payment headers
Parse Payment Instructions
Your client should parse the payment headers correctly
Simulate Payment
Echo Merchant accepts any payment proof format for testing
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