x402-payments

Installation
SKILL.md

x402 Protocol Skill

Protocol Overview

x402 embeds stablecoin payments into HTTP by using the 402 "Payment Required" status code. A server responds with payment requirements; the client signs a payment authorization, resubmits the request, and gets the resource after verification and settlement.

Payment flow:

  1. Client sends HTTP request → Server returns 402 + PAYMENT-REQUIRED header (base64 JSON)
  2. Client reads requirements, creates signed payment payload
  3. Client resubmits request with PAYMENT-SIGNATURE header (base64 JSON)
  4. Server verifies payment via facilitator POST /verify
  5. Server performs work, settles via facilitator POST /settle
  6. Server returns 200 + resource + PAYMENT-RESPONSE header (contains txHash)

Key concepts:

  • Facilitators verify and settle payments without holding funds. Use https://x402.org/facilitator for testnet, CDP facilitator for mainnet.
  • Schemes: exact (fixed price per request) is the production scheme. upto and deferred are proposed.
  • Networks: Identified by CAIP-2 format — eip155:84532 (Base Sepolia), eip155:8453 (Base Mainnet), solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1 (Solana Devnet).
  • EVM uses EIP-3009 gasless TransferWithAuthorization. Solana uses SPL token transfers.
Related skills
Installs
11
GitHub Stars
4
First Seen
Feb 11, 2026