How charging works
Every billable action — a serverless run, a VM hour, an inference replica hour — generates an entry in your execution history with the credit cost attached. Charges are pulled against your balance in real time, so you can watch your spend during long jobs and abort if needed. The balance is split into two pots:- Free credits — granted by Lyceum (signup bonus, vouchers, support credits). Spent first.
- Purchased credits — bought through Stripe Checkout. Spent after free credits are exhausted.
Topping up
ThePOST /billing/checkout endpoint creates a Stripe Checkout session. Redirect the user to the returned URL; Stripe handles payment, and on success the credits are added to the balance via Stripe’s webhook.
Vouchers
Voucher codes can be redeemed for free credits — typically used for promotional credits, support credits, or migration grants. Validate a code before redeeming to surface a friendly error message.REST API
| Method | Endpoint | Purpose |
|---|---|---|
GET | /billing/credits | Current balance |
GET | /billing/credits/details | Detailed credit breakdown (free vs purchased, total used) |
POST | /billing/checkout | Create a Stripe Checkout session |
GET | /billing/history | Per-execution billing history |
GET | /billing/activities | Combined timeline of charges and top-ups |
GET | /billing/invoices | List Stripe invoices with PDF links |

