x402-monetize
Charge USDC per API call with Express x402 payment servers.
Developer Setup
Setup & Installation
npx skills add https://github.com/coinbase/agentic-wallet-skills/blob/main/skills/agentic-wallet/references/x402-monetize.md --skill x402-monetizenpx skills add https://github.com/coinbase/agentic-wallet-skills/blob/main/skills/agentic-wallet/references/x402-monetize.md --skill x402-monetizeOverview
What This Skill Does
Builds micro-payment Express API servers charging USDC per request, verified automatically via the x402 Bazaar.
Application
When to use this Skill
- Creating Express servers that charge USDC per API request.
- Implementing the HTTP 402 payment protocol on custom API endpoints.
- Registering API endpoints with the x402 Bazaar directory for discovery.
- Extracting payment addresses from authenticated agentic wallets.
- Verifying client payment headers and signatures on backend servers.
Documentation
Show Skills.md file
Build an x402 Payment Server
Create an Express server that charges USDC for API access using the x402 payment protocol. Callers pay per-request in USDC on Base — no accounts, API keys, or subscriptions needed. Your service is automatically discoverable by other agents via the x402 Bazaar.
How It Works
x402 is an HTTP-native payment protocol. When a client hits a protected endpoint without paying, the server returns HTTP 402 with payment requirements. The client signs a USDC payment and retries with a payment header. The facilitator verifies and settles the payment, and the server returns the response. Services register with the x402 Bazaar so other agents can discover and pay for them automatically.
If the wallet is not authenticated, see references/auth.md.
Step 1: Get the Payment Address
Run this to get the wallet address that will receive payments:
npx awal@2.10.0 address
Use this address as the payTo value.
Step 2: Set Up the Project
mkdir x402-server && cd x402-server
npm init -y
npm install express @x402/express @x402/core @x402/evm @x402/extensions
Recommendations
Explore other random skills
design-consultation
Build a complete design system from scratch with creative risks and realistic product mockups
design-review
Designer Who Codes: visual audit then fixes with atomic commits and before/after screenshots
review
Staff Engineer code review: finds bugs that pass CI but blow up in production