API referenceCheckout
Price a cart
POST
Prices a cart without buying it. A cart that cannot be bought is not an error: the answer has is_valid=false and invalid_reason. A malformed request is still 400.
ApiKeyheader
X-API-Key<token>prx_live_<40 base62>
application/json- body
items*array<>|One item per network max.
Items
1 <= items <= 2promo_code?stringOK
application/json- response
data*message*stringHuman-readable status, safe to show to end users.
curl -X POST "https://example.com/v1/checkout/quote" \ -H "Content-Type: application/json" \ -d '{ "items": [ { "gb": 1, "product_code": "residential_gb" } ] }'{ "data": { "credit_after_cents": 0, "credit_balance_cents": 0, "discount_cents": 0, "invalid_reason": "insufficient_credit", "is_valid": true, "items": [ { "gb": 0, "price_per_gb_cents": 0, "product_code": "residential_gb", "tier": { "price_per_gb_cents": 0, "up_to_gb": 0 }, "total_cents": 0 } ], "new_valid_until": { "property1": "2019-08-24T14:15:22Z", "property2": "2019-08-24T14:15:22Z" }, "subtotal_cents": 0, "total_cents": 0 }, "message": "OK"}Buy GB from credit POST
Pays for the cart from the account's credit and returns 201 with the order; the data is added to the balance once the order is provisioned. Requires an Idempotency-Key header. Errors: 402 insufficient_credit; 422 with the reason the cart cannot be bought; 409 idempotency_conflict or idempotency_in_flight.
Data ledger GET
Top-ups, usage (one negative row per network per day), expiry, restore, adjustments, refunds.