This repository contains practical examples demonstrating how to use x402-analytics with the x402 payment protocol.
Each example is self-contained and ready to run:
- Basic Buyer - Simple client making paid requests with analytics
- Express Server - Express.js API with payment middleware and analytics
- Node.js 18+ or Bun
- A wallet for making payments (MetaMask, WalletConnect, CDP, etc.)
-
Choose an example and navigate to its directory:
cd buyer-basic # or seller-express
-
Install dependencies:
npm install # or bun install -
Run the example:
npm run dev # or bun run dev
- x402-analytics - Analytics wrapper for x402 payments
- x402-fetch - Fetch wrapper for making paid requests
- x402-express - Express middleware for accepting payments
- x402 Protocol Documentation
- x402station.com - Analytics dashboard
- Main x402-analytics Repository
Found a bug or want to add an example? Please open an issue or submit a pull request!
MIT - see LICENSE for details.
Built for the x402 ecosystem - Making programmatic payments trackable and transparent. 🚀