> 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/es/casos-de-uso/postinscripcion/gestion-del-ciclo-de-vida-de-la-tarjeta/sustituir-o-renovar-una-tarjeta.md).

# Sustituir o renovar una tarjeta

Cuando se reemplaza una tarjeta física (por ejemplo, después de una pérdida) o se renueva (por vencimiento), el backend del emisor debe enviar el FPAN actualizado y la fecha de vencimiento al Servicio de Tokenización. El Servicio de Tokenización luego actualiza la información de la tarjeta de financiamiento con el TSP de la red de pago.

Use el [API UpdateCard](/classic-tokenization/es/referencia-de-la-api/api-de-la-pasarela-del-emisor/entrante-desde-el-emisor.md). Proporcione tanto el FPAN y la fecha de vencimiento antiguos como los nuevos.

### Actualizar FPAN y fecha de vencimiento <a href="#pan-and-expiry-date-update" id="pan-and-expiry-date-update"></a>

Aquí hay un ejemplo de una solicitud válida:

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

`fpanDetails` contiene el FPAN antiguo y nuevo y la fecha de vencimiento cifrados. Es una carga JSON cifrada PKCS#7 codificada en base64.

Formato de la carga JSON:

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

Algunas redes de pago requieren el FPAN antiguo y la fecha de vencimiento para procesar la actualización.

El flujo detallado:

<figure><img src="https://3204989413-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>Flujo UpdateCard para reemplazo o renovación de tarjeta.</p></figcaption></figure>

### Actualizar el perfil de la tarjeta al renovar

En casos poco frecuentes, la tarjeta se renueva porque el usuario final cambia de programa de tarjeta (por ejemplo, de Clásica a Oro).

En este caso, también puede actualizar el perfil de la tarjeta usando `newProductId`. Este valor es el ID de perfil de tarjeta configurado en el TSP de la red de pago.

Ejemplo de cuerpo de la solicitud:

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

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

`issuerCardRefId` identifica de forma única la tarjeta. También puede actualizarlo durante este proceso usando `newIssuerCardRefId`.

Ejemplo de cuerpo de la solicitud:

```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/es/casos-de-uso/postinscripcion/gestion-del-ciclo-de-vida-de-la-tarjeta/sustituir-o-renovar-una-tarjeta.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.
