Power Oracle now fully supports L402 payments
Clients can now pay for Power Oracle compute with L402 in production, with the same public pricing contract as x402 and a cleaner path for Lightning-native integrations.
Power Oracle now supports L402 as a first-class payment path for paid compute routes.
The practical takeaway is simple: if your client already knows how to handle a Lightning invoice and retry a request with L402 authorization, you can now pay for POST /v1/compute-power directly in production.
This is not a separate integration surface. It is the same API, the same compute route, and the same public pricing contract.
Lightning
A Bitcoin-native payment network built for fast, low-fee internet payments.
L402
An HTTP payment and authorization flow where the server issues a 402 challenge, the client pays, and then retries with proof.
Power Oracle
The same paid compute route now works cleanly for clients that prefer a Lightning-native payment path.
A quick note on the Lightning Network
The Lightning Network is a payment layer built on top of Bitcoin.
The useful intuition is that it makes small, internet-native payments practical in a way the base chain alone often is not. That matters for APIs, agents, and repeated machine-to-machine calls, because the payment itself can be fast, programmatic, and small enough to fit a per-request business model.
For Power Oracle, that means clients do not need a subscription or a human checkout flow just to compute one workout. They can make a request, satisfy the payment challenge, and continue.
If you are new to this space, think of Lightning as the payment rail and L402 as the HTTP pattern that lets a server ask for payment before serving a protected response.
What changed
In production, Power Oracle charges compute-bearing routes through x402 or L402.
Free discovery routes remain free:
GET /v1/healthGET /v1/movementsGET /openapi.json
The paid compute path remains:
POST /v1/compute-power
When payment is required, the server can now challenge clients in both supported ways:
HTTP/1.1 402 Payment Required
PAYMENT-REQUIRED: <x402 payment requirement payload>
WWW-Authenticate: L402 macaroon="<token>", invoice="<lightning invoice>"
That means x402 clients can continue using PAYMENT-REQUIRED, while L402 clients can pay the invoice and retry with:
Authorization: L402 <token>:<preimage>
How L402 works in practice
1. Send the normal compute request
Your client sends POST /v1/compute-power with a valid payload.
2. Read the 402 challenge
If payment is required, the server responds with a Lightning invoice in WWW-Authenticate: L402 ....
3. Pay and retry
The client pays the invoice, keeps the same request payload, and retries with Authorization: L402 <token>:<preimage>.
A minimal L402 flow looks like this:
curl https://api.workcapacity.io/v1/compute-power \
-H 'Content-Type: application/json' \
-d @payload.json
If the route requires payment, pay the invoice from the WWW-Authenticate: L402 ... challenge and retry the exact same request:
curl https://api.workcapacity.io/v1/compute-power \
-H 'Content-Type: application/json' \
-H 'Authorization: L402 <token>:<preimage>' \
-d @payload.json
The important design point is that payment does not change the request contract. You validate your inputs, send the same payload, satisfy the challenge, and retry.
Pricing parity, not a side path
A major part of making L402 fully supported was bringing it onto the same public route-pricing contract as x402.
Power Oracle publishes route pricing at GET /v1/payment-requirements.
The current production contract for the compute route is $0.10 per request.
x402 uses that public USD price directly.
L402 uses sats derived from that same USD route price using a cached live BTC/USD quote.
That keeps the billing model aligned while still giving Lightning-native clients a payment flow that matches how they already operate.
Prechecks still happen before billing
Supporting L402 fully does not mean charging earlier.
Power Oracle still validates deterministic request problems before it asks for payment.
That includes issues like:
- malformed JSON
- schema validation errors
- unsupported or unimplemented movement requests
- invalid-unit and other deterministic validation failures
Those failures stay outside the billing boundary.
That matters for client builders. You can integrate against the paid compute route without worrying that obvious request-shape mistakes immediately consume paid usage.
Why this matters
WorkCapacity is being built for agents as much as for humans.
That means the payment layer should work well for clients that are:
- machine-driven
- protocol-native
- comfortable with small paid calls
- better served by exact request billing than by account-first gating
L402 support matters because it gives Lightning-native clients a direct path to paid compute without forcing them into an x402-only story.
It also keeps Power Oracle aligned with the original product shape: a focused measurement API with micropayment-friendly access for repeated, machine-readable use.
Read a little deeper
External background
Lightning Network
— high-level overview of the network and why it exists.
The Lightning Network whitepaper
— the original technical paper for readers who want the deeper protocol background.
Lightning Labs
— broader context around Lightning tooling and infrastructure.
Aperture on GitHub
— an open implementation closely associated with L402-style API payment flows.
Where to start
If you want the practical integration path, start here:
If you are building against Power Oracle today, you can now treat x402 and L402 as supported payment paths for paid compute.
Same route.
Same measurement engine.
A cleaner Lightning-native way to pay.
