# Velocity limits

On this page:

* [Velocity limits](#velocity-limits)
* [Advanced velocity limits](#advanced-velocity-limits)

## Velocity limits

Velocity limits can be used to control transaction spendin&#x67;**\***. It defines the aggregated amount and the total number of transaction&#x73;**\*\*** which can be performed by a cardholder within a specified tim&#x65;**\*\*\***. Like balance limits, velocity limits are also linked with the card product. Cards associated with the card product shall follow the velocity limits tied to that card product.&#x20;

**\*** *What are transaction spending controls? For example, allow 50 USD per authorization or 15,000 USD spending per month.*

**\*\*** *What is total number of transactions?  For example, allow upto 5 authorizations per day. Also known as transaction frequency.*

**\*\*\*** *What is specified time? For example, specified time can be daily, monthly, yearly, or lifetime.*

Velocity limits can be applied to the card product at the time of creation of the card product or the velocity limits can be modified later as well.

### Create a velocity limit

You can create a new velocity limit by sending a **POST** request to **/velocitylimits** endpoint as given below.

<details>

<summary><a href="https://nymcard.com/docs/api#tag/Velocity-Limits/paths/~1v1~1velocitylimits/post">POST /velocitylimits</a></summary>

**`{`**\
`    `**`"description": "The velocity limit - withdrawals",`**\
`    `**`"type": “PER_TRANSACTION”,`**\
`    `**`"min_amount": 1500,`**\
`    `**`"max_amount": 1500,`**\
`    `**`"currency": "USD",`**\
`    `**`"frequency": 3,`**\
`    `**`"period": "DAILY",`**\
`    `**`"transaction_scope": [`**\
`        `**`"WITHDRAWALS"`**\
`    `**`]`**

**`}`**

</details>

### Retrieve velocity limits

The nCore platform offers following retrieval options for velocity limits.

***Retrieve all velocity limits***

You can retrieve all existing balance limits by sending a **GET** request to **/velocitylimits** endpoint shown below.

> [**GET  /velocitylimits**](https://nymcard.com/docs/api#operation/listVelocityLimits)

***Retrieve a specific velocity limit***

You can retrieve a specific velocity limit by sending a **GET** request to **/velocitylimits/{id}** endpoint, where id is the balance limit id.

> [**GET /velocitylimits/{id}**](https://nymcard.com/docs/api#operation/getVelocityLimit)

### Update velocity limit

You can update the existing velocity limit as required. Send a **PUT** request to **/velocitylimits/{id}** endpoint to update a velocity limit. Include the limit ID as a path parameter to indicate the velocity limit which is required to be updated.

> [**PUT /velocitylimits/{id}**](https://nymcard.com/docs/api#operation/updateVelocityLimit)

### Link velocity limit with a card product

You can link a velocity limit to your card product by sending a **POST** request to **/cardproducts/{id}/velocitylimits:link** as given below.

> [**POST /cardproducts/{id}/velocitylimits:link**](https://nymcard.com/docs/api#tag/Card-Products/paths/~1v1~1cardproducts~1{id}~1velocitylimits:link/post)

### Unlink velocity limit from a card product

You can unlink a velocity limit from your card product by sending a **POST** request to **/cardproducts/{id}/velocitylimits:unlink** as given below.

> [**POST /cardproducts/{id}/velocitylimits:unlink**](https://nymcard.com/docs/api#operation/unlinkVelocityLimits)

### Retrieve linked velocity limits

You can retrieve all velocity limits which are linked with your card product. Send a **GET** request to /**cardproducts/{id}/velocitylimits** endpoint as shown below.

> [**GET /cardproducts/{id}/velocitylimits**](https://nymcard.com/docs/api#operation/getVelocityLimits)

## **Advanced velocity limits**

We added ability to configure advanced velocity limits, which allow you to add additional configurations such as merchants (i.e. categories or identifications) in velocity limit profile, so that you can configure velocity limit profile that is applicable for specified configuration.

For this we have developed several new external [**APIs**](https://nymcard.com/docs/api#tag/Advanced-velocity-limits):

* Create advanced velocity limit – POST v1/advancedlimits
* Update advanced velocity limit – PUT v1/advancedlimits/{id}
* Get all advanced velocity limits – GET v1/advancedlimits
* Get advanced velocity limit – GET v1/advancedlimits/{id}

Advanced velocity limits are used to apply the special limit on transactional data such as limits on merchant category code, on a specific merchant or on the country from where the transaction has been initiated.

Below you can find **possible condition types**:

* "MCC"&#x20;
* "MERCHANT\_ID"&#x20;
* "KYC\_LEVEL"&#x20;
* "CHANNEL\_SCOPE"&#x20;
* "API\_CHANNEL"&#x20;
* "TRANSFER\_TYPE"&#x20;
* "PURCHASE\_TYPE" (has such enums as PURCHASE and ECOMMERCE)
* "CARD\_TYPE" (has such enums as VIRTUAL and PHYSICAL)
* "TRANSACTION\_ORIGIN" (has such enums as DOMESTIC, FOREIGN and ANY)

Below you can find an **example** of 'Create advanced velocity limit' (POST /advancedlimits) request and response:

<details>

<summary><strong>Request</strong></summary>

**`{`**

&#x20; **`"id" : "77a02486-10e2-4d55-9788-d0d49ed03d23",`**

&#x20; **`"name": "<string>",`**

&#x20; **`"type": "PER_TRANSACTION",`**

&#x20; **`"description": "<string>",`**

&#x20; **`"currency": "AED",`**

&#x20; **`"transaction_scope": [`**

&#x20;   **`"WITHDRAWALS",`**

&#x20;   **`"PURCHASES"`**

&#x20; **`],`**

&#x20; **`"active": true,`**

&#x20; **`"amount": 25000,`**

&#x20; **`"frequency": 7,`**

&#x20; **`"period": "NUM_OF_DAYS",`**

&#x20; **`"num_of_days": 7,`**

&#x20; **`"effective_from": "2023-12-01T00:00:00.000Z",`**

&#x20; **`"effective_to": "2023-12-31T11:59:59.999Z",`**

&#x20; **`"conditions": [`**

&#x20;   **`{`**

&#x20;     **`"type": "MCC",`**

&#x20;     **`"values": ["4511", "4582", "4722"]`**

&#x20;   **`},`**

&#x20;   **`{`**

&#x20;     **`"type": "ACQUIRER_COUNTRY",`**

&#x20;     **`"values": ["UAE"]`**

&#x20;   **`},`**

&#x20;   **`{`**

&#x20;     **`"type": "MERCHANT_ID",`**

&#x20;     **`"values": ["45576893", "47583920"]`**

&#x20;   **`},`**

&#x20;   **`{`**

&#x20;     **`"type": "KYC_LEVEL",`**

&#x20;     **`"values": ["2"]`**

&#x20;   **`},`**

&#x20;   **`{`**

&#x20;     **`"type": "CHANNEL_SCOPE",`**

&#x20;     **`"values": ["VISA", "MERCURY"]`**

&#x20;   **`}`**

&#x20; **`]`**

**`}`**

</details>

<details>

<summary><strong>Response</strong></summary>

**`{`**

&#x20; **`"id" : "77a02486-10e2-4d55-9788-d0d49ed03d23",`**

&#x20; **`"name": "<string>",`**

&#x20; **`"type": "PER_TRANSACTION",`**

&#x20; **`"description": "<string>",`**

&#x20; **`"currency": "AED",`**

&#x20; **`"transaction_scope": [`**

&#x20;   **`"WITHDRAWALS",`**

&#x20;   **`"PURCHASES"`**

&#x20; **`],`**

&#x20; **`"active": true,`**

&#x20; **`"min_amount": 0,`**

&#x20; **`"max_amount": 25000,`**

&#x20; **`"frequency": 7,`**

&#x20; **`"period": "NUM_OF_DAYS",`**

&#x20; **`"num_of_days": 7,`**

&#x20; **`"effective_from": "2023-12-01T00:00:00.000Z",`**

&#x20; **`"effective_to": "2023-12-31T11:59:59.999Z",`**

&#x20; **`"program_level": false,`**

&#x20; **`"created" : "2021-06-10T07:12:09.048Z",`**

&#x20; **`"modified" : "2021-06-10T07:12:09.048Z",`**

&#x20; **`"conditions": [`**

&#x20;   **`{`**

&#x20;     **`"type": "MCC",`**

&#x20;     **`"values": ["4511", "4582", "4722"]`**

&#x20;   **`},`**

&#x20;   **`{`**

&#x20;     **`"type": "ACQUIRER_COUNTRY",`**

&#x20;     **`"values": ["UAE"]`**

&#x20;   **`},`**

&#x20;   **`{`**

&#x20;     **`"type": "MERCHANT_ID",`**

&#x20;     **`"values": ["45576893", "47583920"]`**

&#x20;   **`},`**

&#x20;   **`{`**

&#x20;     **`"type": "KYC_LEVEL",`**

&#x20;     **`"values": ["2"]`**

&#x20;   **`},`**

&#x20;   **`{`**

&#x20;     **`"type": "CHANNEL_SCOPE",`**

&#x20;     **`"values": ["VISA", "MERCURY"]`**

&#x20;   **`}`**

&#x20; **`]`**

**`}`**

</details>

Also we added ability for system to allow **link/unlink** advanced velocity limit(s) to the **card products or cards** so that the advanced limit can be linked when it needs to be applied and can be unlinked once it’s not required to be applied on any card or card product.

For this we have developed several new APIs:&#x20;

* Link advanced velocity limit to card product ([POST](https://nymcard.com/docs/api#tag/Card-Products/operation/linkAdvancedVelocityLimits))
* Unlink advanced velocity limit from card product ([POST](https://nymcard.com/docs/api#tag/Card-Products/operation/unlinkAdvancedVelocityLimits))
* Link advanced velocity limit to card ([POST](https://nymcard.com/docs/api#tag/Cards/operation/linkCardAdvancedVelocityLimits))
* Unlink advanced velocity limit from card ([POST](https://nymcard.com/docs/api#tag/Cards/operation/unlinkCardAdvancedVelocityLimits))
* Get advanced velocity limits linked to card product ([GET](https://nymcard.com/docs/api#tag/Card-Products/operation/getAdvancedVelocityLimits))
* Get advanced velocity limits linked to card ([GET](https://nymcard.com/docs/api#tag/Cards/operation/getAdvancedCardVelocityLimits))
