> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/classic-tokenization/use-cases/post-enrolment/card-life-cycle-management/replace-or-renew-a-card.md).

# Replace or renew a card

When a physical card is replaced (for example, after loss) or renewed (for expiration), the issuer backend must send the updated FPAN and expiration date to Tokenization Service. Tokenization Service then updates the funding card information with the payment network TSP.

Use the [UpdateCard API](/classic-tokenization/api-reference/issuer-gateway-api/inbound-from-issuer.md). Provide both the old and new FPAN and expiration date.

### Update FPAN and expiration date <a href="#pan-and-expiry-date-update" id="pan-and-expiry-date-update"></a>

Here is an example of a valid request:

```json
{
  "issuerCardRefId": "string",
  "fpanDetails": "string (base64)"
}
```

`fpanDetails` contains the encrypted old and new FPAN and expiration date. It is a base64-encoded PKCS#7 encrypted JSON payload.

JSON payload format:

```json
{
  "oldFPAN": "[0-9]{16,19}",
  "oldExpDate": "MMYY",
  "newFPAN": "[0-9]{16,19}",
  "newExpDate": "MMYY"
}
```

Some payment networks require the old FPAN and expiration date to process the update.

The detailed flow:

<figure><img src="https://2421315942-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3OvNtPk6hurTTvkKLzkK%2Fuploads%2FdoeE8wRdNeUnRgzkoOvP%2Freplace-renew.png?alt=media&amp;token=6c6c038f-9e10-48b0-a2f6-95d0ecb83bcb" alt=""><figcaption><p>UpdateCard flow for card replacement or renewal.</p></figcaption></figure>

### Update the card profile on renewal

In rare cases, the card is renewed because the end user changes card program (for example, from Classic to Gold).

In this case, you can also update the card profile using `newProductId`. This value is the card profile ID configured in the payment network TSP.

Request body example:

```json
{
  "issuerCardRefId": "string",
  "fpanDetails": "string (base64)",
  "newProductId": "string"
}
```

### Update issuerCardRefId <a href="#issuercardrefid-update" id="issuercardrefid-update"></a>

`issuerCardRefId` uniquely identifies the card. You can also update it during this process using `newIssuerCardRefId`.

Request body example:

```json
{
  "issuerCardRefId": "string",
  "fpanDetails": "string (base64)",
  "newProductId": "string",
  "newIssuerCardRefId": "string"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.payments.thalescloud.io/classic-tokenization/use-cases/post-enrolment/card-life-cycle-management/replace-or-renew-a-card.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
