# Send Monetize Service to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "monetize-service",
    "name": "Monetize Service",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/0xRAG/monetize-service",
    "canonicalUrl": "https://clawhub.ai/0xRAG/monetize-service",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/monetize-service",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=monetize-service",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "monetize-service",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-05T20:39:39.266Z",
      "expiresAt": "2026-05-12T20:39:39.266Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=monetize-service",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=monetize-service",
        "contentDisposition": "attachment; filename=\"monetize-service-0.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "monetize-service"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/monetize-service"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/monetize-service",
    "downloadUrl": "https://openagent3.xyz/downloads/monetize-service",
    "agentUrl": "https://openagent3.xyz/skills/monetize-service/agent",
    "manifestUrl": "https://openagent3.xyz/skills/monetize-service/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/monetize-service/agent.md"
  }
}
```
## Documentation

### 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.

### 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.

### Confirm wallet is initialized and authed

npx awal@latest 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:

npx awal@latest 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

Create index.js:

const express = require("express");
const { paymentMiddleware } = require("x402-express");

const app = express();
app.use(express.json());

const PAY_TO = "<address from step 1>";

// x402 payment middleware — protects routes below
const payment = paymentMiddleware(PAY_TO, {
  "GET /api/example": {
    price: "$0.01",
    network: "base",
    config: {
      description: "Description of what this endpoint returns",
    },
  },
});

// Protected endpoint
app.get("/api/example", payment, (req, res) => {
  res.json({ data: "This costs $0.01 per request" });
});

app.listen(3000, () => console.log("Server running on port 3000"));

### Step 3: Run It

node index.js

Test with curl — you should get a 402 response with payment requirements:

curl -i http://localhost:3000/api/example

### paymentMiddleware(payTo, routes, facilitator?)

Creates Express middleware that enforces x402 payments.

ParameterTypeDescriptionpayTostringEthereum address (0x...) to receive USDC paymentsroutesobjectRoute config mapping route patterns to payment configfacilitatorobject?Optional custom facilitator (defaults to x402.org)

### Route Config

Each key in the routes object is "METHOD /path". The value is either a price string or a config object:

// Simple — just a price
{ "GET /api/data": "$0.05" }

// Full config
{
  "POST /api/query": {
    price: "$0.25",
    network: "base",
    config: {
      description: "Human-readable description of the endpoint",
      inputSchema: {
        bodyType: "json",
        bodyFields: {
          query: { type: "string", description: "The query to run" },
        },
      },
      outputSchema: {
        type: "object",
        properties: {
          result: { type: "string" },
        },
      },
    },
  },
}

### Route Config Fields

FieldTypeDescriptionpricestringUSDC price (e.g. "$0.01", "$1.00")networkstringBlockchain network: "base" or "base-sepolia"config.descriptionstring?What this endpoint does (shown to clients)config.inputSchemaobject?Expected request body/query schemaconfig.outputSchemaobject?Response body schemaconfig.maxTimeoutSecondsnumber?Max time for payment settlement

### Supported Networks

NetworkDescriptionbaseBase mainnet (real USDC)base-sepoliaBase Sepolia testnet (test USDC)

### Multiple endpoints with different prices

const payment = paymentMiddleware(PAY_TO, {
  "GET /api/cheap": { price: "$0.001", network: "base" },
  "GET /api/expensive": { price: "$1.00", network: "base" },
  "POST /api/query": { price: "$0.25", network: "base" },
});

app.get("/api/cheap", payment, (req, res) => { /* ... */ });
app.get("/api/expensive", payment, (req, res) => { /* ... */ });
app.post("/api/query", payment, (req, res) => { /* ... */ });

### Wildcard routes

const payment = paymentMiddleware(PAY_TO, {
  "GET /api/*": { price: "$0.05", network: "base" },
});

app.use(payment);
app.get("/api/users", (req, res) => { /* ... */ });
app.get("/api/posts", (req, res) => { /* ... */ });

### Health check (no payment)

Register free endpoints before the payment middleware:

app.get("/health", (req, res) => res.json({ status: "ok" }));

// Payment middleware only applies to routes registered after it
app.get("/api/data", payment, (req, res) => { /* ... */ });

### POST with body schema

const payment = paymentMiddleware(PAY_TO, {
  "POST /api/analyze": {
    price: "$0.10",
    network: "base",
    config: {
      description: "Analyze text sentiment",
      inputSchema: {
        bodyType: "json",
        bodyFields: {
          text: { type: "string", description: "Text to analyze" },
        },
      },
      outputSchema: {
        type: "object",
        properties: {
          sentiment: { type: "string" },
          score: { type: "number" },
        },
      },
    },
  },
});

app.post("/api/analyze", payment, (req, res) => {
  const { text } = req.body;
  // ... your logic
  res.json({ sentiment: "positive", score: 0.95 });
});

### Using the CDP facilitator (authenticated)

For production use with the Coinbase facilitator (supports mainnet):

npm install @coinbase/x402

const { facilitator } = require("@coinbase/x402");

const payment = paymentMiddleware(PAY_TO, routes, facilitator);

This requires CDP_API_KEY_ID and CDP_API_KEY_SECRET environment variables. Get these from https://portal.cdp.coinbase.com.

### Testing with the pay-for-service Skill

Once the server is running, use the pay-for-service skill to test payments:

# Check the endpoint's payment requirements
npx awal@latest x402 details http://localhost:3000/api/example

# Make a paid request
npx awal@latest x402 pay http://localhost:3000/api/example

### Pricing Guidelines

Use CaseSuggested PriceSimple data lookup$0.001 - $0.01API proxy / enrichment$0.01 - $0.10Compute-heavy query$0.10 - $0.50AI inference$0.05 - $1.00

### Checklist

Get wallet address with npx awal@latest address
 Install express and x402-express
 Define routes with prices and descriptions
 Register payment middleware before protected routes
 Keep health/status endpoints before payment middleware
 Test with curl (should get 402) and npx awal@latest x402 pay (should get 200)
 Announce your service so other agents can find and use it
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: 0xRAG
- Version: 0.1.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-05T20:39:39.266Z
- Expires at: 2026-05-12T20:39:39.266Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/monetize-service)
- [Send to Agent page](https://openagent3.xyz/skills/monetize-service/agent)
- [JSON manifest](https://openagent3.xyz/skills/monetize-service/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/monetize-service/agent.md)
- [Download page](https://openagent3.xyz/downloads/monetize-service)