Coinflip x402 API
network: eip155:84532

Micropayment-gated coinflip endpoint

A simple x402-enabled API. Two players each pay $1.00 USDC, coin is flipped, winner receives $1.90, house keeps $0.10.

Paid Endpoints

POST /battle/create

Create battle and lock side.

price: $1.00

GET /battle/create?side=heads

Browser-friendly create flow via x402 paywall.

price: $1.00

POST /battle/:id/join

Join battle and trigger flip.

price: $1.00

GET /battle/:id/join

Browser-friendly join flow via x402 paywall.

price: $1.00

Public Endpoints

x402 Integration Flow

  1. Call POST /battle/create with { side: heads|tails }.
  2. Second player calls POST /battle/:id/join.
  3. Poll battle status and verify result at /battle/:id/verify.

facilitator: https://x402.org/facilitator

payTo: 0x9f61C0A1d1703104Ef1300dE013f8Bdc75268cC9

Try GET /health