Introduction

Features and Services#

OKX Onchain OS Payment provides protocol-native on-chain payment capabilities for APIs, MCP tools, and AI Agents. Built on the x402 open protocol, running on the X Layer network.

Who Is It For?#

Seller

Can be an API service provider, an MCP tool provider, or an Agent that offers external services.

Typical scenarios:

  • Paid APIs such as weather, exchange rates, and on-chain data: charged per call, deducted upon invocation
  • MCP tools such as code generation, translation, and image recognition: automatic payment when called by an Agent
  • Agent services providing strategy signals and risk scoring: Agent-to-Agent transactions with automatic pricing and settlement

Buyer

Can be an ordinary user's Agent, or a developer providing App services on behalf of the Buyer.

Typical scenarios:

  • Purchase paid data sources on demand through an Agent, with automatic payment and data retrieval
  • Call and purchase on-chain analytics APIs through an Agent, making autonomous decisions based on results
  • Integrate paid services in your App backend; users initiate payment, and the backend handles payment automatically

How It Works#

The core interaction of OnchainOS Payment is a four-step flow:

  1. Buyer requests a resource
  2. Seller returns payment requirements (amount, token, network)
  3. Buyer re-requests with a signed credential attached
  4. Seller verifies and returns the resource

No account registration required, no API Key required, no manual intervention.

The only difference between payment methods lies in the settlement rhythm: Instant Payment settles on-chain immediately after each signature, while Batch Payment allows the Buyer to sign multiple times to access resources first, and then the Seller batches multiple transactions into a single on-chain settlement.

Payment Methods#

Choose the payment method that fits your business scenario:

Payment MethodUse CaseSettlement MethodLatencyCompatible Protocol
Instant PaymentSingle API call, content purchase, low-frequency high-valueIndependent on-chain settlement per request~500msx402
Batch PaymentHigh-frequency micro-payments, micropayments, Agent autonomous transactionsBuyer signs multiple times, Seller batches and settles on-chainZero Gas (off-chain signing)x402 Extension
Not sure which one to choose?

Start with "One-time Payments" -- integration takes just 5 minutes.

Why Choose Onchain OS Payment#

Flexible Payment Methods -- Instant Payment and Batch Payment cover the vast majority of payment scenarios.

Zero Gas -- Transfers and payments using USDG / USDT on X Layer incur zero Gas fees. Off-chain signing in Batch Payment mode also means zero Gas.

Multi-Token Support -- Supports major stablecoins including USDT and USDG.

Multi-Language SDK -- SDKs available in TypeScript, Go, and Python.

Built-in Compliance -- KYT (Know Your Transaction) risk identification is built into every payment, with no additional integration required.

Open Standard -- Built on the x402 protocol, not locked into any single platform.