authed

Save Auto Top Up

The auto-top-up knobs. Enabling needs a card on file — paying once by Checkout is what saves one — and both numbers present.

put/api/v1/billing/auto-top-up

Request

  • Base URL
    https://api.teaflask.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.teaflask.com/api/v1/billing/auto-top-up
  • Auth
    none declared

Request body

enabledboolean required
threshold_microusdinteger nullable
amount_microusdinteger nullable

Response

Successful Response

balance_microusdinteger required

The prepaid balance that pays for model calls; it can fall below zero, for example after a card payment is disputed. In microusd: millionths of a US dollar (1,000,000 = $1.00).

plan'free' | 'enterprise' required

Which plan an organization is on. What each plan entitles lives in src/plan_entitlements.py — the code map, never columns here.

plan_source'manual' | 'aws_marketplace' nullable required

Where Enterprise comes from: manual when it was set up directly with us, aws_marketplace when an AWS Marketplace contract is its only source; null on the free plan.

billing_channel'direct' | 'aws_marketplace' required

How an organization pays (the CHECK's mirror): direct is cards and top-ups through us; aws_marketplace is an AWS Marketplace contract, billed by AWS.

card_billing_availableboolean required

Whether card payments and top-ups apply to this organization; false when it pays through AWS Marketplace.

low_balance_alert_threshold_microusdinteger required

The balance at or below which the low-balance warning shows. In microusd: millionths of a US dollar (1,000,000 = $1.00).

stripe_configuredboolean required

Whether card payments are available; when false, top-ups cannot be bought but everything else still reads.

stripe_customer_existsboolean required

Whether the organization has card history in the billing portal (receipts or a saved card); false until its first card payment or card check.

Changes

No recorded changes to this operation across all 1 revision of this API.