Embed
key, optional tenant, optional api).
What it does
- User picks a limit type (daily / weekly / monthly)
- User enters the new amount + currency (USD / EUR / GBP / CAD)
POST /v1/iframe/limits— same logic as the operator-keyed/v1/limitsroute- If the request is a decrease, first-time set, or equal, the new limit is
activeimmediately - If the request is an increase, the new limit is
pendingwith a cool-off period:- Up to 2× current limit: 24 hours
- 2× – 5× current limit: 48 hours
- More than 5× current limit: 7 days
- The success state tells the user whether the limit is active immediately or when it will take effect
Listen for completion
Pending-change conflict
A user can only have one pending change per limit-type at a time. If they try to set a new pending limit while one already exists, the API returns409 pending_change_exists and the iframe shows the standard error state. The user must wait for the current pending change to expire (or cancel it via the operator API) before submitting another.
Webhooks
The iframe submission fires the same events as a direct API call:limit.created— first-time set or instant increaselimit.decreased— decrease applied immediately- Pending changes flip to
limit.activatedwhen the cool-off elapses (handled by the limit-activator worker)