---
title: "Batch Account Updater"
description: "Learn how you can update card information through the Batch Account Updater."
url: "https://docs.adyen.com/online-payments/account-updater/batch-account-updater"
source_url: "https://docs.adyen.com/online-payments/account-updater/batch-account-updater.md"
canonical: "https://docs.adyen.com/online-payments/account-updater/batch-account-updater"
last_modified: "2024-10-04T16:17:00+02:00"
language: "en"
---

# Batch Account Updater

Learn how you can update card information through the Batch Account Updater.

[View source](/online-payments/account-updater/batch-account-updater.md)

With Batch Account Updater, you can send batch files to get updates for your shoppers' cards. We obtain the updates from Visa and Mastercard and send you batch response files with the new card details.

Integrating with our Batch Account Updater requires additional configuration steps. Contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) before you begin.

To update shopper card details through the Batch Account Updater:

1. Send a batch request file, or an API call if you only need an update for a single card.
2. Receive the response in the batch file.
3. Update the card details through a payments request.

## Set up an SFTP server

You need to have an SFTP server set up to send and receive the batch files.

To set up an SFTP directory, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other). You need to provide your IP address, and SSH and PGP keys. For more information, see [Advanced SFTP batch files](/development-resources/batch-processing/advanced-sftp-batch-files).

## Use batch request files

The process of sending a batch request file and receiving updates in the batch result file is as follows:

1. Generate a [batch request file](/development-resources/batch-processing/advanced-sftp-batch-files/batch-request-file/accountupdater-request-file) and upload it to your SFTP directory.

   The following is a sample Account Updater batch request file:

   **Batch request file**

   ```csv
   FH,1.0,TEST,Company,TestCompany,Default,1,ws@Company.TestCompany,AccountUpdater,FileHeaderEchoData
   BH,1,BlockHeaderEchoData
   L,1,MerchantAccount,TestMerchant,AccountUpdater,MerchantReference1,EchoData1
   SL,1,AccountUpdaterSingle,4111111111111111,06,2016,737,CardHolderName,,,
   L,2,MerchantAccount,TestMerchant,AccountUpdater,MerchantReference2,EchoData2
   SL,1,AccountUpdaterSingle,5444444444444444,03,2017,,CardHolderName,,,
   L,3,MerchantAccount,TestMerchant,AccountUpdater,MerchantReference3,EchoData3
   SL,1,AccountUpdaterRecurring,ShopperReference3,LATEST
   L,4,MerchantAccount,TestMerchant,AccountUpdater,MerchantReference4,EchoData4
   SL,1,AccountUpdaterRecurring,ShopperReference4,LATEST
   L,5,MerchantAccount,TestMerchant,AccountUpdater,MerchantReference5,EchoData5
   SL,1,AccountUpdaterSingle,4444111111111111,11,2015,737,CardHolderName,,,
   L,6,MerchantAccount,TestMerchant,AccountUpdater,MerchantReference6,EchoData6
   SL,1,AccountUpdaterSingle,5444111144444444,01,2018,,CardHolderName,,,
   BT,6
   FT,1
   ```

   After receiving the batch request file, we run validation checks and generate a batch acknowledgement file (ACK).

2. Optionally check the results of the validation check in the [ACK file](/development-resources/batch-processing/advanced-sftp-batch-files/batch-acknowledgement-file).

   When the batch request files are successfully validated, we obtain the updated card information from Visa and Mastercard and add the updated information to a batch result file. This process takes minimum two days from when you receive the ACK file.

3. Fetch the [batch result file](/development-resources/batch-processing/advanced-sftp-batch-files/batch-result-file/accountupdater-result-file) to retrieve the updated card information.

   The following is a sample Account Updater batch response file:

   **Batch response file**

   ```sh
   FH,1.0,TEST,Company,TestCompany,Default,1,ws@Company.TestCompany,AccountUpdater,FileHeaderEchoData
   BH,1,BlockHeaderEchoData
   L,1,MerchantAccount,TestMerchant,ScheduleAccountUpdater,MerchantReference1,Success,EchoData
   SL,1,AccountUpdaterResult,221234321234543H,Submitted,NoChange,2013-11-13,,,,,
   L,2,MerchantAccount,TestMerchant,ScheduleAccountUpdater,MerchantReference2,Success,
   SL,1,AccountUpdaterResult,221234321234543K,Submitted,CloseAccount,2013-11-13,,,,,
   L,3,MerchantAccount,TestMerchant,ScheduleAccountUpdater,MerchantReference3,Success,EchoData
   SL,1,AccountUpdaterResult,221234321234543J,Submitted,PANChanged,2013-11-13,D123456789123456,07,2018,,
   L,4,MerchantAccount,TestMerchant,ScheduleAccountUpdater,MerchantReference4,Success,EchoData
   SL,1,AccountUpdaterResult,221234321234543F,Submitted,CardExpiryChanged,2013-09-15,F098765432112345,03,2017,,
   L,5,MerchantAccount,TestMerchant,ScheduleAccountUpdater,MerchantReference5,Success,EchoData
   SL,1,AccountUpdaterResult,221234321234543T,Submitted,Error,2013-09-15,,,,,
   L,6,MerchantAccount,TestMerchant,ScheduleAccountUpdater,MerchantReference6,Success,EchoData
   SL,1,AccountUpdaterResult,221234321234543E,Not Submitted,Error,,,,,No registered account,
   BT,6
   FT,1
   ```

4. Based on the batch result file, update the old card details.

   * If you are tokenizing with Adyen, the token will always stay the same, but you need to [update the old card details through a payment request](#update-card-details).
   * If you are not tokenizing with Adyen, you need to update the old card details in your own system.

## Use API calls

To receive account updates for a single card, you can send an API request instead of a batch request file.

1. Make a POST [/scheduleAccountUpdater](https://docs.adyen.com/api-explorer/Recurring/latest/post/scheduleAccountUpdater) request, specifying either:

   * Card data: all fields in the `card` object are mandatory.
   * Adyen token data: the `shopperReference` and `selectedRecurringDetailReference` fields are mandatory.

   ### Tab: Account Updater request with card data

   **Request with card data**

   ```json
   {
      "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
      "reference": "YOUR_REFERENCE",
      "card": {
         "expiryMonth": "10",
         "expiryYear": 2020,
         "holderName": "Adyen Test",
         "number": "4111111111111111"
      }
   }
   ```

   ### Tab: Account Updater request with token data

   **Request with token data**

   ```json
   {
      "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
      "reference": "YOUR_REFERENCE",
      "shopperReference": "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
      "selectedRecurringDetailReference": "8814232895168272"
   }
   ```

   The response indicates we received your request.

   **Response**

   ```json
   {
      "pspReference":"FKSPNCQ8HXSKGK82",
      "result":"Success"
   }
   ```

   We now forward the request to Visa and Mastercard.

2. Fetch the [batch result file](/development-resources/batch-processing/advanced-sftp-batch-files/batch-result-file/accountupdater-result-file) to retrieve the updated card information.

   * The result file is encrypted when you use the API.
   * The file name follows this format: `AccountUpdater_AutoUpdates_result_YYYY-MM-DD_enc`

3. Based on the batch result file, update the old card details.

   * If you are tokenizing with Adyen, the token will always stay the same, but you need to [update the old card details through a payment request](#update-card-details).
   * If you are not tokenizing with Adyen, you need to update the old card details in your own system.

## Account Updater statuses

When we perform an account update, we send a status in the batch result file. The status indicates what action you need to take based on what changed in the card details.

| **Status**                 | **Alternative values for the status**                                                                                                                                                                                                                                                                                                                                                                           | **Description**                                                                                                                              |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `NoChange`                 | * `EitherExpiryChangedOrNoChange`
* `InvalidAmount`
* `TxInvalid`
* `RecordIdentifierInvalid`
* `BinNotParticipating`
* `CreditCardNumberInvalid`
* `CreditCardNumberNotFound`
* `IssuerNotSubscribed`
* `NoMatchFound`
* `UnknownResponseCodeProvided`
* `GenericTokenUseError`
* `InvalidCreditCard`
* `InvalidExpirationDate`
* `MerchantIsNotAuthorisedToUseTokens`
* `TokenIsInvalid`
* `TokenWasNotFound` | The card has not changed.                                                                                                                    |
| `CloseAccount`             | - `CloseAccount`
- `CloseAccountThisAccountOnly`                                                                                                                                                                                                                                                                                                                                                                | The account has been permanently closed by the issuing bank.                                                                                 |
| `PANChanged`               | * `CardChanged`                                                                                                                                                                                                                                                                                                                                                                                                 | The account number has changed.                                                                                                              |
| `CardExpiryChanged`        |                                                                                                                                                                                                                                                                                                                                                                                                                 | The expiry date of the card has changed.                                                                                                     |
| `ContactCardAccountHolder` |                                                                                                                                                                                                                                                                                                                                                                                                                 | (Visa only) The card has a new account number, expiry date, or both, but the shopper has asked the issuer to not share updated card details. |
| `Error`                    | - `MerchantIdInvalid`
- `MerchantIdNotEnabled`                                                                                                                                                                                                                                                                                                                                                                  | Our Account Updater process experienced an error.                                                                                            |

## Update old card details

There are three scenarios that can occur as a result of an account update:

* [No updates on the card](#no-updates).
* [Card details are updated](#card-details-updated).
* [Card details are disabled](#card-details-are-disabled).

To enable this flow, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other). Not doing so will result in an API error when attempting the update.

### No updates on the card

If there are no updates on the card, you do not need to take any further actions and all the card details remain unchanged.

### Card details are updated

You can receive updates of the following information on your shoppers' cards:

* Card number
* Expiry date of the card
* Both card number and expiry date

The following examples show how you can update card details through a payment request.

### Tab: Update card number

Make sure that you include the new `alias` in the `paymentMethod.number` field when you update the card number.

**Payment request to update card number**

```json
{
   "amount": {
     "currency": "USD",
     "value": 1000
   },
   "reference": "YOUR_PAYMENT_REFERENCE",
   "paymentMethod": {
      "storedPaymentMethodId": "8415693365216824",
      "type": "scheme",
      "number": "A549761438794558",
      "expiryMonth": "10",
      "expiryYear": "2020"
   },
  "returnUrl": "https://your-company.example.com/...",
  "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
  "shopperReference":"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
  "shopperInteraction":"ContAuth"
}
```

### Tab: Update card expiry

**Payment request to update card expiry**

```json
{
   "amount": {
      "currency": "USD",
      "value": 1000
   },
   "reference": "YOUR_PAYMENT_REFERENCE",
   "paymentMethod": {
      "type": "scheme",
      "storedPaymentMethodId": "8415693365216824",
      "expiryMonth": "10",
      "expiryYear": "2020"
   },
   "returnUrl": "https://your-company.example.com/...",
   "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
   "shopperReference":"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
   "shopperInteraction":"ContAuth"
}
```

### Card details are disabled

You can get an update that certain cards have been disabled. This can occur if the card is reported as stolen, or if the shopper informed the bank they no longer authorize transactions from you. We do not delete the `storedPaymentMethodId` or `recurringDetailReference`. Instead we provide the update to you, and you need to delete the card details.

For instructions, see [Delete stored payment details](/online-payments/tokenization/managing-tokens#delete-stored-details).

## Get a report on card updates

The [Account Updater results report](/reporting/account-updater-results) shows a summary of Account Updater results from a particular period of time. Use this report to check the outcomes and statuses of account updates, and get a summary of both Real Time Account Updater and Batch Account Updater results. You can also analyze the fees charged for the Account Updater.

## See also

* [Tokenization](/online-payments/tokenization)
* [Real Time Account Updater](/online-payments/account-updater/real-time-account-updater)
* [Managing tokens](/online-payments/tokenization/managing-tokens)
* [Account Updater results report](/reporting/account-updater-results-report)
