# Set Temporary Credit Limit
source: https://developer.mastercard.com/mastercard-processing-credit/documentation/sandbox-testing/credit-card/set-temporary-credit-limit/index.md

## Test case -- Success {#test-case--success}

This test case describes setting a new credit limit for a specified contract stored in the CMS.

**Sample request**

`PUT /contracts/70001/temporary-credit-limit`

```JSON
{
  "amount": 5000,
  "currency": "EUR",
  "limitEffectiveDate": "2021-06-25",
  "limitExpirationDate": "2021-07-25",
  "operator": "EQUAL"
}
```

**Sample response**

`204`

## Test case -- Fail -- Revolving credit limit not set {#test-case--fail--revolving-credit-limit-not-set}

This test case describes an attempt to set a temporary credit limit for a specified contract stored in the CMS that does not have a credit limit.

For this test case, use the following information in the request:

|  Field   | Available value |
|----------|-----------------|
| `amount` | 9999            |

**Sample request**

`PUT /contracts/60001/temporary- credit-limit`

```JSON
{
  "amount": 99999,
  "currency": "EUR",
  "limitEffectiveDate": "2030-03-21",
  "limitExpirationDate": "2030-04-20",
  "operator": "PLUS"
}
```

**Sample response**

`400`

```JSON
{
    "Errors": {
        "Error": [
            {
                "Source": "MASTERCARD PROCESSING",
                "ReasonCode": "CREDIT_LIMIT_IS_MISSING",
                "Description": "Credit limit is missing.",
                "Recoverable": false
            }
        ]
    }
}
```

## Test case -- Fail -- Temporary credit limit already set for a specified time {#test-case--fail--temporary-credit-limit-already-set-for-a-specified-time}

This test case describes an attempt to set a temporary credit limit that overlaps existing temporary limit in a given period.

For this test case, use the following information in the request:

|        Field         | Available value |
|----------------------|-----------------|
| `limitEffectiveDate` | 2030-03-31      |

**Sample request**

`PUT /contracts/60001/temporary- credit-limit`

```JSON
{
  "amount": 100.77,
  "currency": "EUR",
  "limitEffectiveDate": "2030-03-31",
  "limitExpirationDate": "2030-04-20",
  "operator": "EQUAL"
}
```

**Sample response**

`400`

```JSON
{
    "Errors": {
        "Error": [
            {
                "Source": "MASTERCARD PROCESSING",
                "ReasonCode": "CREDIT_LIMIT_CONFLICT",
                "Description": "Only one credit limit can be set at a time.",
                "Recoverable": false
            }
        ]
    }
}
```

