Skip to content

Adyen Java API Library v37.0.0

Compare
Choose a tag to compare
@AdyenAutomationBot AdyenAutomationBot released this 06 May 11:42
· 12 commits to main since this release
bd169c6

This release brings significant improvements, new features, and few breaking changes to the Adyen Java 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

  • Improved 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.

🛠 Breaking Changes

🔁 Webhook Events Renamed

Several webhook TypeEnum names have been updated for clarity and consistency.
Note: the actual string value of the enum didn't change.

ConfigurationWebhooks

  • AccountHolderNotificationRequest
    • CREATEDBALANCEPLATFORM_ACCOUNTHOLDER_CREATED
    • UPDATEDBALANCEPLATFORM_ACCOUNTHOLDER_UPDATED
  • BalanceAccountNotificationRequest
    • CREATEDBALANCEPLATFORM_BALANCEACCOUNT_CREATED
    • UPDATEDBALANCEPLATFORM_BALANCEACCOUNT_UPDATED
  • CardOrderNotificationRequest
    • CREATEDBALANCEPLATFORM_CARDORDER_CREATED
    • UPDATEDBALANCEPLATFORM_CARDORDER_UPDATED
  • PaymentNotificationRequest
    • CREATEDBALANCEPLATFORM_PAYMENTINSTRUMENT_CREATED
    • UPDATEDBALANCEPLATFORM_PAYMENTINSTRUMENT_UPDATED
  • SweepConfigurationNotificationRequest
    • CREATEDBALANCEPLATFORM_BALANCEACCOUNTSWEEP_CREATED
    • UPDATEDBALANCEPLATFORM_BALANCEACCOUNTSWEEP_UPDATED
    • DELETEDBALANCEPLATFORM_BALANCEACCOUNTSWEEP_DELETED

TransferWebhooks

  • TransferNotificationRequest
    • CREATEDBALANCEPLATFORM_TRANSFER_CREATED
    • UPDATEDBALANCEPLATFORM_TRANSFER_UPDATED

🔒 Read-Only Attributes

Properties marked as readOnly in the OpenAPI specs no longer expose setters or builder methods. These values must be set using constructors instead.

Note: this change might affect your test code, where the methods might have been used to setup test and mock data.


🔍 Important Changes

📦 Service Class Refactoring

The following services have been moved to their own dedicated packages
Services 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
com.adyen.service.StoredValueApi com.adyen.service.storedvalue.StoredValueApi
com.adyen.service.BinLookupApi com.adyen.service.binlookup.BinLookupApi
com.adyen.service.BalanceControlApi com.adyen.service.balancecontrol.BalanceControlApi
com.adyen.service.DataProtectionApi com.adyen.service.dataprotection.DataProtectionApi
com.adyen.service.DisputesApi com.adyen.service.disputes.DisputesApi
com.adyen.service.PaymentsAppApi com.adyen.service.paymentsapp.PaymentsAppApi
com.adyen.service.PosMobileApi com.adyen.service.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 BankingWebhookHandler class is now deprecated
  • Recommended: Use instead the dedicated handler in the Webhook package (AcsWebhooks, ReportWebhooksHandler, ConfigurationWebhooks, TransferWebhooks, TransactionWebhooks, etc..)

🌐 HTTP Client Configuration

  • Now supports custom connectionRequestTimeout and defaultKeepAliveTimeout.
  • The default timeout is configured to 60 seconds, however we recommend the application to explicitly configure it according to the requirements and expectations.

🏷️ Default Values for Attributes

Fields are initialized using a default value when the OpenAPI specs define the attribute default value. For example:

private TypeEnum type = TypeEnum.BRLOCAL;

💎 New Features & Enhancements

💰 BalancePlatform

  • New: BalancesApi service now supports BalanceWebhookSetting for managing Balance Webhook criteria.
  • Other changes:
    • New BIC enum in BankIdentification
    • New PENDING enum in CreateSweepConfigurationV2 and UpdateSweepConfigurationV2
    • New replacedById and replacementOfId attributes in PaymentInstrument and UpdatePaymentInstrument
    • New walletProviderAccountScore and walletProviderDeviceScore attributes in TransactionRuleRestrictions
    • New class USInstantPayoutAddressRequirement

🛒 Checkout

  • New Donation type field supporting the following values: roundup, fixedAmounts
    (Documentation)
  • Added sub-merchant info:
    • subMerchantPhoneNumber, subMerchantEmail
    • Nested: subMerchant.subSeller[n].email, subMerchant.subSeller[n].phoneNumber
  • Added bonus enum to CheckoutSessionInstallmentOption

🔄 BalancePlatformTransfer API

  • Added IssuingTransactionData with captureCycleId that provides the captureCycleId associated with transfer event

🔄 BalancePlatformTransfer Webhooks

  • Added IssuingTransactionData with captureCycleId that provides the captureCycleId associated with transfer event

  • Other changes:

    • New enum: ChargebackRemainder in PlatformPayment.platformPaymentType
    • New attribute: externalReason in TransferData
    • New pending enum in TransferData.reason

📬 New Balance Webhook

  • A new Balance webhook is now available to process events related to balance changes.
  • Use: BalancePlatformBalanceWebhooksHandler to consume the Webhook event balancePlatform.balanceAccount.balance.updated
    Documentation

🧩 Other Changes

  • Enhanced Javadoc coverage across the codebase.
  • Introduced a new HMAC troubleshooting utility for signature validation debugging (#1452). The tool calculates the HMAC signature given the HMAC key and the payaload:
cd tools/hmac
mvn clean compile exec:java -Dexec.mainClass=CalculateHmacPayments -Dexec.args="11223344D785FBAE710E7F943F307971BB61B21281C98C9129B3D4018A57B2EB payload.json"

Check the README


Changes in this release:

Full Changelog: v36.0.1...v37.0.0