Skip to main content

x402 Quick Start Guide

Start with the upstream x402 server and client integrations, and verify the facilitator and network before accepting payments.

Share
Last updated on October 5, 2026
On this page

Start with a released implementation from the x402 Foundation. Server, client, payment scheme, network and facilitator must support the same protocol version.

Choose an integration​

The upstream TypeScript SDK publishes separate packages for each framework and client. Follow the linked package's installation and configuration instructions, including its required core and chain packages.

ApplicationPackage and working examples
Express server@x402/express
Hono server@x402/hono
Next.js application@x402/next
Fetch client@x402/fetch

See the upstream SDK package list for additional integrations. Use the example and dependency versions together; older x402-* examples and current @x402/* packages have different APIs.

Configure a server​

  1. Choose a network and payment scheme supported by your implementation and facilitator.
  2. Configure the facilitator URL and any authentication that its operator documents.
  3. Set the receiving address, token, price and protected route in the framework integration.
  4. Start the server and request the protected route without payment. Check the returned payment requirements before connecting a payer.

The framework examples above include the implementation details. Test with the network and assets specified by the selected example before configuring a production payment flow.

Configure a client​

Use the matching client integration and a signer for the selected network. Check the destination, network, asset and amount before authorizing a payment. A server's HTTP 402 response supplies payment requirements; it is not evidence that a payment has settled.

Bex integration status​

A Bex application-platform account or API token does not establish access to an x402 facilitator. Bex-specific facilitator availability, authentication, supported networks and settlement behavior require that service's published contract. This page does not provide a verified Bex facilitator integration or a Bex-specific SDK.

For an implementation you can inspect today, start with the upstream examples linked above.

Was this page helpful?

One API key for 30+ chains

bex router is a single multi-chain gateway — one key, one bill, metered in compute units instead of an account per network.

Explore bex router