B402 is Binance's facilitator for the x402 payment protocol. It
lets an API or digital service charge a stablecoin payment through the standard HTTP
402 Payment Required flow. The buyer signs an authorization, B402 verifies it off-chain, and B402
submits the settlement transaction while sponsoring network gas. Funds move directly to the
merchant's configured receiving address.
What B402 Provides
- x402 V2 support on BNB Smart Chain, with V1 retained for existing integrations.
- Off-chain verification before a merchant delivers the protected resource.
- On-chain settlement with gas sponsored by the facilitator.
- EIP-3009 and Permit2 authorization methods for supported stablecoins.
- Idempotent settlement so retrying the same signed payment cannot create a second payment.
API Overview
| Operation | Recommended endpoint | Purpose |
|---|---|---|
| Supported | POST /api/v2/b402/supported | Discover live networks, assets, methods, and addresses |
| Verify | POST /api/v2/b402/verify | Validate a buyer authorization without broadcasting |
| Settle | POST /api/v2/b402/settle | Submit the authorized payment on-chain |
| Legacy V1 equivalents | POST /api/v1/b402/{operation} | Compatibility for existing V1 integrations |
The production base URL is https://web3.binance.com/build. For example, the full V2 Supported URL
is https://web3.binance.com/build/api/v2/b402/supported.
New integrations should use V2. V1 remains available for compatibility, but its payload shape and address fields differ from V2.
Who Calls B402
B402 endpoints are merchant-server APIs. Buyers normally communicate only with the merchant:
- The buyer requests a protected resource.
- The merchant returns HTTP
402with one or more payment requirements. - The buyer signs a selected requirement and retries the request with the x402 payment payload.
- The merchant calls B402 Verify and, if valid, B402 Settle.
- After a successful settlement, the merchant returns the protected resource.
Before You Begin
- Sign in to the Developer Portal.
- Create or select a project, complete the B402 Payments application, and confirm the receiving
address. This
payToaddress is write-once for the project. - In the same project, select Add New Key and explicitly tick B402 Payments on the API permissions screen before creating the key. Save the one-time Secret Key securely. If the key uses an IP whitelist, add your backend's public egress IP.
- From your backend, make a signed
POST /api/v2/b402/supportedrequest with{"body":{}}and confirm that it succeeds before accepting payments. - Read Authentication and the Integration Guide.
The Developer Portal application is an interactive onboarding flow, not a
public merchant-server API. Runtime integrations use only the signed
/build/api/v2/b402/* endpoints documented here.
Never expose the Secret Key in browser code, mobile code, logs, source
control, or a 402 response. Call B402 only from a trusted backend.
Network and Asset Scope
B402 currently supports BNB Smart Chain (eip155:56) and configured stablecoins. Supported assets,
contract addresses, EIP-712 domain data, and facilitator addresses are configuration-driven. Always
read them from POST /api/v2/b402/supported; do not hardcode them.
Use BSC testnet (eip155:97) only in the QA environment. Never mix testnet payloads with production
credentials or endpoints.