Online-payment icon

Migrate to Android v5.0.0

Find out more about the breaking changes in this release.

If your integration uses Android v4.13.3 and earlier, and you're 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.

In v5.3.0, how you configure Drop-in changes.

For example:

Step 3: Update methods

Remove methods from the v4.13.3 column and replace them with the ones from the v5.0.0 column:

v4.13.3 or earlier v5.0.0
makePaymentsCall onSubmit
makeDetailsCall onAdditionalDetails
onActivityResult Not applicable.

Step 4: Update launching

In v5.3.0, how you launch Drop-in changes.

When you launch Drop-in calling DropIn.startPayment, you must now pass:

Parameter Description
context Your context.
dropInLauncher The Drop-in launcher you declared in your Activity or Fragment.
paymentMethodsApiResponse The /paymentMethods response that you deserialized.
dropInConfiguration The Drop-in configuration that you created.
YourDropInService::class.java (Example) The DropInService that you created.

You can no longer launch Drop-in with a result intent.

For example:

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 don't 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.