x402 · git:20260610.61657e2 · 2026-06-10 · sha256 a3b2cfa07c8fd3f8

x402 git:20260610.61657e2A

Immutable. This exact content never changes and is served at /api/v1/blob/a3b2cfa07c8fd3f8.

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_4pxd75hlf57mnutb/a3b2cfa07c8fd3f8d7146afafed5ef3dc44cb8f13c2da3b57cf5aedcb4ec22e2.json

Then /plugin install x402@markdownregistry-4pxd75hlf57mnutb in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.

---
name: x402
description: x402 agentic payments (Coinbase's HTTP 402 protocol). Custody-free tools to pay x402-protected endpoints (build the EIP-3009 transferWithAuthorization the payer signs, assemble the X-PAYMENT header), call a facilitator (verify/settle/supported), and monetize your own API by generating PaymentRequirements. USDC on Base. Triggers: x402, HTTP 402, pay per request, agentic payment, machine payment, X-PAYMENT, transferWithAuthorization, EIP-3009, facilitator, monetize API, pay for API, agent pays.
---

# x402 Payments skill

x402 turns HTTP `402 Payment Required` into a real payment rail for agents: a
server replies `402` with what it wants paid; the client signs an off-chain
authorization and retries with an `X-PAYMENT` header; a facilitator broadcasts
it. Settlement uses EIP-3009 `transferWithAuthorization` (e.g. USDC on Base) —
the facilitator can only broadcast the signed authorization, never alter the
amount or destination.

**Custody-free:** the plugin builds the EIP-712 the payer signs and assembles
the header; it never holds a key.

## Tools

| Tool | Purpose |
|---|---|
| `chaingpt_x402_decode` | Decode a 402 body or X-PAYMENT header into human terms (amount/token/recipient/expiry) before paying. |
| `chaingpt_x402_build_payment` | Build the UNSIGNED EIP-3009 typed data; pass a signature back to get the final `X-PAYMENT` header. |
| `chaingpt_x402_facilitator` | Call a facilitator: `supported` / `verify` / `settle`. |
| `chaingpt_x402_create_requirements` | Server side: generate the `PaymentRequirements` + 402 body to monetize your endpoint. |

## Pay an endpoint (client flow)

1. Hit the resource → get a `402` with a JSON body. `chaingpt_x402_decode body=<402 json>`.
2. `chaingpt_x402_build_payment from=<payer> requirements=<chosen option>` → typed data.
3. Sign it (payer wallet or the agent wallet's EIP-712 path).
4. `chaingpt_x402_build_payment …same args… signature=0x…` → the `X-PAYMENT` header.
5. Retry the request with that header.

## Monetize your endpoint (server flow)

`chaingpt_x402_create_requirements network=base amount=0.01 payTo=<you>` → serve
the returned JSON with HTTP 402. Verify/settle incoming payments via a
facilitator (`chaingpt_x402_facilitator`).

Known EIP-3009 tokens: USDC on `base` and `base-sepolia`. For other tokens pass
full `PaymentRequirements` (with `asset` + `extra.name`/`extra.version`).
0 ChainGPT credits.