← notes

Reselling a metered API for satoshis

Oct 12, 2016

Resell News API access, priced per request in satoshis, across 43 sources.

The 402 machinery is the same across this family of experiments. What this one exposes clearly is the business arithmetic under the whole family, because it is a straight resale.

News API has its own key and quota. Every paid request here consumes one, so the satoshi price has to cover the amortized cost of the upstream plan rather than the marginal cost of a call, which is zero until the quota runs out and then effectively infinite. Pricing a resold API means pricing a fixed cost against uncertain volume, and both directions of error are bad: too low loses money on heavy use, too high means no use at all.

The failure with no good answer is quota exhaustion. A caller can burn the upstream allowance while paying correctly the whole time. You have their money, the service is down, and it is not their fault. What does a 402 endpoint owe someone whose payment succeeded and whose request then failed upstream? There is no account, no session and no support address. Per-request payment with no relationship is a bad fit for anything that can fail after payment.

The 43 sources being a fixed enumerated list rather than free text is the one straightforwardly right decision here.