storedPaymentMethodId stays the same.
Requirements
Before you begin, take into account the following requirements, limitations, and preparations.How it works
- Each time a payment request is declined, Adyen sends an account update request in real time.
- When we receive the up-to-date billing information, we immediately retry the payment.
- Optionally, you can receive card updates in the payment responses.
You can use those new details to update your other systems, such as a CRM tool. - In the payment response, you get the account update status.
- Optionally, you can include card updates in the Received Payment Details report.
Receive card updates in payment responses
To enable receiving changed card details in your payment response:- Log in to your Customer Area.
- Go to Developers > Additional data. For a description and an example of additional data items, click on the row of the item.
-
Under Card, select the card details that you want to receive. We recommend selecting at least the following:
- Card bin details
- Card summary
- Expiry date
- Under Payment, select Realtime Account Updater Status.
- Select Save configuration.
additionalData in the payment response.
Changed card details in payment response
Receive updated card numbers
If you are fully PCI compliant, you can receive the full updated card number in the payment response. The card number is provided as a JSON Web Encryption (JWE) encrypted value, that you need to decrypt using your private key. To enable this functionality:- Contact our Support Team.
- Provide them with an RSA public key with a length of 2048 bits. We use this key to encrypt card numbers that are provided in the payments response.
additionalData in the payment response:
-
realtimeAccountUpdaterSecureData: encrypted value representing the updated card number (or PAN). Encrypted changed card number in payment response
Decrypt the card number
TherealtimeAccountUpdaterSecureData value is encrypted using JWE, represented in JWE JSON Compact Serialization format. You need to decrypt this using your private key.
To decrypt the card number:
- Parse the value.
-
Load your private key.
You can identify which key should be used to decrypt the value using the
kid(Key ID) header parameter. -
Decrypt the value using a combination of:
- Your private key.
- Key algorithm: RSA_OAEP_256
- Content encryption algorithm: AES_256_GCM
Get account update statuses
When we perform the real time account update, we return a status,additionalData.realtimeAccountUpdaterStatus, indicating if and how the card details were updated.
The realtime account updater status can be one of the following values:
Get a report on card updates
The Account Updater results report 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. For an overview of card updates on transaction level, you can add the Real Time Account Updater status column to the Received Payment Details report.Testing
To test how different Real Time Account Updater scenarios work for your integration, use the following test card numbers and expiry dates in your payment request. The response will contain the corresponding status in theadditionalData.realtimeAccountUpdaterStatus field.
If you are not fully PCI compliant and thus unable to process raw card data, add a prefix of
test_ to the credentials. For example, use "encryptedCardNumber": "test_5454547699084950". This allows you to test using encrypted card details.
The example below shows how to send a /payments request to test a scenario where the card has changed.
Test card change scenario