> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/transaction-control/implement-transaction-control/implement-spending-limits-controls.md).

# Implement spending limits controls

## Overview

Transaction Control provides APIs in the **D1 API** and **D1 SDK** to:

* Enforce spending limits during authorization
* Update spending limits on a card
* Retrieve spending limit counters (current amount)

During authorization, Transaction Control compares the transaction amount to the cumulative counter for each configured limit.

If a transaction exceeds a configured `card limit`, D1 declines the authorization with status `declined` and reason `VELOCITY_CHECK_FAIL`:

* See [Get All Card Authorisation Operations](/transaction-control/integrate-the-d1-api/d1-api-reference/inbound-api-to-d1/card-api.md#get-v2-issuers-issuerid-cards-cardid-authorisations-operations).
* See [Notify Card Authorisation Operations](/transaction-control/integrate-the-d1-api/d1-api-reference/outbound-api-from-d1/card-api.md#post-notifications-d1-v2-issuers-issuerid-authorisations).

### Supported limit categories and periods

Spending limits are defined by the **Issuer** when onboarding a card product in D1.

For a given card product, you can define independent limits for each payment category:

* **Purchases**
* **Withdrawals**

For each category, you can define one or more limits for these periods:

* **Daily**
* **Weekly**
* **Monthly**
* **Yearly**

Weekly, monthly, and yearly periods can be `fixed` or `rolling`, depending on your configuration.

### Limit types

D1 supports nested limit types. They define who can change what.

<figure><img src="/files/k2mpJqsK88YsURajZ90S" alt=""><figcaption><p>Nested limit types: <code>card limits</code>, <code>max limits</code>, and <code>security limits</code>.</p></figcaption></figure>

* `card limits`
  * Apply to the card at authorization time.
  * Can be updated by the **End user** (via **D1 SDK**).
  * Can be updated by the **Issuer** (via **D1 API**) from the **Issuer backend**.
* `max limits`
  * Cap the `card limits`.
  * Can be updated only by the **Issuer** (via **D1 API**) from the **Issuer backend**.
  * A `card limit` cannot exceed its corresponding `max limit`.
* `security limits`
  * Provide an additional ceiling for risk control.
  * Apply across all payment categories for a given period.
  * Are not exposed in the **D1 API** or **D1 SDK**.
  * Cannot be updated.

### Counters (current amount)

D1 maintains a cumulative `current amount` counter for each configured category and period. It updates the counter at authorization time and checks it against `card limits`.

<figure><img src="/files/Ez3LJTtfdV6g6Impvm7K" alt=""><figcaption><p>Counters tracked per category and period.</p></figcaption></figure>

* The **Issuer** can retrieve the `current amount` from the **Issuer backend** using the **D1 API**.
* The **End user** can retrieve the `current amount` from the **Issuer application** using the **D1 SDK**.

## User experience

Spending limits are inherited from the card product at card creation or registration time. You can then retrieve and update `card limits` using the **D1 API** or **D1 SDK**.

<figure><img src="/files/IbEhjbU2HIN5y7aG9I5F" alt=""><figcaption><p>High-level flow to retrieve and update spending limits.</p></figcaption></figure>

## Flow

### Manage controls with the D1 Backend API <a href="#using-d1-backend-api" id="using-d1-backend-api"></a>

**Get and display current limits**

<figure><img src="/files/t7NTzpFQBPH6KucnNcNV" alt=""><figcaption><p>Retrieve current limits using <strong>Get Card Settings</strong>.</p></figcaption></figure>

Call [Get Card Settings](https://thales-dis-dbp.stoplight.io/docs/d1-caas/906ogh06j4ydz-get-card-settings) to retrieve the current spending limit configuration for a card.

**Update spending limits**

<figure><img src="/files/I1547HCRXo5uQFowGo7C" alt=""><figcaption><p>Update <code>card limits</code> using <strong>Update Card Limits</strong>.</p></figcaption></figure>

Call [Update Card Limits](https://thales-dis-dbp.stoplight.io/docs/d1-caas/qrvewq6c0276l-update-card-limits) to update `card limits` (within the configured `max limits`).

### Manage controls with the D1 SDK API <a href="#using-d1-backend-api" id="using-d1-backend-api"></a>

**Get and display current limits**

<figure><img src="/files/qXDBNPbGIrJUfO4CDWhb" alt=""><figcaption><p>Retrieve current limits in the <strong>Issuer application</strong> using the <strong>D1 SDK</strong>.</p></figcaption></figure>

Use the **D1 SDK** to display current `card limits` to the **End user**.

**Update spending limits**

<figure><img src="/files/jo6p5BMCz0pVLRwKPCps" alt=""><figcaption><p>Update spending limits in the <strong>Issuer application</strong> using the <strong>D1 SDK</strong>.</p></figcaption></figure>

Use the **D1 SDK** to let the **End user** update `card limits` within the configured `max limits`.

## Setup

Spending limits are defined at the card product level. The **Issuer** selects which spending limits to enable and sets default values. Default values use the card product currency.

Available spending limits:

| Purchase             | Withdrawal             |
| -------------------- | ---------------------- |
| **Daily purchase**   | **Daily withdrawal**   |
| **Weekly purchase**  | **Weekly withdrawal**  |
| **Monthly purchase** | **Monthly withdrawal** |
| **Yearly purchase**  | **Yearly withdrawal**  |

Spending limits are inherited from the card product at card creation or registration time.

{% hint style="warning" %}
Spending limits are inherited from the card product. After card creation or registration, you cannot **add** or **delete** a spending limit. You can only update existing limits.
{% endhint %}

As explained above, the **End user** (via **D1 SDK**) and the **Issuer** (via **D1 API**) can update `card limits`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payments.thalescloud.io/transaction-control/implement-transaction-control/implement-spending-limits-controls.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
