PayAPI Market

For Developers

Build agents, build wrappers, contribute to the ecosystem.

Last updated: 2026-10-06

Quick links

SDK availability

How to wrap an existing API for x402

The PayAPI Market team maintains an open-source x402-MCP wrapper template. It's a small Express server that:

  1. Sits in front of your existing API
  2. Returns HTTP 402 with payment requirements on each request
  3. Verifies the payment proof (a transaction hash + signature)
  4. Forwards the request to your real API
  5. Returns the response

You can deploy it to Railway, Fly, Vercel, or any Node host in under 10 minutes.

Frequently asked questions

Where are the official x402 SDKs?

The x402 reference SDKs cover TypeScript, Python and Go. For buyers, @x402/fetch with @x402/evm on npm and the x402 package on PyPI are common starting points. The spec and SDK source live at github.com/x402-foundation/x402, and community libraries cover other languages such as Rust.

Is there an open spec?

Yes. The x402 specification is open and lives at github.com/x402-foundation/x402, with documentation at docs.x402.org. The MCP specification is at modelcontextprotocol.io. Both are versioned. PayAPI Market uses MCP for free discovery and leaves payment to each provider's own x402 HTTP 402 challenge.

Can I run my own facilitator?

Yes. x402 is permissionless, so anyone can run a facilitator, and the docs at docs.x402.org list options. For PayAPI Market, what matters is that your paid route returns a valid 402 for USDC on Base to your listed wallet, and delivers real product once the call is paid.

Are there example agents I can fork?

Yes. A worked example of the whole loop, from connecting to https://payapi.market/mcp through to an on-chain receipt on Base, is at https://payapi.market/how-an-agent-finds-payapi. Each listing page also shows ready-to-run JavaScript and Python snippets for calling and paying that API with x402.