Retrieving Card Updates

Overview

There are two functions for retrieving the card updates associated with a subscription:

  • Retrieving updates after a webhook notification
  • Retrieving most recent results for a given schedule ID

Retrieving Updates after a Webhook Notification

This is likely the primary method you will want to use for retrieving your updated card information after a webhook notification. This request is an HTTP GET request that contains a updateId within the URL path.

The updateId represents a group of records that were updated at a single point in time. It is not strictly linked to a subscription schedule.

For example, you may have a subscription schedule that contains three records. On day 1, records 1 and 2 are updated. An updateId is generated for those two records. These two updates are returned when this endpoint is called. On day 2, an update may arrive for the third card. It is assigned a new updateId and this update only is returned when this endpoint is called.

GET /api/v4/accounts/{accountId}/account-updater/updates/{updateId}

*Required Scopes: pcx:account_updater:results:read

HTTP response code 200 indicates a successful request. The body of the response is a JSON array containing a JSON object for each update for the given updateId. It has the following format.

This updateId is under mostRecentUpdate.updateId. See Retrieving Most Recent Results for a Given Schedule ID.

[
  {
    "id": "auru_2f418b31a4ce4736a54ed7d90126d8fe",
    "oldExpiry": "1230",
    "newExpiry": "1235",
    "oldToken": "123456789101",
    "newToken": "123456789121",
    "updateId": "aupres_7d7366c9b6564b9abff22829c3b9ce66",
    "updatedAt": "2022-10-11T03:06:47.488Z",
    "status": "valid",
    "accountUpdaterScheduleRecordId": "cssr_d468d4061ab44c309a46d3c3f4fd96e0",
    "accountUpdaterScheduleId" : "css_d4c2c2cd09924d71abad464ac3004a17",
    "format": "payconex"
  }
]

📘

Note

  • oldToken: The old token that was provided to be updated (Note: this can be either a ShieldConex® token (bfid), PayConex™ token (token_id), or raw PAN data depending on how the schedule was created. See responseFormat).
  • newToken: The updated new token (Note: this can be either a ShieldConex token (bfid), PayConex™ token (the new token_id for reissuing transactions via SLAPI or QSAPI), or raw PAN data depending on how the schedule was created. See responseFormat).

Update Response Parameters

ParameterDescription
idThe ID of this specific update.
oldExpiryThe previous expiration date for the card.
newExpiryThe new expiration date (after the account is updated).
oldTokenThe previous token data for the card.
newTokenThe new token data for the updated card.
updateIdThe most recent update identifier associated with the record.
updatedAtThe time that the account was updated.
statusThe status of an Account Updater update. See the table below for more detail on the statuses that can be received.
recurringSchedulesThe list of PayConex™ recurring schedules associated with this update. Not relevant for merchants who are managing their own recurring transaction routines.
accountUpdaterScheduleRecordIdThe id value associated with this update that returned after creating a subscription.
formatThe formats that an Account Updater schedule is set to be returned in. This is populated with the same responseFormat when creating subscriptions.

Retrieving Most Recent Results for a Given Schedule ID

This endpoint allows you to check on the status of all records associated with a given scheduleId. The scheduleId is returned as cardSyncScheduleId after a subscription is created creating a subscription.

This method is handy for cases where you may need to get the most recent data independently of the record actually being updated or the webhook receiving a notification. Each record contains the mostRecentUpdate in the format of an update above.

This request is a HTTP GET request that contains a scheduleId within the URL path of the endpoint.

GET /api/v4/accounts/{accountId}/account-updater/schedules/{scheduleId}/results

*Required Scopes: pcx:account_updater:results:read

Response

{
  "id": "css_d4c2c2cd09924d71abad464ac3004a17",
  "periodId": "PERIOD_1W",
  "periodDate": "2024-07-12",
  "responseFormat": "shieldconex",
  "enabled": true,
  "createdAt": "2022-10-11T03:48:35.140Z",
  "updatedAt": "2022-10-11T03:48:35.140Z",
  "templateRef": "shieldconex_template_reference",
  "records": [
    {
      "id": "css_5cd5614dd4514735ae2d274597824c5e",
      "token": "transactionId",
      "createdAt": "2024-07-12T03:48:35.140Z",
      "updatedAt": "2024-07-12T03:48:35.140Z",
      "type": "shieldconex",
      "enabled": true,
      "expiry": "1230",
      "mostRecentUpdate": {
        "id": "auru_2f418b31a4ce4736a54ed7d90126d8fe",
        "oldExpiry": "1230",
        "newExpiry": "1235",
        "oldToken": "123456789101",
        "newToken": "4444333322221111",
        "updateId": "aupres_7d7366c9b6564b9abff22829c3b9ce66",
        "updatedAt": "2022-10-11T03:48:35.140Z",
        "status": "valid",
        "accountUpdaterScheduleRecordId": "cssr_d468d4061ab44c309a46d3c3f4fd96e0",
        "format": "shieldconex"
      }
    }
  ]
}

Result Response Parameters

ParameterDescription
idThe ID value returned in the response is scheduleId.
periodIdThis is the period, or schedule, that the Account Updater API follows to issue the cards for updating. See the table for a list of allowed periodId values.
periodDateThis is the date on which the subscription began.
responseFormatThe response format that was sent as part of the original subscription request.
enabledThe current status of the subscription.
createdAtThe date and time on which this subscription was created.
updatedAtThe date and time on which the last update was made for this subscription.
recordsThis is a JSON array containing the details of each token or card that was included as a part of the original subscription. Each of these data elements contains another JSON array called mostRecentUpdate. This contains the same parameters as those listed in the update response parameters table above.

Update Statuses

The table below contains a list of all the possible values that can come back from the card issuers as a notification or update.

StatusDescription
validThe card is valid, but no updates need to be made to the account.
contactThe card issuer is reporting a problem with the account. You should contact the card holder, as the account might be closed.
no_matchThe card issuer could not find a match for the given card. This does not mean the account is or isn't valid; it simply just couldn't be found for updating.
no_changeSimilar to the valid status, the account is valid but no updates needed to be made.
updated_cardThe card account and possibly expiration date were updated.
updated_expiryThe card account remained the same and only the expiration date was updated.