x402-facilitator

Installation
SKILL.md

x402 Integration Guide

This skill helps LLM developers integrate on-chain payments into their applications using the x402 protocol and the facilitator packages.

What x402 Does

x402 revives the HTTP 402 Payment Required status code. Instead of API keys or subscriptions, a server returns 402 with payment requirements (amount, token, recipient). The client signs an off-chain authorization and re-sends the request with payment attached. A facilitator (relayer) verifies the signature and submits the on-chain transaction — the buyer never needs ETH for gas.

The key insight: payments happen at the HTTP layer. No accounts, no OAuth, no billing portal. Just: request → 402 → pay → 200.

Two Integration Scenarios

1. You have an API and want to charge per request (Seller)

Your server returns 402 when a request arrives without payment, then verifies and settles the payment before delivering the resource. You can use the official @x402/express (or @x402/hono, @x402/next) middleware for automatic handling, or implement the 402 flow manually for full control.

Read references/building-a-seller.md for the complete flow with code examples.

2. You have an agent that pays other agents/services (Buyer)

Installs
3
GitHub Stars
2
First Seen
Apr 10, 2026
Security Audits