Documentation Index
Fetch the complete documentation index at: https://docs.gate.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
x402 is an open payment standard built around the HTTP402 Payment Required status code. When a client requests a paid resource, the server returns a 402 response with payment requirements. The client signs and completes the on-chain payment automatically, keeping the flow transparent to the end user.
Why x402?
- Native micropayments for usage-based APIs
- Programmatic payments without traditional account registration
- Low-friction settlement through on-chain signatures
- HTTP-native integration that works with standard web services
Core roles
| Role | Description |
|---|---|
| Client (Buyer) | Client or developer that requests a paid resource and signs the payment |
| Server (Seller) | Merchant server that declares payment requirements and serves the resource after validation |
| Facilitator | GatePay service that verifies payment payloads and finalizes settlement |
Merchant integration
Merchants can integrate through the SDK and client repositories published under the official Gate GitHub organization, while declaring x402 payment requirements at the route layer. The currently public resources include Go, Java, Python, Node.js / TypeScript, and PHP repositories. Use the organization page as the latest source of truth.Gate GitHub Organization
Client integration
For MCP-compatible clients, install and configure the x402 MCP package with the following command. Follow the MCP configuration format required by your client.Local MCP implementation
Payment flow
- The client calls the merchant API.
- The merchant returns
402 Payment Requiredwith payment requirements in headers. - The client signs a payment payload based on the selected chain and token.
- The client retries the request with the
PAYMENT-SIGNATUREheader. - The merchant sends the payload to the GatePay Facilitator for validation.
- After validation, the merchant serves the resource and the Facilitator submits settlement on-chain.
- The merchant returns
200 OKand aPAYMENT-RESPONSEheader.
Minimum integration path
If you are integrating x402 for the first time, begin with one protected resource and validate the following path:GatePay Facilitator
GatePay acts as the x402 Facilitator and provides:- Payment verification
- On-chain settlement submission and confirmation tracking
- Sponsored gas for supported payment flows
Supported networks and token
| Network | Token |
|---|---|
| Ethereum | USDC |
| Base | USDC |
| Arbitrum One | USDC |
| Polygon | USDC |

