Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Production Configuration

Best practices for running an x402 endpoint in production.


Set Values via Environment Variables

Never hardcode network IDs or USDC mints. Load them from environment variables so you can redeploy without code changes:

const NETWORK   = process.env.SOLANA_NETWORK ?? 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp';
const USDC_MINT = process.env.USDC_MINT     ?? 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';

Production Checklist

  • payTo wallet address is set from an environment variable, not hardcoded
  • Your server environment sets SOLANA_NETWORK and USDC_MINT
  • /health on your server returns 200 reliably
  • You have real USDC on Solana mainnet in your receiving wallet
  • Your endpoint URL uses HTTPS

Verify the Facilitator Supports Your Network

curl https://x402.agentstrail.ai/supported

Look for solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp in the response before going live.