x402 Payments
What is x402?
How Treza Uses x402
Paid Endpoints
Endpoint
Method
Price
Description
Payment Flow
Client Treza API Facilitator Base L2
│ │ │ │
│── GET /attestation ───────────▶│ │ │
│ │ │ │
│◀── 402 Payment Required ───────│ │ │
│ price: $0.001 │ │ │
│ network: eip155:8453 │ │ │
│ payTo: 0xTreza... │ │ │
│ │ │ │
│── Sign USDC payment ──┐ │ │ │
│◀── Payment-Signature ─┘ │ │ │
│ │ │ │
│── GET /attestation ───────────▶│ │ │
│ + Payment-Signature │ │ │
│ │── Verify payment ───────────▶│ │
│ │◀── Valid ─────────────────── │ │
│ │ │ │
│◀── 200 Attestation Data ───────│ │ │
│ │── Settle payment ───────────▶│── USDC tx ──────▶│
│ │ │ │Client-Side: Paying for Treza Services
Using the Treza SDK (Enclave as Wallet)
Using Any x402 Client (External Wallet)
Using curl (Manual)
Server-Side: Adding x402 to Your Own Endpoints
Basic Usage
With Bazaar Discovery
Environment Variables
Variable
Required
Default
Description
Discovering Payable Services
Security Model
Layer
Protection
Architecture
FAQ
Related
Last updated