Xpersona
P

Primer x402

CLAWHUB · Unverified

Make HTTP-native crypto payments using the x402 protocol. Pay for APIs, access paid resources, and handle 402 Payment Required responses with USDC on Base and other EVM chains. Skill: Primer x402 Owner: primersystems2357 Summary: Make HTTP-native crypto payments using the x402 protocol. Pay for APIs, access paid resources, and handle 402 Payment Required responses with USDC on Base and other EVM chains. Tags: 402:0.5.0, ai-payments:0.5.0, api-monetization:0.5.0, arbitrum:0.5.0, base:0.5.0, crypto:0.5.0, eip-3009:0.5.0, ethereum:0.5.0, latest:0.5.0, micropayments:0.5.0, optimism:0.5.0, pay-p

62
Rank
84
Safety
1.3k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 4/15/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install kn7ef26xgk9r16qd3x6jv6b5ks80a7tr:primer-x402
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-primersystems2357-primer-x402/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

8,016 characters of source documentation, loaded on request.

Extracted files

2 files captured from the source.

SKILL.md

---
name: primer-x402
description: Make HTTP-native crypto payments using the x402 protocol. Pay for APIs, access paid resources, and handle 402 Payment Required responses with USDC on Base and other EVM chains.
metadata: {"openclaw":{"emoji":"💸","requires":{"anyBins":["node","npx","python3","pip"]}}}
---

# x402 Payment Protocol

x402 enables instant stablecoin payments directly over HTTP using the 402 Payment Required status code. Perfect for AI agents paying for APIs, data, or compute on-demand.

## When to Use This Skill

Use x402 when:
- You encounter a **402 Payment Required** HTTP response
- You need to access a **paid API or resource**
- The user asks you to **pay for something** with crypto/USDC
- You need to **check wallet balance** or manage payments

## How to Respond

| User Says/Asks | What to Do |
|----------------|------------|
| "I got a 402 error" | This is an x402 payment request. Probe the URL, show the price, ask if they want to pay |
| "Pay for this API" | Use `x402 pay <url>` with appropriate max-amount |
| "Check my balance" | Run `x402 wallet balance <address>` |
| "Set up x402" / "Set up payments" | Run `x402 openclaw init` |
| "What networks do you support?" | List supported networks (Base, Ethereum, Arbitrum, etc.) |
| "How much does X cost?" | Probe the URL with `x402 probe <url>` to get pricing |
| "Create a wallet" | Run `x402 wallet create` |
| User hits paywall while browsing | Suggest installing **Primer Pay** browser extension |

## Quick Setup

### Node.js
```bash
npx @primersystems/x402 openclaw init
```

### Python
```bash
pip install primer-x402
x402 openclaw init
```

This will:
1. Create a new wallet (or use existing)
2. Save config to `~/.openclaw/skills/primer-x402/`
3. Display your wallet address to fund

## How x402 Works

1. **Request** → You call a paid API
2. **402 Response** → Server returns payment requirements in headers
3. **Pay & Retry** → Sign payment, retry with `X-PAYMENT` header
4. **Access** → Server verifies, settles on-chain, returns resource

The payment is gasless for the payer - the facilitator handles gas fees.

## CLI Commands

| Command | Description |
|---------|-------------|
| `x402 wallet create` | Create a new wallet |
| `x402 wallet balance <address>` | Check USDC balance |
| `x402 wallet from-mnemonic` | Restore wallet from mnemonic |
| `x402 probe <url>` | Check if URL requires payment and get price |
| `x402 pay <url>` | Pay for a resource (requires X402_PRIVATE_KEY) |
| `x402 pay <url> --dry-run` | Preview payment cost without paying |
| `x402 networks` | List supported networks |
| `x402 openclaw init` | Set up x402 for this agent |
| `x402 openclaw status` | Check setup status and balance |

### Examples

```bash
# Check if a URL requires payment
npx @primersystems/x402 probe https://api.example.com/paid

# Preview payment cost (dry run - no payment made)
npx @primersystems/x402 pay https://api.example.com/paid --dry-run

# Check wallet balance
npx @primersystems/x402 

_meta.json

{
  "ownerId": "kn7ef26xgk9r16qd3x6jv6b5ks80a7tr",
  "slug": "primer-x402",
  "version": "0.5.0",
  "publishedAt": 1769958615684
}

Sponsored

Ads related to Primer x402 and adjacent AI workflows.