Credits
Prepaid interview minutes: lots, ledger, balance cache, and Stripe purchases.
Key APIs
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/credits | Balance summary and recent ledger (admin) |
| GET | /v1/credits/history | Paginated ledger (admin) |
| GET | /v1/credits/lots | Paginated credit lots (admin) |
| POST | /v1/credits/checkout | Start Stripe Checkout (admin) |
| POST | /v1/webhooks/stripe | Grant credits when checkout completes |
Interview scheduling uses the credit port internally (not these routes).
Business Rules
- Cost scales with duration and org
creditsPerInterviewMinute; insufficient balance blocks schedule. - Reserve on schedule, release on cancel/delete, settle on interview completion or failure.
- Purchased lots expire after one year; trial grant runs once per org when enabled.
Dependencies
- Stripe (Checkout and webhook)
- SQS (settlement handled in functions app)