# Set a temporary limit
source: https://developer.mastercard.com/mastercard-processing-credit/documentation/use-cases/credit-card/set-temporary-limit/index.md

## Overview {#overview}

The use case describes the process for a cardholder to change the limit on their credit card for a specified period. A temporary credit limit works like basic credit limit. It can increase, decrease, or override revolving credit limit and remain active for a specific period. Several temporary limits can be active at any given time. By temporarily changing the credit limit, a cardholder can occasionally cover expenses bigger than usual, like funeral or medical treatment.

## Sequence diagram {#sequence-diagram}

Diagram set-temporary-limit

### Explanation {#explanation}

1. The cardholder decides to change the limit on their credit card.
2. The mobile application or e-banking service sends the request to change the credit limit to the server.
3. The server sends a `PUT` request to the `/contracts/{contract_id}/temporary-credit-limit` endpoint by passing the following mandatory fields in the request body:

* `amount` -- with the value of the new credit limit
* `currency` -- with the currency of the credit limit represented in the ISO 4217 alphanumeric code
* `limitExpirationDate` - with the date until which the new limit will be applicable Note: For the standard credit product, the server must put the `accountContractId` value in place of `contract_id` in the path. Tip: Depending on your UI design, you can alternatively send the `operator` field with the value by which the limit must be changed. For example, if the cardholder has a credit limit of 1000 USD and requested for the new limit of 1500 USD till end of 2024, your server can send the following request body to reflect that change in the Mastercard Processing CMS.

  ```json
  {
    "amount": 5000,
    "currency": "EUR",
    "limitExpirationDate": "2030-07-25",
    "operator": "EQUAL"
  }
  ```

  By using `limitEffectiveDate`, you can indicate from which date the new limit is applicable.

4. The API sends a response to the server, confirming that the revolving credit limit has been changed for a specified time.
5. The server sends a response to the mobile application or e-banking service confirming that the credit limit has been changed for a specified time.
6. The mobile application or e-banking service notifies the cardholder that the credit limit has been changed for a specified time. Note: A temporary credit limit works just like a revolving credit limit. It can increase or decrease and remains active for a specific period. Several temporary limits can be active in the CMS, but their effective dates cannot overlap.  

   For example:  

   Revolving credit limit = 1000 USD  

   You have sent two API requests to set a temporary credit limit.

   ```json
   {
     "amount": 200,
     "currency": "USD",
     "limitEffectiveDate": "2030-06-01",
     "limitExpirationDate": "2030-06-14",
     "operator": "MINUS"
   }
   ```

   ```json
   {
     "amount": 500,
     "currency": "USD",
     "limitEffectiveDate": "2030-06-15",
     "limitExpirationDate": "2030-06-29",
   }
   ```

   That would result in the following revolving credit limit in the CMS:
   * From 2030-06-01 to 2030-06-14 -- credit limit 800 USD
   * From 2030-06-14 to 2030-06-29 -- credit limit 500 USD
   * From 2030-06-30 -- credit limit 1000 USD

Refer to [Sandbox testing](https://developer.mastercard.com/mastercard-processing-credit/documentation/sandbox-testing/index.md) for information on how to execute the use case in the Sandbox environment.

## Endpoint {#endpoint}


API Reference: `PUT /contracts/{contract_id}/temporary-credit-limit`

