Free & Open Source

Test x402 Payment Flows on Solana

Build, test, and validate micropayment-protected APIs using USDC. Perfect for AI agents and premium APIs.

100%
Open Source
Fast
Testing Experience
$ pnpm add -D x402test
$ x402test init
✓ Test wallet created
✓ Config file generated
$ x402test start
✓ Server ready at :4402
Ready for payments

Everything You Need for Payment Testing

x402test provides a complete toolkit for developing and testing HTTP 402 Payment Required flows with Solana blockchain payments.

Simple Testing API

Fluent interface for making payment-protected HTTP requests with automatic payment handling.

Mock Server

Built-in server for simulating payment-protected endpoints during development.

Solana USDC Payments

Native integration with Solana blockchain for USDC micropayments on devnet and localnet.

AI Agent Ready

Perfect for testing autonomous agents with budget management and payment verification.

Replay Protection

Built-in security against replay attacks with transaction signature tracking.

Developer Friendly

Auto-funded test wallets, comprehensive examples, and intuitive CLI.

Test Micropayment APIs Locally

Run your tests on a local Solana validator with auto-funded test wallets. No real funds needed. No complicated setup.

Get Started in Minutes

Install, configure, and start testing x402 payment flows on Solana.

$ pnpm add -D x402test
1

Install Package

Add x402test to your project as a dev dependency

2

Initialize

Run x402test init to create config and test wallet

3

Start Testing

Run x402test start and begin testing payments!