android sdk
This documentation highlights the requirements for using the paymennt Android SDK. Throughout this document, we aassume that you are using Android Studio for your Android development.
The minimum supported Android API level for the SDK is 16 (KitKat), however, setting the minimum Android API level to 26 (Pie) is recommended.
The SDK uses Google's SafetyNet API for security, setting minimum Android API to lower than 26 will prevent it from functioning.
Setting up the SDK
JitPack Repository
Include the JitPack.io repository to your Android project in your_project_home/build.gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
flatDir {
dirs 'libs'
}
}
}
paymennt SDK Dependency
Include the paymennt Android SDK dependency to your project in your_project_home/app/build.gradle
dependencies {
implementation 'com.github.pointcheckout:android-sdk:v1.3'
}
Required Permissions
The paymennt SDK requires the following permissions. Please add them to your AndroidManifest.xml file if they are not already present:
<uses-permission android:name="android.permission.INTERNET"/>
Adding SafetyNet Support
You must add Google's SafetyNet API to your app/build.gradle. For details on how to add SafetyNet to your project, follow the instructions found in this guide.
SDK Flow
The paymennt Android SDK requires three distinct steps for you to accept card payments:
- Create a new mobile Checkout
- Initiate the PointCheckoutClient from the SDK using the provided checkout key
- Query the API for the payment status
This diagram shows the overall payment and data flow in order to accept payments using the paymennt mobile SDK
