x402 Gateway
Payment infrastructure for AI agents. Enable autonomous payments with MNEE stablecoin on Bitcoin.
Quickstart
Get up and running in under 5 minutes
Concepts
Understand how x402 protocol works
Agent SDK
Build agents that consume paid APIs
Server SDK
Monetize your APIs with x402
What is x402?
x402 is a payment protocol that enables AI agents to make and receive payments autonomously. Built on the HTTP 402 status code ("Payment Required"), it provides a standardized way for APIs to request payment and for agents to fulfill those requests.
The x402 Gateway handles all payment logic, policy enforcement, and settlement using MNEE — a USD-backed stablecoin on Bitcoin (BSV) with instant finality and near-zero fees.
Two Sides of the Protocol
@x402/agent
For AI agents and applications that consume paid APIs. Drop-in replacement for fetch that automatically handles x402 payment flows.
@x402/server
For API providers who want to receive x402 payments. Middleware for Express, Next.js, and other Node.js frameworks.
Learn moreKey Features
- Autonomous Payments — Agents make payments without human intervention
- Policy Controls — Set spending limits, allowed providers, and budget caps
- MNEE Stablecoin — USD-backed with instant settlement and near-zero fees
- Real-time Analytics — Monitor payments as they happen with full audit trails
- Non-Custodial — Workspaces control their own MNEE wallets
Ready to get started?
Follow our quickstart guide to set up x402 payments in under 5 minutes.
Start the Quickstart