x402 Dice Roller
Paid API endpoint with ERC-8021 builder code attribution
Endpoint
GET /api/dice?faces=N
Roll a dice with N faces (default: 20)
Payment
NetworkBase Mainnet
TokenUSDC
Price$0.001
StatusHTTP 402 (unpaid)
Response
{
"roll": 14,
"faces": 20,
"message": "Rolled a d20: 14",
"rolledAt": "2026-07-09T03:15:00.000Z"
}Builder Code Attribution
ERC-8021 builder code appended to settlement transaction:
bc_dice_roller
Need help?
See README_X402.md for setup, testing, and deployment instructions.