Set auto top-up and the monthly spending cap.
Auto top-up adds one pack whenever the balance falls below a threshold, charged to the account's saved top-up card, and only within the monthly spending cap (whole US dollars charged for credits per UTC calendar month, net of refunds, counting every pack bought on the Billing page and every automatic top-up, and an attempt still being paid; the plan itself is not counted). A refunded automatic top-up turns auto top-up off. Turning it on needs a saved card (saved in the app for $0, or by a top-up; send the writer to fixUrl when there is none), a plan that allows top-ups and a cap of at least the pack price; the threshold must be below the pack's credits. Buying credits happens only in the app: send the writer to topupUrl. TWO CALLS: without confirmed: true it answers { quotedOnly: true, wouldBe, note } and changes nothing; show the writer the note, and call again with confirmed: true once they say go. autoTopup: { enabled: false } turns it off. 409 credit_billing_invalid for a setting the account cannot honor (details.problem: no_card — a top-up in the app saves the card, details.fixUrl opens it; no_cap / cap_below_pack with details.suggestedCapUsd; threshold_too_high / threshold_too_low; unknown_pack; plan_without_topups; topups_held). Read the result on GET /credits (credits.billing). Scope: account:write. Free.
Request
- Base URL: https://docs.sleeperhit.studio/api/v1
- URL: https://docs.sleeperhit.studio/api/v1/credits/billing
- Auth: HTTP bearer
Request body
Response
What the settings would be, or are now.
Changes
No recorded changes to this operation across all 1 revision of this API.