> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anunnakielite.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deposit Limits Iframe

> Embed the Anunnaki-hosted deposit-limits form. KGC cooling-off rules enforced for increases.

Let your users set their own daily, weekly, or monthly deposit caps via an Anunnaki-hosted form. KGC cooling-off rules are enforced automatically — decreases take effect instantly, increases trigger a tiered cool-off period.

## Embed

```html theme={null}
<iframe
  src="https://sandbox.api.anunnakielite.com/iframe/deposit-limits/?key=cur_pk_test_YOUR_KEY&tenant=YOUR_TENANT"
  style="width:100%;max-width:560px;height:680px;border:0;border-radius:12px"
  title="Deposit limits"
></iframe>
```

Same URL params as the self-exclusion iframe (`key`, optional `tenant`, optional `api`).

## What it does

1. User picks a limit type (daily / weekly / monthly)
2. User enters the new amount + currency (USD / EUR / GBP / CAD)
3. `POST /v1/iframe/limits` — same logic as the operator-keyed `/v1/limits` route
4. If the request is a **decrease**, **first-time set**, or **equal**, the new limit is `active` immediately
5. If the request is an **increase**, the new limit is `pending` with a cool-off period:
   * **Up to 2× current limit:** 24 hours
   * **2× – 5× current limit:** 48 hours
   * **More than 5× current limit:** 7 days
6. The success state tells the user whether the limit is active immediately or when it will take effect

## Listen for completion

```js theme={null}
window.addEventListener('message', (e) => {
  if (e.data?.source !== 'currents-deposit-limit') return;
  if (e.data.type !== 'submitted') return;

  const { limit_id, status, effective_from } = e.data.data;
  // status is "active" (immediate) or "pending" (cool-off);
  // effective_from is the ISO timestamp the limit takes effect.
});
```

## 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 returns `409 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 increase
* `limit.decreased` — decrease applied immediately
* Pending changes flip to `limit.activated` when the cool-off elapses (handled by the limit-activator worker)

See [Deposit Limits API](/api-reference/deposit-limits) for the full payload shape.
