Skip to main content

Token updated event

This webhook event is triggered when a payment token has been updated in the system, indicating that one or more attributes of the token, such as expiry date, card number, or account holder information have been modified. The event provides the updated token identifier and the associated shopper reference, allowing systems to keep tokenized payment data current and maintain accurate token lifecycle management.

Webhook Example

{
"checkoutReference": "e6j0wmay25tm6a10z5j86o1j42pggpwkur6u1f8941c43d6k58",
"payfacReference": "164EF8478A748",
"merchantReference": "w53xg1e8",
"amount": "108000",
"currency": "ISK",
"reason": "CardChanged",
"success": "true",
"hmacSignature": "eVu7uR8wcEiMxa5s8lSX/YYvU5LkshLdOSccUZ4M//0=",
"additionalData": {
"eventType": "TokenUpdated",
"token": "164EF8478A748",
"shopperReference": "xoj0qfx9S7G7fj7byhVu6Tot6G9vjvvP",
"cardNumber": "41545845****6478",
"cardSummary": "6478",
"cardExpiryDate": "11/2029",
"cardUsage": "Credit",
"paymentMethod": "VI",
}
}
info

HMAC key: 297d288c4ef7e65d317dbb14dcbe16d054976f25328bc387

Headers

In the Authorization header, we will set the matching Api key for your webhook.

Fields

You will always get these fields.

FieldTypeDescription
checkoutReferencenullable stringUnique identifier for the payment that was done through a checkout.
payfacReferencestringThe reference of the payment that triggered the webhook.
merchantReferencenullable stringThe identifier for the payment provided by you, the merchant, allowing for correlation with the merchant’s system.
amountstringThe payment amount in the minor currency unit.
currencystringThe three-letter ISO currency code.
reasonnullable stringA field that provides additional context.
successstringIndicates the action status (true/false).
hmacSignaturestringA cryptographic signature generated using a secret, enabling verification of the message authenticity and ensuring it hasn’t been tampered with.
additionalDataobjectAn object for the additional details included in the event.

Additional Data Fields

Fields you will get depend on the event type of the webhook.

FieldTypeDescription
eventTypestringA string representing the type of event that occurred.
tokenstringThe identifier of the payment token that has been updated.
shopperReferencestringThe shopper reference identifier associated with the updated token.
cardNumberstringA partially masked PAN.
cardSummarystringLast 4 digits of PAN.
cardExpiryDatestringCard expiration date in "MM/yyyy" format.
cardUsagestringThe source of funds used for a authorization.
paymentMethodstringThe payment method used in the authorization.

Card Update Status

The reason field in the webhook indicates what type of update occurred for the token. This helps you understand what changed and how to handle the update in your system.

Action Required

For statuses CloseAccount, ContactCardAccountHolder, and Unknown, the card details were not actually updated. You should take appropriate action such as disabling the token and requesting new payment information from the cardholder.

The following statuses indicate the type of card update:

StatusDescriptionCard UpdatedWebhook Data Received
CardChangedIndicates that a new card number has been issued to replace the previous one. The stored token will now be associated with the updated card number.YesUpdated token with new cardNumber and cardSummary
CardExpiryChangedThe expiration date of the card has been updated while the card number stays unchanged. This commonly occurs when a card is renewed.YesUpdated token with new cardExpiryDate
CloseAccountThe issuing bank has deactivated this card and it cannot be used for transactions. Card information remains in the system but must be manually disabled. Request updated payment details from the customer.NoToken identifier and shopper reference, but card details remain unchanged
ContactCardAccountHolder(Visa only) Updated card information exists but is not accessible through the Account Updater service. Direct communication with the cardholder is necessary to retrieve the new card details.NoToken identifier and shopper reference, but card details remain unchanged
Unknown(Mastercard only) The update status could not be determined. This often occurs when the card information is temporarily unavailable in Mastercard's system and may resolve itself.NoToken identifier and shopper reference, but card details remain unchanged