Payment API#
The Payment API is an on-chain payment solution built on the x402 protocol — enabling token payments and settlement via standard HTTP requests, with no complex gateway integration required. It supports two integration modes: AI Agent conversational drive and API.
Why Choose the Payment API#
- Zero-barrier onboarding — Built on the standard HTTP protocol, with no account registration or OAuth configuration required. Complete token payments directly through API calls.
- Instant payments, low cost — An internet-native payment protocol with a standardized process that removes intermediaries, so payments arrive immediately.
- AI-friendly — Supports pay-per-use billing, ideal for real-time AI calls and high-frequency micro-transactions, helping AI developers monetize with ease.
- Open standard — Built on the open x402 protocol, compatible with mainstream blockchains for fast integration and easy expansion to more networks.
Core Features#
- Gas subsidies — Transfer and spend USDG and USDT on X Layer with zero gas fees.
- Multi-chain support — Currently supports X Layer; more public chains are in development, stay tuned.
- Multiple stablecoins — Currently supports USDG and USDT.
- Compliance & security — Built-in KYT (Know Your Transaction) risk detection ensures compliance for every payment.
Roles#
- Seller (Server) — Service providers who want to monetize their APIs or content. The Payment API allows buyers to pay programmatically with minimal setup.
- Buyer (Client) — Developers and AI Agents who want to access paid services without registering an account or going through a manual payment process.
- Facilitator — A service provided by OKX. Sellers interact with the Facilitator via HTTP requests to handle transaction verification and settlement.
How It Works#
Table of contents