Overview
The Flow
Client Server
| |
| 1. GET /api/weather |
|----------------------------------------------->|
| |
| 2. 402 Payment Required |
| payment-required: <base64 JSON> |
| (price, currency, min top-up, Stripe pub key) |
|<-----------------------------------------------|
| |
| 3. GET /api/weather |
| payment: <base64 JSON> |
| (PaymentMethod ID, top-up amount) |
|----------------------------------------------->|
| |
| Server charges card via Stripe |
| Server credits balance |
| Server deducts for this request |
| |
| 4. 200 OK |
| payment-response: <base64 JSON> |
| (client ID, remaining credits, charge ID) |
|<-----------------------------------------------|
| |
| 5. GET /api/weather |
| payment: <base64 JSON with client ID> |
|----------------------------------------------->|
| |
| Server deducts from balance |
| |
| 6. 200 OK |
| payment-response: <base64 JSON> |
|<-----------------------------------------------|Key Concepts
No Signup Required
Credits System
Protocol Version
Topics
Last updated