Bitrovas

Lightning · L402 · no account

Bitrovas

Pay-per-request APIs over Lightning (L402).

How L402 works

L402 is HTTP 402 Payment Required plus Lightning: an endpoint answers with a Lightning invoice and a token; after paying, the client repeats the same request with 'Authorization: L402 <token>:<preimage>' and receives the result. No account, no API key.

Services

Example

# 1) request -> 402 with invoice + token
curl -i -X POST https://api.bitrovas.ch/v1/<product> -H 'Content-Type: application/json' -d '{...}'
# 2) pay the 'invoice' (bolt11) with any Lightning wallet, keep the preimage
# 3) same request again with the credential
curl -X POST https://api.bitrovas.ch/v1/<product> -H 'Content-Type: application/json' \
     -H 'Authorization: L402 <token>:<preimage>' -d '{...}'

Links