Multi-language SDK for x402 and MPP payment protocols, enabling cryptocurrency micropayments for API resources.
| Language | Path | x402 | MPP |
|---|---|---|---|
| Go | go/ |
✅ | ✅ |
| Python | python/ |
✅ | ✅ |
| Rust | rust/ |
✅ | ✅ |
| TypeScript | typescript/ |
✅ | ✅ |
| Java | java/ |
✅ |
x402 and MPP both use HTTP 402 Payment Required to gate access to paid resources. When a client requests a resource, the server responds with 402 and payment details. The client signs a payment authorization, retries the request with proof of payment, and receives the resource after verification.
- 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
- charge — One-shot payment per request via EIP-3009
- session — Payment channel with incremental vouchers for streaming payments
x402 support is built on the x402 open standard by Coinbase (Apache 2.0), with extensions for OKX X Layer, aggregated deferred settlement, and TEE wallet signing.
Apache 2.0 — See LICENSE for details.