Multi-language SDK for the x402 HTTP payment protocol, enabling cryptocurrency micropayments for API resources.
Built on the x402 open standard, with extensions for OKX X Layer, aggregated deferred settlement, and TEE wallet signing.
| Language | Path | Status |
|---|---|---|
| Go | go/ |
✅ |
| Rust | rust/ |
✅ |
x402 is a protocol for HTTP 402 Payment Required responses with cryptocurrency micropayments. When a client requests a paid resource, the server responds with 402 Payment Required along with payment details. The client signs a payment authorization, retries the request, and receives the resource after verification and settlement.
- X Layer (
eip155:196) — USD₮0 (0x779Ded0c9e1022225f8E0630b35a9b54bE713736), auto-configured
- exact — Transfer an exact amount per request via EIP-3009
- aggr_deferred — Aggregated deferred settlement via facilitator batching
This project is built on the x402 protocol and incorporates code from the x402 reference implementation by Coinbase, licensed under Apache 2.0. We extend our thanks to the Coinbase team for creating this open standard.
Apache 2.0 — See LICENSE for details.