x402-payments
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:
- Client sends HTTP request → Server returns
402+PAYMENT-REQUIREDheader (base64 JSON) - Client reads requirements, creates signed payment payload
- Client resubmits request with
PAYMENT-SIGNATUREheader (base64 JSON) - Server verifies payment via facilitator
POST /verify - Server performs work, settles via facilitator
POST /settle - Server returns
200+ resource +PAYMENT-RESPONSEheader (contains txHash)
Key concepts:
- Facilitators verify and settle payments without holding funds. Use
https://x402.org/facilitatorfor testnet, CDP facilitator for mainnet. - Schemes:
exact(fixed price per request) is the production scheme.uptoanddeferredare 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.
More from aznatkoiny/zai-skills
consulting-frameworks
>
113real-estate-investment
>
13reinforcement-learning
|
11cpp-reinforcement-learning
|
9deep-learning
Comprehensive guide for Deep Learning with Keras 3 (Multi-Backend: JAX, TensorFlow, PyTorch). Use when building neural networks, CNNs for computer vision, RNNs/Transformers for NLP, time series forecasting, or generative models (VAEs, GANs). Covers model building (Sequential/Functional/Subclassing APIs), custom training loops, data augmentation, transfer learning, and production best practices.
8prompt-optimizer
Optimize prompts for Claude 4.x models using Anthropic's official best practices. Use when users want to improve, refine, or create effective prompts for Claude. Triggers include requests to optimize prompts, make prompts more effective, fix underperforming prompts, create system prompts, improve instruction following, reduce verbosity, control output formatting, or enhance agentic/tool-use behaviors. Also use when users report Claude is being too verbose, not following instructions, not using tools properly, or producing generic outputs.
8