Skip to content

Credits

Prepaid interview minutes: lots, ledger, balance cache, and Stripe purchases.

Key APIs

MethodPathPurpose
GET/v1/creditsBalance summary and recent ledger (admin)
GET/v1/credits/historyPaginated ledger (admin)
GET/v1/credits/lotsPaginated credit lots (admin)
POST/v1/credits/checkoutStart Stripe Checkout (admin)
POST/v1/webhooks/stripeGrant 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)

Sophia AI Interview Platform — Internal Documentation