Last Updated: 22 January 2024 | Change Log

Android SDK

Set your views to take your customer's card details in your Android application.

Getting the SDK

To get our SDK, include the Gradle, Maven or Local AAR library configuration below.

  1. Gradle
  2. Maven
  3. Local AAR
implementation 'com.worldpay.access:access-checkout-android:1.2.0'

Local AAR library

If you're using the Local AAR library to get the SDK, copy the library file into your app/libs folder. Then add the flatDir repo to the project level build.gradle using the code in the Local AAR library example above.

You must also add the example below to your app level dependency list:

implementation (name:'access-checkout-android', ext:'aar')
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.31"

And here's a link to our Access Checkout Android SDK GitHub Repo

Set your views

When you create your checkout form, you must set the views that your customers use to enter their card details. You must use unique identifiers for your view configurations.

Here's an example of how you would set your view configurations.


Import the SDK

After getting the SDK and setting your views, you must import the SDK into your project. Importing the SDK gives you access to all the classes, methods and functions you need to get a sessionState.

Here's an example of how you would import our SDK into your project.

  1. Kotlin
  2. Java
import com.worldpay.access.checkout.AccessCheckoutClient

Reference your views

Once you've imported the SDK, you must reference your view configurations. You must use the unique view identifiers used when setting your view configurations.

Here's an example of how you would reference your view configurations.

  1. Kotlin
  2. Java
val panView = findViewById<EditText>(
val cardCVCText = findViewById<EditText>(
val cardExpiryText = findViewById<EditText>(
val submit = findViewById<Button>(

Next steps

Create sessionState