---
title: "Renew card validity"
method: PATCH
path: "/wallet/v2/cards/{cardId}/validity/renew"
tags: ["Card validity"]
---

# Renew card validity

`PATCH /wallet/v2/cards/{cardId}/validity/renew`

Renew a card's validity period in hours. 

Renewal can be done for `VIRTUAL` cards and activated `PLASTIC` cards that were created or reissued with the `validity_period_hours` field set to a defined value greater than zero.

When a card reaches its `valid_until` date, the card's status is set to `INOPERATIVE`. When this happens, a [Card updated](https://developers.pismo.io/events/docs/cards-update-1) event is generated.

For existing cards that never had `validity_period_hours` defined, you can do it through this endpoint.

When the card is renewed: 

  * A new `valid_until` date is calculated and a [Card updated](https://developers.pismo.io/events/docs/cards-update-1) event is generated with `operation type` =  `CARD_VALIDITY_RENEWAL`.

  * If the card's status is `INOPERATIVE`, the status changes to `NORMAL`.

  * If the card's status is `NORMAL`, `REISSUED`, `BLOCKED`, `PENDING` or `WARNING`, the status remains the same. 

**Note:** This endpoint requires an account token - an access token encoded with a Pismo account ID. Tokens can expire quickly, which can result in a **401 Unauthorized** error message.

## Path parameters

- `cardId` string, required

## Request body

- CardsValidityRenewBody — Card validity period object
  - `validity_period_hours` integer, required — Sets a card's validity period in hours. Cannot exceed the card's `expiration_date`. <b>REQUIRED</b> for a `PLASTIC` or `VIRUTUAL` card.

## Response `200`

Card validity period was renewed

- CardsValidityRenewResponse — Card validity period renewal response object.
  - `id` integer — ID of card to create relationship for
  - `status` 'ACTIVE' | 'SUSPENDED' | 'PENDING' — Card status
  - `validity_period_hours` integer — How long, in hours, the card is valid. Cannot exceed the card's `expiration_date`. Once this period is exceeded, and the card has a `NORMAL`, `BLOCKED`, `PENDING`, `WARNING` or `REISSUED` status, its status becomes `INOPERATIVE`. This field is used to calculate the datetime value for `valid_until`. For `VIRTUAL` and `PLASTIC` cards. Setting this field for `TEMPORARY` or `RECURRING` cards returns a **400 Bad request** error.
  - `valid_until` string — Card validation date in UTC time (format:yyyy-MM-ddThh:mm:ssZ). For `TEMPORARY` virtual cards, which have a limited time frame, typically 24 hours (default), or according to the program parameter for this, which is why the date/time here is more granular than `expiration_date`. For more information, refer to [Configuring temporary cards](https://developers.pismo.io/pismo-docs/docs/cards-overview-1#configuring-temporary-cards).

## Other responses

- `401` — Access token is missing or invalid
- `403` — The request has been lost
- `500` — Internal server error

---

[API](https://skmtc.net/pismo/apis/platform-authentication.md) · [All operations](https://skmtc.net/pismo/apis/platform-authentication/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pismo/platform-authentication/revisions/935b62e16de4/schema)
