Onchain OS x402 Payment for Openclaw

A specialized skill for signing x402 payment authorizations to access third-party payment-gated resources.

ok-james-01
v3.1.3
May 9, 2026
0
955
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install okx-x402-payment

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 okx-x402-payment 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 Onchain OS x402 Payment?

The Onchain OS x402 Payment skill is a critical component of the Openclaw Skills ecosystem designed to handle HTTP 402 Payment Required responses. It enables AI agents to autonomously but securely sign payment authorizations for external resources, such as premium data feeds or gated APIs, using the x402 protocol standards.

By leveraging this skill, developers can integrate seamless payment workflows into their agentic tasks. The skill supports both high-security TEE (Trusted Execution Environment) signing via wallet sessions and a local fallback for power users using hex private keys, ensuring flexibility across different deployment environments while maintaining strict adherence to CAIP-2 network standards.

Onchain OS x402 Payment Use Cases

  • Accessing premium third-party APIs that require on-chain micro-payments.
  • Automating data retrieval from x402-gated research portals.
  • Handling EIP-3009 transfer authorizations for decentralized service providers within agentic workflows.
  • Integrating blockchain-based payment logic into AI-driven browsing and data collection tasks.

How Onchain OS x402 Payment Works

  1. The AI agent makes an initial HTTP request to an external resource URL.
  2. If the resource returns an HTTP 402 response, the skill extracts the required payment metadata from headers (v2) or the response body (v1).
  3. Within the Openclaw Skills flow, the skill decodes these requirements and displays payment details (amount, asset, network) for user confirmation.
  4. Upon confirmation, the skill checks the wallet status or prompts the user to provide a local private key.
  5. It generates a cryptographic signature using the selected scheme, such as exact for EIP-3009 or aggr_deferred for session keys.
  6. Finally, it assembles the standardized payment header and replays the original request to access the secured data.

Onchain OS x402 Payment Setup

To begin using this tool within Openclaw Skills, ensure the Onchain OS CLI is installed and your environment is ready. You can check supported EVM chains using the following command:

onchainos wallet chains

For local signing capabilities, configure your private key in the environment file:

echo "EVM_PRIVATE_KEY=0xYourHexKey" >> ~/.onchainos/.env
chmod 600 ~/.onchainos/.env

Onchain OS x402 Payment Data Schema & Taxonomy

The skill manages complex payment payloads by organizing data into versioned structures. Here is how the Openclaw Skills payment data is organized:

Feature Version 1 Version 2
Payload Location Response Body PAYMENT-REQUIRED Header (Base64)
Signature Header X-PAYMENT PAYMENT-SIGNATURE
Asset Identifier CAIP-2 (eip155:*) CAIP-2 (eip155:*)
Signature Schemes exact, aggr_deferred exact, aggr_deferred
Confirmation Manual User Step Manual User Step

Onchain OS x402 Payment Advanced Features

  • Secure TEE-based signing ensures that private keys never leave the secure enclave during authorization.
  • Full support for aggr_deferred schemes, allowing for session-key based signing that streamlines high-frequency agentic payments.
  • Seamless cross-skill integration, allowing developers to combine payment signing with security scanning or wallet balance tracking.
  • Automated EIP-3009 local signing fallback for headless environments managed through Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*