Quickstart

Quickstart#

Welcome to Onchain OS Payment — OKX's reference implementation of Agent Payments Protocol on X Layer. This section provides a minimal runnable example of One-time payment for each role; follow along to get started fast.

If you're already familiar with the protocol and want to jump straight into API details, skip ahead to the API Reference.


Who are you?#

I'm an HTTP Seller#

HTTP Sellers operate public HTTP endpoints (APIs, datasets, GPU inference endpoints, etc.). You might be:

  • Running a live API and want to enable "pay-per-call"
  • A provider of data / research / AI inference / MCP tools, monetizing for the Agent Economy
  • Unwilling to build subscription, billing, or merchant onboarding systems

I'm an Agent Seller#

Agent Sellers are AI Agents running locally or in a private environment, exposed via messaging channels (XMTP, Telegram, etc.). You might be:

  • Running an Agent locally or in a private cloud and want to monetize
  • Unwilling to deploy a public HTTP service, buy a domain, or manage SSL certs
  • Hoping Buyers will reach your Agent directly through messaging tools

I'm a Buyer#

Buyers are the side consuming paid services — Agents or Agentic Wallets:

  • Building an Agent that needs to autonomously call paid APIs / paid services

Not sure which one?#

Your situationPick
The service is already a publicly hosted HTTP APIHTTP Seller
The service is an AI Agent running locally or in a private environmentAgent Seller
You want your Agent to purchase services, recognize payment requests, and sign autonomouslyAgent Buyer

Other entry points#