Skip to main content
This page gets you set up quickly as a merchant (server) or a buyer (client). If your goal is to let AI agents pay for an API or SaaS operation, start with Accept payments from AI agents for the end-to-end path. For a complete Mainnet merchant and guarded buyer, choose Base Express with upstream @x402/evm or Solana Express with @x402/svm. Choose your language and framework below to get started.

Servers (Merchants)

Express

Quickstart for building an x402-enabled server with Express.

Hono

Quickstart for building an x402-enabled server with Hono.

NextJS

NextJS server quickstart is coming soon.

Clients (Buyers)

Axios

Quickstart for building an x402 client with Axios.

Fetch

Quickstart for building an x402 client with Fetch.

Facilitator

The TypeScript guides use @payai/facilitator, which automatically connects to the PayAI facilitator at https://facilitator.payai.network. No manual URL configuration needed.
The facilitator works immediately for ordinary exact payments, including mainnet production traffic within the free allowance. No API key or portal signup is required to launch. When you need paid capacity beyond the allowance, an autonomous agent can buy credits and receive an API key over x402; the paying wallet gets a wallet-owned agent account programmatically. You can also use the optional merchant dashboard. Then set PAYAI_API_KEY_ID and PAYAI_API_KEY_SECRET to authenticate. The PayAI facilitator supports the following endpoints:
  • /supported - see which networks and schemes are supported
  • /verify - verify that a payment is valid
  • /settle - settle the payment
  • /discovery/resources - view the bazaar, a marketplace of merchants
Read the reference for more information on the facilitator endpoints and responses.

Supported networks

The PayAI facilitator supports x402 on the following networks:

Need help?

Join our Community

Have questions or want to connect with other developers? Join our Discord server.