About 30% of the issued payment cards globally are re-issued every year due to account closures, cards reported lost or stolen, expiration date changes, product upgrades, and fraud. Each time a customer replaces their card, you’re left with outdated stored card information in your vault. This can lead to checkout friction, declined transactions, and ultimately, customer churn.

Batch Account Updater is an account lifecycle management service for card-on-file (COF) account information. Through a single API integration, you can securely update your customers’ payment card account information in a timely and efficient manner. At this time, Pagos provides batch account updater support for Visa, Mastercard, Discover, Amex Direct, and Amex OptBlue.

This guide outlines the following Batch Account Updater processes, from registration to receiving your first update and beyond. Click on each step to navigate to the associated header in this guide:

  1. Request access to Batch Account Updater.
  2. Register your business with the card brands.
  3. Authenticate with Batch Account Updater.
  4. Set up webhooks to receive updates.
  5. Register encryption keys to send data securely.
  6. Prepare your data to be sent.
  7. Submit update inquiries via the API.
  8. Check the status of a specific update. request
  9. Call Batch Account Updater for your updated card details.

Request Access

Contact us if you’re interested in Batch Account Updater. Once onboarded, you’ll have access to the Account Updater page in your Pagos Service Panel.

Register With Card Brands

Before you can start requesting and receiving updated card details from the card brands, Pagos must first register your business with Visa, Mastercard, Amex, and Discover individually. Pagos will work with you directly to collect the necessary business details and complete this registration process. This process is mandatory and required by each card brand.

You can check the status of your enrollment on the Networks tab in the Account Updater page.

Authenticating

To ensure only authorized entities can access our services, we authenticate the identity of each client that submits requests to Batch Account Updater. Learn more in our Batch Account Updater API Headers guide.

Set Up Webhooks

Webhooks are a system of automated notifications that push information to your designated destination when important events occur. They’re essential for receiving notifications such as account updates or errors that occur in your updater job. See our Batch Account Updater Webhooks guide for details on setting up and validating webhooks.

Register Encryption Keys

Before you submit a file of primary account numbers (PANs) to Batch Account Updater for updates, you must first encrypt that file. We will similarly encrypt any file we transfer back to you. For Batch Account Updater to send you an encrypted file with your updates, you’ll need to first register your PGP encryption keys. To do so:

1

Click your profile icon at the bottom of the main navigation.

2

Under Developers, click API Keys.

3

Click the Action API tab.

4

Under Batch Account Updater PGP Encryption Key, click Create PGP Key. A side panel will open containing your Request Key, Request Key ID, Response Key, and Response Key ID.

5

Copy each value and store them somewhere secure. You can only view the Request Key and Response Key values one time.

6

Click I’ve Copied My Keys to confirm and exit out of the side panel.

You can navigate to this page at any time to review and manage existing PGP keys, or add new keys as needed.

PGP Key Pairs

Batch Account Updater requires two different PGP Key pairs, and each pair is comprised of a public and private key:

  • Pagos’ PGP Key Pair: Once you’re registered with Batch Account Updater, we’ll send you Pagos’ public key directly, which you’ll use to encrypt your request file before sending it to Pagos. We use our own private key to decrypt the file.
  • Your PGP Key Pair: When you register your encryption keys, you upload your public key to the Pagos Service Panel; we’ll then use it to encrypt the response file before making it available for download. You’ll use your private key to decrypt that response file.

Prepare Your Data

To fetch and prepare your data to be sent to Pagos securely:

  1. Fetch the necessary PAN data from your system that you want to send for updates.
  2. Save that data in a .csv with the columns as outlined in this example. Keep in mind, metadata is optional. Each card brand validates the sub_merchant_id field differently, so keep the following details in mind when preparing the .csv:
    1. For Visa, American Express, and Discover, the field is optional; it can contain any string value 1-12 characters in length or be null
    2. For Mastercard, the field can either be null or a valid 15 character sub_merchant_id issued by Mastercard
  3. Encrypt the .csv file using PGP encryption keys established in the Action API tab.

Submit Cards for Updates

After you’ve prepared your card data to be transferred, you have the option to send your secure file via the Batch Account Updater API. To do so, post the job file to the /inquiries/jobs API endpoint. If the request was successful, you’ll receive an HTTP 200 OK status response along with a job ID; if the request fails, you’ll receive the corresponding generic API error code.

Check the Status of an Inquiry

After your inquiry has been submitted, you can poll the status of your job at any time by calling the /inquiries/jobs/{JobId} endpoint and specifying the respective job id. Possible status responses include:

  • Pending - Your job was successfully received
  • Processing - Your job is processing
  • Processed - Your job is complete and your updates are available
  • Error - There was an issue receiving and processing your job. Learn more in our error handling guide.

Receive Updated Card Details

After you send a list of PANs to Pagos for updates, you’ll receive updated card details in waves over the next few days from the card brands, with the responses from each arriving asynchronously.

When the card brands have processed and returned your updates, you’ll receive a webhook notification. Retrieve an encrypted .csv file with your updates by calling the inquiries/jobs/{JobId}/download API.

Encrypted .csv response files will be available for download for 90 days from the time the response file is created. The system will automatically purge after this time.

Network Processed Webhooks

Pagos receives updated PANs from each of the different card brands at different times. Instead of making you wait until all card updates are ready, we’ll push them to you in waves as soon as we process them. Whenever a card brand’s PANs are ready, you’ll receive a network processed webhook notification. This webhook notification alerts you that updates from one card brand—a portion of your overall job—are available to you, and even identifies the card brand that provided the update.

Network processed updates don’t necessarily require any action from you. If you want to retrieve the partial job update after receiving this notification, you can do so. Otherwise, we’ll continue to add all of your updates to the same .csv file until all updates are processed and the job is completed; at that point, you’ll receive a job completed webhook notification and you can retrieve all your updates at once.

Client Sample

Please refer to the JS example in github for a detailed client sample.