Concepts
x402 Payment Protocol
Understanding how payments work in Skillz Market.
x402 Payment Protocol
Skillz Market uses the x402 protocol for seamless micropayments on the Base blockchain.
What is x402?
x402 is a payment protocol that extends HTTP with native payment capabilities. It uses the HTTP status code 402 Payment Required to enable pay-per-call APIs.
How It Works
Consumer Flow
When you call market.call():
Creator Flow
When someone calls your skill:
Key Components
402 Response
When a skill is called without payment:
Payment Header
After making the payment:
Payment Verification
The facilitator verifies:
- Payment amount matches price
- Payment recipient matches payTo
- Payment was made on the correct network
- Payment hasn't been used before
Currency and Network
Skillz Market uses:
- Currency: USDC (USD Coin)
- Network: Base mainnet (
eip155:8453)
Base provides fast (2 second) and cheap ($0.001) transactions.
Facilitator
The facilitator is a trusted service that:
- Verifies payment proofs
- Prevents double-spending
- Provides payment receipts
Default facilitator: https://x402.dexter.cash
SDK Integration
The SDK handles all x402 complexity:
Consumer Side
Creator Side
Benefits
- Micropayments - Pay fractions of a cent per call
- No Subscriptions - Pay only for what you use
- Instant Settlement - Payments settle in seconds
- No Account Required - Just a wallet
- Programmable - Fully API-driven
Security
- Payments use ECDSA signatures (same as Ethereum)
- Each payment proof is single-use
- HTTPS required for all endpoints
- Private keys never leave your device