Example Mainnet Server
This example demonstrates how to accept real USDC payments on Base mainnet using Coinbase's hosted x402 facilitator.
Prerequisites
- CDP api keys (access via Coinbase Developer Platform)
- A valid Ethereum address for receiving payments
Setup
- Copy
.env-localto.envand add your Ethereum address to receive payments:
cp .env-local .env
- Run the server:
go run mainnet.go