monetize-servicelisted
Install: claude install-skill igor-holt/x402-monetize-plugin
# 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.
## Confirm wallet is initialized and authed
```bash
npx awal@2.0.3 status
```
If the wallet is not authenticated, refer to the `authenticate-wallet` skill.
## Step 1: Get the Payment Address
Run this to get the wallet address that will receive payments:
```bash
npx awal@2.0.3 address
```
Use this address as the `payTo` value.
## Step 2: Set Up the Project
```bash
mkdir x402-server && cd x402-server
npm init -y
npm install express @x402/express @x402/core @x402/evm @x402/extensions
```
Create `index.js`:
```js
const express = require("express");
const { paymentMiddleware } = require("@x402/express");
const { x402ResourceServer, HTTPFacilitatorClient } = require("@x402/core/server");
const { ExactEvmScheme } = require("@x402/evm/exact/server");
const app = expres