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

# Update Card Expiration Date

> Update the expiration date on a stored token. Only the expiration date is changed; all other card data remains unchanged.

> [card] [Update Card Data Guide](https://developers.pcibooking.net/manage-tokens/update-card-data.md)
>
> Modify expiration dates and creator references on tokens

Updates the expiration date on a stored token without affecting any other card data. Use this when a cardholder's card has been renewed with a new expiration date and you need to keep the token current.

## Error Responses

| Code | HTTP Status | Condition |
| - | - | - |
| -125 | 400 | Year or Month value is not numeric |
| -125 | 400 | Expiration date is in the past |
| -1003 | 401 | The token does not exist, was deleted, or you are not its owner. See [Token Not Found or Not Accessible](https://developers.pcibooking.net/reference/error-handling.md#token-not-found-or-not-accessible). |
| -150 | 500 | Update transaction failed (rollback) |

## Parameter Constraints

| Parameter | Type | Required | Constraints |
| - | - | - | - |
| Month | integer | Yes | Valid range 1 to 12 |
| Year | integer | Yes | Must be greater than or equal to the current UTC year |

> [!NOTE]
>
> This endpoint is rate limited. See [Rate Limits](https://developers.pcibooking.net/reference/versioning-and-rate-limits.md#rate-limits).

## Parameters

### Authentication

**API key only.** This endpoint does not accept access tokens or session tokens.

**Authorization** `string` *required*

Your API key prefixed with `APIKEY`. Example: `APIKEY your-api-key`. The `x-pcibooking-api-key` header is also accepted. See the [Authentication guide](https://developers.pcibooking.net/getting-started/authentication.md).

### Path Parameters

**cardToken** `string` *required*

The token ID as returned by one of the tokenization methods. For example, `2821a46d80e14d1b96a7f18f1b81926d`.

### Request Body

**Year** `integer` *required*

New expiration year. Format **YYYY**.

**Month** `integer` *required*

New expiration month. Format **MM**.

```javascript Node.js theme={null}
const response = await fetch(
  'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d/UpdateExpiration',
  {
    method: 'PUT',
    headers: {
      'Authorization': 'APIKEY your-api-key',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      Year: 2027,
      Month: 12
    })
  }
);

console.log(response.status);
```

```python Python theme={null}
import requests

response = requests.put(
    'https://service.pcibooking.net/api/payments/paycard/2821a46d80e14d1b96a7f18f1b81926d/UpdateExpiration',
    headers={
        'Authorization': 'APIKEY your-api-key',
        'Content-Type': 'application/json'
    },
    json={
        'Year': 2027,
        'Month': 12
    }
)

print(response.status_code)
```

> [!WARNING]
>
> A reissued card with a new expiration date usually also has a new CVV. Check with the card owner whether the stored CVV needs to be updated as well.

## Response

**200** - Expiration updated successfully. Empty response body.

```text 200 theme={null}
Expiration date updated successfully. No content returned.
```

```json 400 theme={null}
{
    "code": -125,
    "message": "Bad input data",
    "moreInfo": "Expiration year/month error",
    "errorList": null
}
```

```text 401 theme={null}
Empty response body.
Authentication failed: the API key, session token or access token is missing or was not accepted.
See "Authentication and Permission Failures" on the Error Handling page.
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.