Simulate a 402 Flow

Compose a request → receive 402 Payment Required → settle → retry for 200 OK without leaving the browser.

Flow visualiser

Watch the HTTP conversation animate between request, 402 response, payment, and successful retry.

Request 402 → Payment 200 OK

HTTP request


              

HTTP response


              

Calibrate price per request, then trigger settlement to measure latency and unlock the resource.

0 sats Total sats paid
0 ms Avg latency
0 Errors simulated

When HTTP 402 shines for each rail

Lightning invoices

Use for real-time, per-request access where milliseconds matter and retries should feel automatic.

  • Interactive APIs and AI inference where responses unlock immediately
  • High-volume content metering without batching delays
  • Programmable receipts that clients can settle and verify instantly

On-chain (unconfirmed)

Useful when zero-conf acceptance is acceptable - think trusted partners or low-value unlocks needing on-chain provenance.

  • Token-gated downloads where recording an on-chain payment ID matters
  • Enterprise integrations that watch for mempool broadcasts before granting access
  • Hybrid flows that upgrade to Lightning after an initial on-chain handshake

On-chain (confirmed)

Choose when regulatory or risk requirements demand block confirmation before fulfilling the request.

  • High-value API calls settling large invoices or legal documents
  • Data room unlocks where audit trails must survive decades
  • Settlement checkpoints that delay delivery until ≥1 block (~10 minutes)