x402
하는 일
이 스킬은 표준 HTTP 402 결제 응답을 이용해 웹 서비스가 요청마다 요금을 받게 하는 x402를 다룹니다. 에이전트는 결제 요청을 해석하고, 서명할 결제를 준비하며, 퍼실리테이터 서비스로 결제를 검증하거나 정산할 수 있습니다.
사용하는 경우
- ✓온라인 서비스가 결제 요청을 보내고, 에이전트가 이를 결제해야 할 때.
- ✓내 API에 대해 다른 에이전트에게 요청마다 요금을 받고 싶을 때.
- ✓승인하기 전에 결제 요청을 확인해야 할 때.
스킬 링크
https://github.com/internet-court/internet-court-skill/blob/main/vendored/chaingpt/x402/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“에이전트가 결제를 요구한 API에 돈을 내게 하되, 먼저 얼마를 내야 하는지 설명해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 결제 요청을 읽고 금액, 코인, 수신자를 쉬운 말로 설명합니다. 서명되지 않은 결제를 준비하면 지갑이 서명하고, 에이전트가 이를 요청과 함께 다시 보냅니다. 퍼실리테이터는 여러분이 서명한 금액이나 수신자를 바꿀 수 없습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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.
자주 묻는 질문
에이전트가 제 지갑 키를 가지고 있나요?
아니요. 스킬은 에이전트가 키를 절대 보관하지 않으며, 서명은 여러분의 지갑이 한다고 말합니다.
퍼실리테이터는 무엇인가요?
서명된 결제를 검증하고 블록체인에 보내는 서비스입니다.
어떤 코인을 쓰나요?
스킬의 예시는 Base 네트워크의 USDC를 사용합니다.
상세 정보
작성자의 원본 설명
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.
인기도
- GitHub 스타
- 7.0k
- 순위
- #13623
- 라이선스
- —
- 업데이트
- 2026. 10. 26.
댓글
- …
이 저장소의 다른 스킬
internet-court
7.0k에이전트가 다른 AI 에이전트나 유료 서비스와 안전하게 결제하거나 거래하도록 돕고, 적합한 전문 가이드를 알려 줍니다.
genlayer-erc7710-connector
7.0k에이전트가 GenLayer 검토 결과를 권한 시스템에 연결하도록 돕습니다. 나쁜 검토는 에이전트의 권한을 제한하거나 취소할 수 있습니다.
genlayer-intelligent-contracts
7.0k에이전트가 다른 에이전트가 위임받은 범위를 지켰는지 확인하는 AI 심판의 규칙, 증거, 결과를 정하도록 돕습니다.
x402-erc7710
7.0k에이전트가 웹 서비스 요금을 요청 한 건마다 결제하고, 권한 예산 안에서 지속적인 지출을 설정하도록 돕습니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.