Checkout icon

Migrate to Adyen Android v5

Find out more about the breaking changes in this release.

If your integration uses Android v4.13.3 and earlier, and you are upgrading it to use v5.0.0, make the following changes to your integration.

Checkout API version

We recommend using Checkout API v70.

Step 1: Update versions of build configuration and dependencies

Build configuration: compileSdkVersion and targetSdkVersion: 34.
Dependencies:

Name Version
Adyen 3DS2 2.2.15
Android Gradle plugin 8.1.1
Appcompat 1.6.1
AndroidX Browser 1.6.0
AndroidX Compose Bill of Materials (BOM) 2023.09.00
AndroidX Compose compiler 1.5.3
AndroidX Fragment 1.6.1
AndroidX Lifecycle 2.5.1
AndroidX Recyclerview 1.3.1
AndroidX Constraintlayout 2.1.4
Cash App Pay 2.3.0
Google Pay 19.2.1
Kotlin coroutines 1.6.4
Kotlin Gradle plugin 1.9.10
Material Design 1.9.0
WeChat Pay 6.8.0

Step 2: Update the configuration object

In your configuration object, you now must set the following properties:

Property Required Description
amount If you want to show the amount on the Pay button. The currency and value of the payment amount shown on the Pay button.
shopperLocale -white_check_mark- The shopper's locale. To use the device's default locale, replace this with your context.
environment -white_check_mark- Use Environment.TEST for testing. When going live, use one of our live environments.
clientKey -white_check_mark- Your client key.

Step 3: Update methods

Step 4: Update launching

Step 5: Fix broken imports

Some classes are moved in this version. For most classes, the names haven't changed and you only have to re-import them. When importing the classes marked with a name change in the release notes, you must update import statements.

Public classes and functions that should not be directly used are marked as internal in this version. If you get a Restricted API lint error on a class or function, this means it is internal and must not be used.
If you believe the error you received is incorrect, report it by opening an issue on our GitHub repo.

Step 6 (optional): Update your action handling implementation

For Components integrations:

In this version, the payment method Components can handle the required actions. For example the card Component can handle the redirect and threeDS2 actions. You do not need to implement the RedirectComponent or the Adyen3DS2Component to handle redirects or 3D Secure authentication for cards.

If you want to handle actions on a different page than the checkout one, you can use the GenericActionComponent instead.