Billing API

View as Markdown

Manage workspace balance and top-ups.

GET /v1/usage

See the Usage API for the usage endpoint, which includes billing totals.

POST /v1/billing/topup

Create a Stripe checkout session to add funds to the workspace balance.

$curl -s https://api.chaser.sh/v1/billing/topup \
> -X POST \
> -H "Cookie: chaser_session=..." \
> -H "Content-Type: application/json" \
> -d '{"amount_usd": 50}' | jq

Request body:

FieldTypeDefaultDescription
amount_usdintegerAmount in USD. Minimum: $10.

Response 200:

1{
2 "checkout_url": "https://checkout.stripe.com/c/pay/cs_test_..."
3}

Open checkout_url in a browser to complete payment. Stripe handles the entire payment flow. On success, the workspace balance is credited immediately.

This endpoint requires cookie authentication (dashboard session). It is not available via API key.

Balance and charging

  • Prepaid. You add funds before use. Sessions check workspace balance before provisioning.
  • Deduction. Egress is deducted from balance at $5/GB as sessions close.
  • Minimum top-up. $10.
  • Credits never expire. Unused balance carries over indefinitely.
  • Insufficient balance. If the balance runs to zero, active sessions are allowed to finish but new sessions return 402 payment_required until the balance is topped up.