x402-sdk
TypeScript SDK for the x402 HTTP payment protocol — add crypto payments to any API.
Last updated
Was this helpful?
TypeScript SDK for the x402 HTTP payment protocol — add crypto payments to any API.
GitHub: fastxyz/fast-sdk
Pay-per-request APIs — charge for individual API calls using HTTP 402
No accounts needed — just sign and pay
Multi-chain — Fast (instant), Arbitrum, Base, Ethereum
npm install @fastxyz/x402-client @fastxyz/x402-server @fastxyz/x402-facilitatorThe x402 protocol is HTTP-native. On the server side, you add payment middleware to your routes — unprotected requests receive a 402 Payment Required response with payment details. On the client side, the SDK handles the full flow: receive the 402, sign a payment, attach proof, and retry — all in one call.
For complete setup instructions, runnable code examples for both server and client, and protocol details, see the individual package READMEs linked above or the Fast SDK monorepo on GitHub.
Last updated
Was this helpful?
Was this helpful?