Skip to main content
With our Card reader on Android solution you can accept mobile in-person payments using a card reader as the payment interface, and process these payments on the Adyen payments platform. The card reader is connected with an Android mobile device through Bluetooth, or through USB using a dock. On the Android mobile device, payment requests are initiated from a POS app. On the card reader, the customer can tap, insert, or swipe their card, or use a digital wallet like Apple Pay.

Requirements

Before you begin, take into account the following requirements, limitations, and preparations.

How it works

Sample app
Hit the ground running with our Android sample app.
To build a Tap to Pay on Android solution:
  1. Add the Mobile SDK for Android to your project, either using an API key.
  2. Implement a server-to-server API request to establish a secure communication session.
  3. In your POS app, enable the transaction functionality of the SDK.
  4. From your POS app, call the warmup function to speed up initiating transactions.
  5. In your POS app, implement handling payments using the SDK.
    This creates the following flow:
    1. Your Android POS app creates a Terminal API payment request, or receives a Terminal API payment request from your backend.
    2. The POS app passes the payment request to the Android Mobile SDK.
    3. The SDK initiates the transaction on the card reader.
      To complete the payment, the customer taps the card reader with their payment card or phone (or other device) that has a digital wallet like Apple Pay.
    4. The SDK passes the Terminal API payment response to the POS app.
  6. In your POS app, implement handling refunds using the SDK.
  7. If the same device will be used at multiple locations, implement clearing the communication session.

1. Add the SDK to your project

You can add the Mobile SDK for Android to your POS app through a private Adyen repository. To get access, you need to have an Adyen API key that is used only for the purpose of getting the SDK. Our SDK only runs on Android 12 or later. You can still target earlier Android versions, but our SDK will not initialize. To add the Mobile SDK to your project, you need to create an API credential with an API key that only has the Allow SDK download for POS developers role. This API key is only meant to be used to get access to the SDK repository. To make a sessions request, you need a different API key. You can share this API key with anybody in your team who needs to get the SDK, or you can create multiple API keys for internal use. To add the SDK to your project:
  1. In your Customer Area create an API credential with an API key:
    1. Go to Developers > API credentials, and select Create new credential.
    2. Under Payments > Credential type select Web service user and then select Create credential.
    3. Under Server settings > Authentication select the API key tab and then select Generate API key.
    4. Select the copy icon **and save your API key in a secure location.
    5. Go to Permissions > Roles > POS, select Allow SDK download for POS developers, and deselect any other permissions and roles. Contact Support Team if you don’t see the Allow SDK download for POS developers role.
    6. Select Save changes.
  2. In the repositories block of your project, usually defined in your settings.gradle file, add the URL to the remote repository where the SDK is stored, and add the API key that you created in the previous step.
  3. In your project’s build.gradle file, add the package dependencies.
    • To find the latest val version check the release notes for the Mobile SDK for Android.
    • For the build type, note that -debug can only access the test environment, and -release can only access the live environment.
    • In case of other custom build variants, use <buildVariantName>Implementation 'com.adyen.ipp:pos-mobile-<type>:$version' where <type> can be release for production builds, or debug for debug or development builds.

2. Establish a session

To ensure the Mobile SDK and the Adyen payments platform can collaborate in a secure way, you need to implement a server-to-server API request for establishing a communication session. Authentication flow To authenticate this API request, you need to have an Adyen API credential in your test Customer Area. This credential must have an API key with the following role:
  • Checkout webservice role. This role is assigned by default when the API key is created.
The credential also needs to have a client key. **

Create a client key

If you want to use an existing API credential that does not have a client key yet, create a client key as follows:
  1. Log in to your Customer Area.
  2. Go to Developers > API credentials, and select the credential username for your integration, for example ws@Company.****[YourCompanyAccount].
  3. Under Client settings > Authentication select the Client key tab.
  4. Select Generate client key.
  5. Select Save changes. The client key is part of the setup but is not used later on. Therefore, you do not need to specify allowed origins, and you do not need to save the client key in your system.

Implement the request

To establish a communication session:
  1. From your backend, make a POST request to the applicable test or regional /auth/certificate endpoint, specifying: The subMerchantData object includes the following parameters:
If you are not a registered payment facilitator, the /auth/certificate request to establish a communication session must include the store parameter, unless your account structure does not have stores and instead uses merchant accounts as stores.If previously you have used /checkout/possdk/v68/session test and live endpoints, we recommend you migrate to new endpoints./auth/certificate request with store to process payments for