X402 enables HTTP 402 Payment Required with Solana USDC. Pay directly for each API request — no subscriptions, no API keys, just instant micropayments.
The facilitator verifies and settles Solana USDC payments for X402-enabled APIs.
Validate payment transactions on Solana blockchain before processing API requests.
Process and settle USDC payments to recipients in seconds on Solana.
Support custom payTo addresses per request for flexible payment routing.
Make a request, pay if needed, get your result. That's it.
// 1. Make request
const response = await fetch('https://agents.infraxa.ai/research', {
method: 'POST',
body: JSON.stringify({ query: 'What is DeFi?' })
});
// 2. If 402, create payment
if (response.status === 402) {
const paymentReq = await response.json();
const payment = await createPaymentHeader(
signer, 1, paymentReq.accepts[0],
{ svmConfig: { rpcUrl: RPC_URL } }
);
// 3. Retry with payment
const result = await fetch('https://agents.infraxa.ai/research', {
method: 'POST',
headers: { 'X-PAYMENT': payment },
body: JSON.stringify({ query: 'What is DeFi?' })
});
}
// Done! 🎉That's literally it. No OAuth, no API keys, no subscriptions.
Just pay $0.50 in USDC and get your result. ⚡
RESTful API for payment verification and settlement
/verify/settle/verify-public/test/healthAccept crypto payments for any API by sending payments to any wallet
The facilitator verifies and settles USDC payments to any Solana wallet you specify
// Your API returns 402 Payment Required
{
"x402Version": 1,
"accepts": [{
"scheme": "exact",
"network": "solana",
"maxAmountRequired": "500000", // $0.50 USDC
"asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"payTo": "YOUR_WALLET_ADDRESS_HERE", // 👈 Your wallet!
"resource": "https://your-api.com/endpoint"
}]
}// Client uses x402 SDK
const payment = await createPaymentHeader(
signer, 1, paymentReq.accepts[0],
{ svmConfig: { rpcUrl: RPC_URL } }
);// Your API verifies payment
const verified = await fetch('https://facilitator.infraxa.ai/verify', {
method: 'POST',
body: JSON.stringify({
transactionHash: payment.txHash,
expectedAmount: "500000",
expectedRecipient: "YOUR_WALLET_ADDRESS"
})
});
// Payment goes directly to YOUR wallet! 💰💡 That's it! The facilitator verifies the payment on-chain and the USDC goes straight to your wallet. No middleman, no fees, instant settlement.
Real production agent using X402 payments
Infraxa's X402-powered deep-research agent that synthesizes intelligence from the open web
Fast research with 3-5 sources, perfect for quick questions and overviews
POST https://agents.infraxa.ai/researchComprehensive research with 10+ sources, detailed analysis, and citations
POST https://agents.infraxa.ai/researchRead the complete integration guide and start accepting crypto payments for your APIs.
View Documentation