pay-per-call API
A pay-per-call API is one that charges for each request rather than through an account or a subscription. The price arrives with the response to an unpaid call, so a client can decide and pay inside the same exchange — which is what makes the pattern usable by software with nobody watching.
MPP gives the shapes names, which is more useful than it sounds. It defines a charge as a one-time payment; a session as metered pay-as-you-go, for usage that is frequent or unpredictable; and a subscription as a recurring fixed payment, for access that renews on a schedule. Pay-per-call is the charge shape, and naming the three is what lets an operator see they are choosing between them.
What makes it work over HTTP is that the price is part of the ordinary exchange. The endpoint answers an unpaid request with a payment challenge naming what it costs; the client pays and retries; the resource is served. No account exists before the call, and the alternative — account creation, subscription selection and payment entry — is the sequence Stripe's machine-payments documentation names as what blocks agents from completing tasks autonomously.
The shape is being applied outside APIs as well. Cloudflare's pay per crawl prices access to content per fetch, with the price in the response to an unpaid crawler — the same exchange, with a page where the API call would be.
→ probe402 tracks endpoints that price a call this way and archives what each one quoted at each check — the tracked set is at the endpoint list.
Sources
- The Machine Payments Protocol specification siteMachine Payments Protocol
- Machine paymentsStripe documentation
- What is pay per crawl?Cloudflare documentation
Related machine payment · payment challenge · micropayment · pay per crawl