Android SDK
Create a customised payment and mandate experience with TrueLayer's Android SDK.
With the TrueLayer SDK for Android, you can quickly add a user interface to your app to initiate an open banking payment, or to create a recurring payment mandate. This page guides you through how to set up and use the TrueLayer SDK in your Android app.
The Android SDK presents native screens that allows your users to select their bank and consent to the payment or mandate. Then, it redirects them to their banking app or website to authorise the payment or mandate. It also handles network requests and errors and gives you some options to customise the user interface.
If there is an issue meaning that the Android SDK isn’t available, it falls back to the HPP in a web view to ensure a payment is always possible.
Compatibility
The SDK is designed to work with Android 7.0 (API level 24) and above. It is currently optimised for the UK, Ireland, France, Germany, Spain, the Netherlands, and Lithuania.
Beta testers can also use the Android SDK for banks in Austria, Belgium, Finland, Poland and Portugal.
The user interface can be displayed in English, Spanish, French, German, Dutch, Portuguese, Polish, Finnish and Lithuanian.
Payment and mandate authorisation journey
When a customer makes a payment or creates a mandate through your Android SDK integration:
- The user chooses to pay with an instant bank payment, or to set up a recurring payment mandate.
- Your backend creates a payment or mandate with TrueLayer and you get an
id
andresource_token
.
If you includesignup_plus
inrelated_products
at payment creation, the authorisation flow changes to reflect this. - Your app uses the
id
andresource_token
and initialises the SDK. - Your user selects and confirms their provider on the provider selection screen. If the bank needs additional information from the user, such as IBAN or branch, then the SDK asks the user to enter these. Additionally:
- If a bank is unavailable it's greyed out on the provider selection screen, so the user can attempt to use a different bank.
- If your user is paying internationally from certain French or Finnish banks, a screen displays that explains how to enable international payments.
- If paying via a European provider that supports it, the user can select to pay with Sepa Instant or Sepa Credit.
- How the user authorises the payment or mandate depends on the authorisation flow the banking provider uses:
- For providers that use a redirect flow, the mobile SDK redirects your user to their bank's website or app. Your user authorises the payment in their bank's website or app.
- For providers that use an embedded flow, the mobile SDK collects the user's credentials and handles strong customer authentication in order to authorise the payment.
- Once the authorisation is complete, the user is redirected to your return URI. You can use our payment result screen to confirm the result to your user.
Mandate authorisation UI differences
When a user is authorising a mandate through the Android SDK, the user interface includes options for them to:
- Learn more about how mandates work and what data is shared.
- The constraints that apply to the mandate, such as its duration, and the payment limits.
Updated 3 months ago
Learn how to authorise a payment or mandate with the Android SDK, or how to customise your integration.