x402
What it does
This skill covers x402, a way for web services to charge for each request using the standard HTTP 402 payment response. The agent can decode a payment request, prepare a payment to sign, and use a facilitator service to verify or settle it.
When to use it
- βWhen an online service replies with a payment request and your agent needs to pay it.
- βWhen you want to charge other agents per request for your own API.
- βWhen you need to check a payment request before you approve it.
Skill link
https://github.com/internet-court/internet-court-skill/blob/main/vendored/chaingpt/x402/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI want my agent to pay for an API that asked for payment, but first explain what it wants me to pay.β
5 new skills a week. 1 minute to read.
How it works
The agent reads the payment request and explains the amount, coin and recipient in plain terms. It prepares an unsigned payment, your wallet signs it, and the agent sends it back with the request. The facilitator cannot change the amount or recipient you signed.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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. |
chaingpt_x402_fetch |
The whole client loop in one tool: fetch a URL; on 402 it decodes the challenge and (given from) emits the unsigned typed data; re-call with xPaymentHeader to complete the paid request. |
Pay an endpoint (client flow)
Fast path β one tool drives the loop:
chaingpt_x402_fetch url=<resource> from=<payer>β on 402 you get the decoded price/payee AND the unsigned EIP-3009 typed data.- Sign the typed data in the payer's wallet.
chaingpt_x402_build_payment from=<payer> requirements=<from step 1> signature=0xβ¦β theX-PAYMENTheader.chaingpt_x402_fetch url=<resource> xPaymentHeader=<header>β the paid response.
Manual path (same primitives, finer control): _decode β _build_payment β sign β _build_payment +signature β retry yourself.
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.
FAQ
Does the agent hold my wallet key?
No. The skill says the agent never holds a key, and your wallet does the signing.
What is a facilitator?
It is a service that checks a signed payment and sends it to the blockchain.
Which coin does it use?
The skill's examples use USDC on the Base network.
Details
Original description by the author
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.
Popularity
- GitHub stars
- 7.0k
- Ranking position
- #13623
- License
- β
- Updated
- 10/26/2026
Comments
- β¦
More skills from this repository
internet-court
7.0kHelps your agent pay, hire, or deal safely with another AI agent or paid service, and points it to the right specialized guide.
genlayer-erc7710-connector
7.0kHelps your agent connect an AI review result to a permission system, so a bad review can limit or cancel an agent's permissions.
genlayer-intelligent-contracts
7.0kHelps your agent define the rules, evidence and outputs of an AI judge that checks whether another agent followed its mandate.
x402-erc7710
7.0kHelps your agent pay for web services one request at a time, and set up ongoing spending that stays within a permission budget.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.