Spend limits
You can cap what the API spends.
- Daily and monthly limits, set in the app.
- A low-balance threshold. When “$X left” falls below it, you get a
balance.lowevent and a banner in the app. It is your own setting, and it starts empty.
Lower by API, raise in the app
Section titled “Lower by API, raise in the app”PATCH /v1/balance/settings can lower a limit. It can never raise one. A raise by API answers 403 limit_raise_requires_dashboard, with a link to the app. So a leaked key cannot lift your caps.
At the limit
Section titled “At the limit”What happens depends on the product.
- Creator data. A billed call that would pass the daily or monthly data limit is refused. It answers
402 spend_limit_reached, and nothing is charged. - Video production. Nothing is refused. A video slot that would pass the daily limit or the monthly commit limit does not open. The store waits and shows
awaiting_paymentuntil the limit has room.
See Errors.