Adyen Node API Library v28.0.0
What's Changed
This release brings significant improvements, new features, and few breaking changes to the Adyen Node API Library. It marks a major milestone in aligning the library more closely with Adyen’s OpenAPI specifications and improving the ✨ Developer Experience ✨
Find below what's new as well as a detailed summary of the Breaking Changes, and what you should do or consider.
Please review the Breaking Changes and update your integrations accordingly. For any questions, feel free to open an issue or consult our API Explorer.
🚀 Highlights
- Enhanced OpenAPI Code Generation: Source code is now more idiomatic, flexible, and better aligned with Adyen's OpenAPI specifications.
- Automated Webhook Handler Generation: Webhook handlers and models are now automatically generated and updated with each release.
- Refined Package Structure: Several APIs have been moved to more specific packages for better discoverability and maintainability.
- Improved Error Handling: Make the API Error object available, alongside the raw JSON
- Revised Enum Values Deserialization: During the response deserialization unknown enums are ignored, instead of causing an error affecting the integrations
🛠 Breaking Changes
🔒 Honouring required attributes
Mandatory attributes are no longer marked as optional, but are expected to be provided. Although this is the correct implementation, it is a
🔁 Order of query parameters
A few method signatures have been updated to add the required query parameters before all optional parameters, to avoid causing an error (invalid order of parameters) #1515
This change affects only:
- Transfers API
getAllTransactions: the required paramscreatedSinceancreatedUntilare the first 2 parameters, before all others. - Transfers API
getAllTransfers: the required paramscreatedSinceancreatedUntilare the first 2 parameters, before all others.
🔍 Important Changes
📦 Service Class Refactoring
The following services have been moved to their own folder.
Service classes in the old location are deprecated and will be removed in a future release.
Note: There are no changes in functionality (the same code is now available in the new location), please update your code accordingly.
| Old Location | New Location |
|---|---|
services.storedValueApi |
services.storedvalue.storedValueApi |
services.binLookupApi |
services.binlookup.binLookupApi |
services.balanceControlApi |
services.balancecontrol.balanceControlApi |
services.dataProtectionApi |
services.dataprotection.dataProtectionApi |
services.disputesApi |
services.disputes.disputesApi |
services.paymentsAppApi |
services.paymentsapp.paymentsAppApi |
services.posMobileApi |
services.posmobile.posMobileApi |
🪝 Webhook Handling
Webhook handling is now modernized and streamlined:
- Automation: Auto-generated handlers ensure that webhook events and models stay aligned with the changes in the OpenAPI specs
- Deprecated: Former
bankingWebhookHandlerandmanagementWebhooksHandlerclasses are now deprecated - Recommended: Use instead the dedicated handler in the Webhook package (
AcsWebhooks,ReportWebhooksHandler,ConfigurationWebhooks,TransferWebhooks,TransactionWebhooks, etc..)
const configurationWebhooksHandler = new ConfigurationWebhooksHandler(jsonString);
const accountHolderNotificationRequest = configurationWebhooksHandler.getAccountHolderNotificationRequest();
⚠️ Deprecation of TerminalManagementAPI
Support for the "classic" POS Terminal Management API has stopped. To automate assigning terminals, you must use Management API.
☘️ Improved Error Handling
The APIError model is readily available in the HttpClientException object when an API call fails. This eliminates the need for manual parsing of the response body by library users. #1509
The library exports the HttpClientException class, allowing to try-catch the Adyen API exceptions without importing directly from the specific path within the library. #1526
💎 New Features & Enhancements
Session Authentication API
Add support for Session Authentication API to create the sessions required for integrating Adyen Platform components (#1435)
BalancePlatform
-
New:
BalancesApiservice now supportsBalanceWebhookSettingfor managing Balance Webhook criteria. -
New:
BalancesApiservice now supportsAuthorizedCardUsersApito manage (add, get, delete and update) authorized users to a given card -
Other changes:
-
In
AdditionalBankIdentificationadd new enumsauBsbCodeandcaRoutingNumber -
In
AccountHoldersApi.getTaxFormResponseadd optional parameterlegalEntityId -
Add
NetworkTokenRequestortoNetworkToken -
Add
dataMissingenum toVerificationError -
Add
walletProviderDeviceTypeinTransactionRuleRestrictions -
Add enum
INTERESTinTransferRoute.CategoryEnum
ACS Webhooks
- In
RelayedAuthenticationRequestadd new attributesthreeDSRequestorAppURL,environment,timestamp,type
Checkout
- Add
capturePspReferencetoPaymentRefundRequest - Add
businessDayOnlytoPixRecurring - In
PaymentMethodRequestadd attributesbrowserInfo,shopperEmail,shopperIPandtelephoneNumber - In
SessionResultResponseadd attributes:paymentsto provide a list of all authorised payments done for this sessionreferenceto provide the unique reference in the original/sessionsrequestadditionalDatato provide additional information about the payment
Configuration Webhooks
- Add
NetworkTokenRequestortoNetworkTokenNotificationDataV2 - Add
Walletclass to provide information about the wallet for which the network token is provisioned.
Transfers API
- New attribute:
executionDateinTransferData - Add class
BankAccountV3AccountIdentification
Transfers Webhooks
- New attribute:
executionDateinTransferData - Add class
BankAccountV3AccountIdentification
Webhooks
- In
NotificationRequestItemadd missing event codesINFORMATION_SUPPLIED,DISPUTE_DEFENSE_PERIOD_ENDED,ISSUER_RESPONSE_TIMEFRAME_EXPIRED,ISSUER_COMMENTS#1506
Changes in this release:
- OpenAPI Generator v7: Webhooks by @gcatanese in #1512
- WIP Typescript OpenAPI Generator v7 by @gcatanese in #1505
- ApiError: Improving error handling by @gcatanese in #1509
- OpenAPI v7 Generation: Classic Payments, BalanceControl, Disputes, StoredValue by @gcatanese in #1510
- Make non-native attributes nullable by @gcatanese in #1520
- Fix: Set ApplicationName correctly when client is instantiated by @Kwok-he-Chu in #1503
- Checkout: mark mandatory query parameters by @gcatanese in #1502
- HMAC Troubleshooting: script to calculate KCV by @gcatanese in #1508
- Terminal API new Event Types by @gcatanese in #1507
- OpenAPI Generator v7: generate LEM/Configuration/Transfers APIs by @gcatanese in #1511
- Optional query params and code format by @gcatanese in #1513
- Format code (adding method overloading) by @gcatanese in #1514
- Transfers API: method signature with required query parameters by @gcatanese in #1515
- OpenGenerator v7: Generate Management API by @gcatanese in #1516
- Code format cleanup by @gcatanese in #1517
- Add unit tests for parsing unexpected fields/enums by @gcatanese in #1518
- Add test to verify request payload by @gcatanese in #1522
- Code generation: update services and models by @AdyenAutomationBot in #1523
- Sonar handle exceptions by @gcatanese in #1524
- Tests serialization additional data by @gcatanese in #1525
- Release v28.0.0 by @AdyenAutomationBot in #1504
New Contributors
- @Kwok-he-Chu made their first contribution in #1503
Full Changelog: v27.0.0...v28.0.0