x402 Bazaar for Openclaw

A technical integration skill for implementing the machine-payable HTTP 402 protocol, enabling automated USDC payments and tool purchases for AI agents.

agentpmt
v1.0.2
Jun 10, 2026
1
512
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install x402-bazaar

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 x402-bazaar 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 x402 Bazaar?

The x402 Bazaar skill provides an actionable implementation framework for turning standard HTTP 402 responses into an automated, machine-payable commerce engine. Built around the Openclaw Skills ecosystem, it guides developers through executing the two-step HTTP handshake, signing compliant EIP-3009 TransferWithAuthorization parameters, and settling USDC-denominated transactions over the Base network.

By leveraging this blueprint, developers can equip autonomous AI agents with the ability to acquire runtime credits, interact with the AgentPMT marketplace, and seamlessly manage cryptographic signatures. This eliminates manual intervention during agent-to-agent transactions, unlocking friction-free commercial interactions across autonomous networks.

x402 Bazaar Use Cases

  • Implementing autonomous agent-to-agent commerce using the x402 machine payment standard.
  • Automating the purchase of marketplace credits for external AI agent wallets.
  • Handling cryptographic challenges and verifying EIP-191 message signatures for authenticated tool execution.
  • Setting up error recovery routines for blockchain-based API transaction failures.

How x402 Bazaar Works

  1. Initial Purchase Request: The AI agent issues an initial POST request to the credit purchase endpoint without including payment information.
  2. Challenge Detection: The server responds with an HTTP 402 status code and supplies essential transaction requirements inside the PAYMENT-REQUIRED header.
  3. Payload Decoding: The agent extracts critical transaction fields from the header, such as the payee address, token type, transaction amount, chain ID, validity window, and unique nonce.
  4. Authorization Signing: Using the decoded challenge details, the agent signs an EIP-3009 TransferWithAuthorization payload for USDC on the Base network.
  5. Payment Submission: The agent retries the original purchase request, attaching the base64-encoded signature inside the PAYMENT-SIGNATURE header to complete settlement.
  6. Session Interaction: Once credits settle, subsequent balance checks and tool actions are authenticated via wallet-signed EIP-191 messages.

x402 Bazaar Setup

To activate and run this protocol resource within your local developer environment, use your package manager or setup utility to install the designated skill definition:

# Install or refresh the x402-bazaar skill via your local environment script
./skills.sh install x402-bazaar

# Alternatively, fetch it directly from the central hub
clawhub install x402-bazaar

Ensure that your agent runtime contains an active Web3 wallet provider capable of signing EIP-3009 and EIP-191 payloads natively.

x402 Bazaar Data Schema & Taxonomy

Core API Endpoints

Purpose Endpoint
Create wallet POST https://www.agentpmt.com/api/external/agentaddress
Buy credits POST https://www.agentpmt.com/api/external/credits/purchase
Create session POST https://www.agentpmt.com/api/external/auth/session
List tools GET https://www.agentpmt.com/api/external/tools
Invoke tool with credits or direct x402 POST https://www.agentpmt.com/api/external/tools/{productSlug}/actions/{actionSlug}/invoke

EIP-191 Message Specifications

  • Balance Schema: A scoped plain-text template containing wallet, session, request, and action:balance blocks with an empty payload field.
  • Tool Invocation Schema: A path-bound plain-text template incorporating the HTTP method (POST), the target path (/external/tools/{productSlug}/actions/{actionSlug}/invoke), and a payload_hash variable.
  • Payload Hashing: A standard SHA-256 hash computed over the canonical JSON representation of the action's parameters object, prioritizing sorted keys and stripping extra whitespace.

x402 Bazaar Advanced Features

  • Deterministic Path-Bound Signing: Supports resilient EIP-191 verification by signing exact API route paths while ignoring hostnames and variable query strings.
  • Canonical JSON Normalization: Cross-compatible with both JavaScript raw UTF-8 serialization and Python escaped JSON formatting schemas.
  • Granular Error Recovery Matrix: Built-in logic mapping for distinct protocol flags such as EXTERNAL_SIGNATURE_SESSION_NONCE_EXPIRED and EXTERNAL_SIGNATURE_REQUEST_REPLAY to facilitate immediate self-healing retries.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*