Pay for Service for Openclaw

A tool for AI agents to automatically pay for and call paid API services using USDC on the Base network.

0xrag
v0.1.0
Feb 12, 2026
0
1.7k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install pay-for-service

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install pay-for-service using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Pay for Service?

The Pay for Service skill enables AI agents to autonomously handle paid API interactions via the x402 protocol. By leveraging Openclaw Skills and the Awal CLI, agents can perform GET or POST requests to premium endpoints while automatically processing USDC payments on the Base network. This eliminates manual payment friction and allows agents to access a wide range of paid digital services and datasets programmatically.

This skill is essential for developers building agents that need to consume resources which are not free. By integrating with the Awal wallet system, it ensures that every API call is backed by a verifiable transaction on the blockchain, providing a robust framework for the machine-to-machine economy within Openclaw Skills.

Pay for Service Use Cases

  • Triggering paid API requests for premium data like real-time financial feeds or specialized AI models.
  • Automating micro-payments for individual service calls without manual user intervention.
  • Limiting agent spending by setting strict maximum payment amounts for specific requests.
  • Integrating paid search or research services into complex multi-agent workflows.

How Pay for Service Works

  1. The agent verifies the current wallet authentication status to ensure it can sign transactions.
  2. The system checks the USDC balance to confirm there are sufficient funds for the intended request.
  3. The user or agent provides an x402-compliant URL and any necessary request parameters (method, body, headers).
  4. The skill executes the npx awal@latest x402 pay command, which handles the blockchain transaction and the HTTP request simultaneously.
  5. The paid API response is returned to the agent for further processing.

Pay for Service Setup

Ensure you have the Awal CLI installed and your wallet is funded with USDC on the Base network.

# Check if the wallet is authenticated
npx awal@latest status

# Check USDC balance (requires atomic units understanding)
npx awal@latest balance

Pay for Service Data Schema & Taxonomy

The skill utilizes specific parameters to manage payments and API communication effectively:

Field Description Format
url Target x402 API endpoint String (URL)
max-amount Maximum USDC atomic units allowed for the call Integer (1,000,000 = $1.00)
method HTTP method to use for the request GET, POST, PUT, DELETE
data JSON payload for request bodies JSON String
correlation-id Identifier to group related operations String

Pay for Service Advanced Features

  • Transaction grouping using correlation IDs to track complex multi-step paid workflows.
  • Precise spend control using atomic units to manage micro-transactions as low as $0.01.
  • Full support for custom headers and query parameters to satisfy diverse API requirements.
  • Seamless integration with the Openclaw Skills search functionality to discover new paid services dynamically.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*