# Update Account
source: https://developer.mastercard.com/payment-account-management/documentation/use-cases/update-account/index.md

This guide covers use cases for an issuer implementing the PAM API to maintain account lifecycle use case. During the lifecycle of a PAN an issuer can send account updates to update the Token Vault, ABU PAN Chain, and the PAR Vault. These account updates could be to:

* Update portfolio from other network to Mastercard
* Upgrade the product for a cardholder from one Mastercard product to another
* Update account number of an existing card (Funding Account Update)
* Update expiry date of an existing card
* Update the card sequence number of an existing card

### Consuming Systems {#consuming-systems}

* Account Billing Updater
* Mastercard Digital Enablement Systems (Token Vault)
* Payment Account Reference (PAR Vault)

### APIs used {#apis-used}


API Reference: `GET /updateAccount`


API Reference: `GET /account-maintenance/requestStatus`

Diagram updateAccount

### Funding Account Update {#funding-account-update}

**Scenario** : Issuer receives a request from cardholder for a replacement card. Issuer now issues a new card to the cardholder which has a different card number. Issuer invokes a call to PAM API to make a lifecycle management update.
**Description** : In this use case, `/updateAccount` API is used with reason code 'R' to update cardholder details in ABU, MDES, and PAR Vault. To confirm successful response, the `/requestStatus` API is then sent. As this is an FPAN update in a different account range, a redigitization event is triggered in MDES to update the device and server tokens.

#### Funding Account Update Processing in ABU {#funding-account-update-processing-in-abu}

1. Issuer sends an `updateAccount` request to PAM API.
2. PAM API will send the update to ABU.
   1. ABU will update the ABU database.
3. Issuer then sends a `requestStatus` request to confirm if the account updates were successfully consumed by ABU.
4. PAM will send a success response if the account update was successful. Otherwise, PAM will send an error code in the response.

Diagram updateAccount-abu

#### Funding Account Update Processing in MDES {#funding-account-update-processing-in-mdes}

1. Issuer sends an `updateAccount` request to PAM API.
2. PAM API will send the update to MDES.
3. MDES will either send a success response to acknowledge the receipt of the FPAN change or an error code in response.
4. Issuer then sends a `requestStatus` request to confirm if the account updates were successfully consumed by MDES.
5. PAM will send the response received from MDES. The following events occur asynchronously:
   1. MDES will update the MDES database with the PAN to token mapping.
   2. MDES will send Notify Token Update (NTU) per token to the payment app server.
   3. For the device tokens:
      1. Wallet initiates the redigitize request.
      2. MDES will redigitize each token.
      3. When the device is available, MDES will initiate the reprovisioning flow.
      4. The device will update the card profile on the device.
      5. The device will send a success response to the payment app server.
      6. The payment app server will send a reprovisioning complete response to MDES.
      7. The server tokens are updated automatically based on the details in the NTU.
   4. For the server tokens:
      1. The payment app serevr will send a redigitize request to MDES.
      2. MDES will redigitize each token.
6. MDES will send an NTU per token updated to the payment app server.
7. MDES will send an NTU per token updated to the issuer.

The NTU received by issuer concludes this process for an issuer. The detailed process for device tokens is available in the [MCBP use cases document](https://techdocs.mastercard.com/bundle/p_MDESCP/page/jtu1586189058780.html).
Diagram updateAccount-mdes

#### Funding Account Update Processing in PAR Vault {#funding-account-update-processing-in-par-vault}

1. Issuer sends an `updateAccount` request to PAM API.
2. PAM API will send the update to PAR Vault.
   1. PAR Vault will update the PAR vault to associate the new FPAN with the existing PAR.
3. Issuer then sends a `requestStatus` request to confirm if the account updates were successfully consumed by PAR Vault.
4. PAM will send a success response if the PAN to PAR mapping update was successful. Otherwise, PAM will send an error code in the response.

Diagram updateAccount-par

Refer to the integration tutorial for details on how to use these endpoints for updating an account.

See also: [Error Codes](https://developer.mastercard.com/payment-account-management/documentation/code-and-formats/error-codes/index.md)
