{
  "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": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/monetize-service",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=monetize-service",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/monetize-service",
    "agentPageUrl": "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"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Build an x402 Payment Server",
        "body": "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."
      },
      {
        "title": "How It Works",
        "body": "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."
      },
      {
        "title": "Confirm wallet is initialized and authed",
        "body": "npx awal@latest status\n\nIf the wallet is not authenticated, refer to the authenticate-wallet skill."
      },
      {
        "title": "Step 1: Get the Payment Address",
        "body": "Run this to get the wallet address that will receive payments:\n\nnpx awal@latest address\n\nUse this address as the payTo value."
      },
      {
        "title": "Step 2: Set Up the Project",
        "body": "mkdir x402-server && cd x402-server\nnpm init -y\nnpm install express x402-express\n\nCreate index.js:\n\nconst express = require(\"express\");\nconst { paymentMiddleware } = require(\"x402-express\");\n\nconst app = express();\napp.use(express.json());\n\nconst PAY_TO = \"<address from step 1>\";\n\n// x402 payment middleware — protects routes below\nconst payment = paymentMiddleware(PAY_TO, {\n  \"GET /api/example\": {\n    price: \"$0.01\",\n    network: \"base\",\n    config: {\n      description: \"Description of what this endpoint returns\",\n    },\n  },\n});\n\n// Protected endpoint\napp.get(\"/api/example\", payment, (req, res) => {\n  res.json({ data: \"This costs $0.01 per request\" });\n});\n\napp.listen(3000, () => console.log(\"Server running on port 3000\"));"
      },
      {
        "title": "Step 3: Run It",
        "body": "node index.js\n\nTest with curl — you should get a 402 response with payment requirements:\n\ncurl -i http://localhost:3000/api/example"
      },
      {
        "title": "paymentMiddleware(payTo, routes, facilitator?)",
        "body": "Creates Express middleware that enforces x402 payments.\n\nParameterTypeDescriptionpayTostringEthereum address (0x...) to receive USDC paymentsroutesobjectRoute config mapping route patterns to payment configfacilitatorobject?Optional custom facilitator (defaults to x402.org)"
      },
      {
        "title": "Route Config",
        "body": "Each key in the routes object is \"METHOD /path\". The value is either a price string or a config object:\n\n// Simple — just a price\n{ \"GET /api/data\": \"$0.05\" }\n\n// Full config\n{\n  \"POST /api/query\": {\n    price: \"$0.25\",\n    network: \"base\",\n    config: {\n      description: \"Human-readable description of the endpoint\",\n      inputSchema: {\n        bodyType: \"json\",\n        bodyFields: {\n          query: { type: \"string\", description: \"The query to run\" },\n        },\n      },\n      outputSchema: {\n        type: \"object\",\n        properties: {\n          result: { type: \"string\" },\n        },\n      },\n    },\n  },\n}"
      },
      {
        "title": "Route Config Fields",
        "body": "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"
      },
      {
        "title": "Supported Networks",
        "body": "NetworkDescriptionbaseBase mainnet (real USDC)base-sepoliaBase Sepolia testnet (test USDC)"
      },
      {
        "title": "Multiple endpoints with different prices",
        "body": "const payment = paymentMiddleware(PAY_TO, {\n  \"GET /api/cheap\": { price: \"$0.001\", network: \"base\" },\n  \"GET /api/expensive\": { price: \"$1.00\", network: \"base\" },\n  \"POST /api/query\": { price: \"$0.25\", network: \"base\" },\n});\n\napp.get(\"/api/cheap\", payment, (req, res) => { /* ... */ });\napp.get(\"/api/expensive\", payment, (req, res) => { /* ... */ });\napp.post(\"/api/query\", payment, (req, res) => { /* ... */ });"
      },
      {
        "title": "Wildcard routes",
        "body": "const payment = paymentMiddleware(PAY_TO, {\n  \"GET /api/*\": { price: \"$0.05\", network: \"base\" },\n});\n\napp.use(payment);\napp.get(\"/api/users\", (req, res) => { /* ... */ });\napp.get(\"/api/posts\", (req, res) => { /* ... */ });"
      },
      {
        "title": "Health check (no payment)",
        "body": "Register free endpoints before the payment middleware:\n\napp.get(\"/health\", (req, res) => res.json({ status: \"ok\" }));\n\n// Payment middleware only applies to routes registered after it\napp.get(\"/api/data\", payment, (req, res) => { /* ... */ });"
      },
      {
        "title": "POST with body schema",
        "body": "const payment = paymentMiddleware(PAY_TO, {\n  \"POST /api/analyze\": {\n    price: \"$0.10\",\n    network: \"base\",\n    config: {\n      description: \"Analyze text sentiment\",\n      inputSchema: {\n        bodyType: \"json\",\n        bodyFields: {\n          text: { type: \"string\", description: \"Text to analyze\" },\n        },\n      },\n      outputSchema: {\n        type: \"object\",\n        properties: {\n          sentiment: { type: \"string\" },\n          score: { type: \"number\" },\n        },\n      },\n    },\n  },\n});\n\napp.post(\"/api/analyze\", payment, (req, res) => {\n  const { text } = req.body;\n  // ... your logic\n  res.json({ sentiment: \"positive\", score: 0.95 });\n});"
      },
      {
        "title": "Using the CDP facilitator (authenticated)",
        "body": "For production use with the Coinbase facilitator (supports mainnet):\n\nnpm install @coinbase/x402\n\nconst { facilitator } = require(\"@coinbase/x402\");\n\nconst payment = paymentMiddleware(PAY_TO, routes, facilitator);\n\nThis requires CDP_API_KEY_ID and CDP_API_KEY_SECRET environment variables. Get these from https://portal.cdp.coinbase.com."
      },
      {
        "title": "Testing with the pay-for-service Skill",
        "body": "Once the server is running, use the pay-for-service skill to test payments:\n\n# Check the endpoint's payment requirements\nnpx awal@latest x402 details http://localhost:3000/api/example\n\n# Make a paid request\nnpx awal@latest x402 pay http://localhost:3000/api/example"
      },
      {
        "title": "Pricing Guidelines",
        "body": "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"
      },
      {
        "title": "Checklist",
        "body": "Get wallet address with npx awal@latest address\n Install express and x402-express\n Define routes with prices and descriptions\n Register payment middleware before protected routes\n Keep health/status endpoints before payment middleware\n Test with curl (should get 402) and npx awal@latest x402 pay (should get 200)\n Announce your service so other agents can find and use it"
      }
    ],
    "body": "Build an x402 Payment Server\n\nCreate 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.\n\nHow It Works\n\nx402 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.\n\nConfirm wallet is initialized and authed\nnpx awal@latest status\n\n\nIf the wallet is not authenticated, refer to the authenticate-wallet skill.\n\nStep 1: Get the Payment Address\n\nRun this to get the wallet address that will receive payments:\n\nnpx awal@latest address\n\n\nUse this address as the payTo value.\n\nStep 2: Set Up the Project\nmkdir x402-server && cd x402-server\nnpm init -y\nnpm install express x402-express\n\n\nCreate index.js:\n\nconst express = require(\"express\");\nconst { paymentMiddleware } = require(\"x402-express\");\n\nconst app = express();\napp.use(express.json());\n\nconst PAY_TO = \"<address from step 1>\";\n\n// x402 payment middleware — protects routes below\nconst payment = paymentMiddleware(PAY_TO, {\n  \"GET /api/example\": {\n    price: \"$0.01\",\n    network: \"base\",\n    config: {\n      description: \"Description of what this endpoint returns\",\n    },\n  },\n});\n\n// Protected endpoint\napp.get(\"/api/example\", payment, (req, res) => {\n  res.json({ data: \"This costs $0.01 per request\" });\n});\n\napp.listen(3000, () => console.log(\"Server running on port 3000\"));\n\nStep 3: Run It\nnode index.js\n\n\nTest with curl — you should get a 402 response with payment requirements:\n\ncurl -i http://localhost:3000/api/example\n\nAPI Reference\npaymentMiddleware(payTo, routes, facilitator?)\n\nCreates Express middleware that enforces x402 payments.\n\nParameter\tType\tDescription\npayTo\tstring\tEthereum address (0x...) to receive USDC payments\nroutes\tobject\tRoute config mapping route patterns to payment config\nfacilitator\tobject?\tOptional custom facilitator (defaults to x402.org)\nRoute Config\n\nEach key in the routes object is \"METHOD /path\". The value is either a price string or a config object:\n\n// Simple — just a price\n{ \"GET /api/data\": \"$0.05\" }\n\n// Full config\n{\n  \"POST /api/query\": {\n    price: \"$0.25\",\n    network: \"base\",\n    config: {\n      description: \"Human-readable description of the endpoint\",\n      inputSchema: {\n        bodyType: \"json\",\n        bodyFields: {\n          query: { type: \"string\", description: \"The query to run\" },\n        },\n      },\n      outputSchema: {\n        type: \"object\",\n        properties: {\n          result: { type: \"string\" },\n        },\n      },\n    },\n  },\n}\n\nRoute Config Fields\nField\tType\tDescription\nprice\tstring\tUSDC price (e.g. \"$0.01\", \"$1.00\")\nnetwork\tstring\tBlockchain network: \"base\" or \"base-sepolia\"\nconfig.description\tstring?\tWhat this endpoint does (shown to clients)\nconfig.inputSchema\tobject?\tExpected request body/query schema\nconfig.outputSchema\tobject?\tResponse body schema\nconfig.maxTimeoutSeconds\tnumber?\tMax time for payment settlement\nSupported Networks\nNetwork\tDescription\nbase\tBase mainnet (real USDC)\nbase-sepolia\tBase Sepolia testnet (test USDC)\nPatterns\nMultiple endpoints with different prices\nconst payment = paymentMiddleware(PAY_TO, {\n  \"GET /api/cheap\": { price: \"$0.001\", network: \"base\" },\n  \"GET /api/expensive\": { price: \"$1.00\", network: \"base\" },\n  \"POST /api/query\": { price: \"$0.25\", network: \"base\" },\n});\n\napp.get(\"/api/cheap\", payment, (req, res) => { /* ... */ });\napp.get(\"/api/expensive\", payment, (req, res) => { /* ... */ });\napp.post(\"/api/query\", payment, (req, res) => { /* ... */ });\n\nWildcard routes\nconst payment = paymentMiddleware(PAY_TO, {\n  \"GET /api/*\": { price: \"$0.05\", network: \"base\" },\n});\n\napp.use(payment);\napp.get(\"/api/users\", (req, res) => { /* ... */ });\napp.get(\"/api/posts\", (req, res) => { /* ... */ });\n\nHealth check (no payment)\n\nRegister free endpoints before the payment middleware:\n\napp.get(\"/health\", (req, res) => res.json({ status: \"ok\" }));\n\n// Payment middleware only applies to routes registered after it\napp.get(\"/api/data\", payment, (req, res) => { /* ... */ });\n\nPOST with body schema\nconst payment = paymentMiddleware(PAY_TO, {\n  \"POST /api/analyze\": {\n    price: \"$0.10\",\n    network: \"base\",\n    config: {\n      description: \"Analyze text sentiment\",\n      inputSchema: {\n        bodyType: \"json\",\n        bodyFields: {\n          text: { type: \"string\", description: \"Text to analyze\" },\n        },\n      },\n      outputSchema: {\n        type: \"object\",\n        properties: {\n          sentiment: { type: \"string\" },\n          score: { type: \"number\" },\n        },\n      },\n    },\n  },\n});\n\napp.post(\"/api/analyze\", payment, (req, res) => {\n  const { text } = req.body;\n  // ... your logic\n  res.json({ sentiment: \"positive\", score: 0.95 });\n});\n\nUsing the CDP facilitator (authenticated)\n\nFor production use with the Coinbase facilitator (supports mainnet):\n\nnpm install @coinbase/x402\n\nconst { facilitator } = require(\"@coinbase/x402\");\n\nconst payment = paymentMiddleware(PAY_TO, routes, facilitator);\n\n\nThis requires CDP_API_KEY_ID and CDP_API_KEY_SECRET environment variables. Get these from https://portal.cdp.coinbase.com.\n\nTesting with the pay-for-service Skill\n\nOnce the server is running, use the pay-for-service skill to test payments:\n\n# Check the endpoint's payment requirements\nnpx awal@latest x402 details http://localhost:3000/api/example\n\n# Make a paid request\nnpx awal@latest x402 pay http://localhost:3000/api/example\n\nPricing Guidelines\nUse Case\tSuggested Price\nSimple data lookup\t$0.001 - $0.01\nAPI proxy / enrichment\t$0.01 - $0.10\nCompute-heavy query\t$0.10 - $0.50\nAI inference\t$0.05 - $1.00\nChecklist\n Get wallet address with npx awal@latest address\n Install express and x402-express\n Define routes with prices and descriptions\n Register payment middleware before protected routes\n Keep health/status endpoints before payment middleware\n Test with curl (should get 402) and npx awal@latest x402 pay (should get 200)\n Announce your service so other agents can find and use it"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/0xRAG/monetize-service",
    "publisherUrl": "https://clawhub.ai/0xRAG/monetize-service",
    "owner": "0xRAG",
    "version": "0.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "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"
  }
}