Power Oracle

Payments

L402 payment flow for paid Power Oracle compute access.

Paid access is enforced on POST /compute-power when paid mode is enabled.

Discovery endpoints remain read-only entry points.

Challenge Flow

If compute access requires payment, the route returns:

  • HTTP 402 Payment Required
  • a WWW-Authenticate header containing the L402 challenge data

The client then:

  1. reads the challenge header
  2. extracts the token and invoice
  3. pays the invoice with available Lightning tooling
  4. retries the same request with Authorization: L402 <token>:<preimage>

Scope

  • GET /movements is a discovery endpoint
  • GET /openapi.json is a discovery endpoint
  • POST /compute-power is the route that may require payment

Current Notes

  • In local development, paid access is often disabled
  • When enabled, the public behavior should be treated as challenge-then-retry
  • Clients should not assume one successful paid credential can be reused for unrelated compute calls