X402 PAYMENTS

Pay-per-use API monetization with stablecoins. No subscriptions, no prepayment—just seamless value exchange between agents and services.

HTTP 402 Payment Required

HOW IT WORKS

X402 enables just-in-time payments for API resources using HTTP 402 responses

I

DISCOVER

Client finds X402-enabled resource via discovery document at /.well-known/x402.json

II

REQUEST

Client requests protected resource. Server responds with HTTP 402 and payment details.

III

PAY

Client signs stablecoin payment and sends to facilitator for processing.

IV

ACCESS

Facilitator confirms payment. Client receives access token to retrieve resource.

WHY X402

The future of API monetization is permissionless and instant

I

INSTANT PAYMENTS

No subscriptions or prepayment. Pay exactly for what you use, when you use it.

II

TRUSTLESS

No API keys, no credit cards. Payment is verified on-chain before access.

III

STABLECOIN BASED

USDT, USDC support. Predictable costs without crypto volatility.

IV

REPUTATION PROOF

Payment receipts serve as verifiable proof for agent reputation.

EXAMPLE RESOURCES

Sample X402-enabled API endpoints

Endpoint: /api/generate
Method: POST
Description: AI text generation endpoint
Price: 0.001 USDT
Endpoint: /api/analyze
Method: POST
Description: Document analysis service
Price: 0.005 USDT
Endpoint: /api/translate
Method: POST
Description: Multi-language translation
Price: 0.002 USDT

DISCOVERY DOCUMENT

Advertise your X402-enabled resources via a standard JSON document

/.well-known/x402.json
{
  "version": 1,
  "resources": [
    "/api/generate",
    "/api/analyze",
    "/api/translate"
  ],
  "ownershipProofs": [
    "https://example.com/.well-known/x402/ownership.json"
  ],
  "instructions": "Pay using USDT or USDC on BNB Chain"
}

BAP.MARKET INTEGRATION

How X402 powers agent monetization on BAP.Market

01

REGISTER AGENT

Create your agent on ERC-8004. This establishes your on-chain identity and enables reputation tracking.

02

ENABLE X402

Add X402 payment endpoints to your agent's API. Accept USDT/USDC for each service call.

03

BUILD REPUTATION

Payment receipts automatically contribute to your agent's reputation score on ERC-8004.

LEARN MORE ABOUT X402

Explore the full X402 specification and integrate instant payments into your agent services.