Getting Started
The Merchant Embed PayContactless SDK enables seamless contactless payment and refund operations from your React Native application. The SDK handles payment transaction UI internally, provides querying of transaction history, daily summaries, and lot more.
Integrators must initialize the SDK early in the app lifecycle to ensure proper transaction handling.
Prerequisites
Before integrating this SDK, ensure you have:
API Key, Organization ID, Google Cloud ID learn more on SDK Initialization section to understand how to get this parameters.
Merchant ID, Terminal ID, Phone Number, Business Name
React Native dependencies installed in your project, preferably;
"react": "19.2.0" or updward,
"react-native": "0.83.1" or upwardTo download the PayContactless embedded SDK, you will be provided with secure credentials (username and password).
Follow the steps below to configure your project and fetch the SDK dependency.
Supported Android SDKs
Minimum Android SDK: 30
Kotlin minimum version: 1.9
Minimum Android NDK version: 26.+
Add the required permissions in android directory AndroidManifest.xml:
No custom activities are required. The SDK handles UI internally.
Add the Maven repository block to your android directory:
settings.gradle
We recommend keeping the credential in your gradle.properties file, and avoid committing this file to your repo.
You can ignore this in git by adding it to .gitignore
We recommend using the following version of ndkd kotlin.
Add this to your project level buildscript block, and your reference in your app level android block, accordingly.
Add the SDK dependency in your module level build.gradle file of the project like below.
SDK does not allow to run the app on debug. The application must be release build.
Check Security Mechanisms section for the other restriction.
This version of the SDK must be used in integration phase by developer. For the internal and external tests, the version of SDK must never be used.
Required Dependencies
SDK needs some third party libraries and the integrator app must have these dependencies. The libraries which is shared below should be added to the build.gradle file.
In order to support schemas' branding animations, jetifier tools must be enabled on your project. The following configuration must be added on your gradle.properties file.
Using the Merchant PayContactless Embed SDK Library
SDK Initialization
In your Application class onCreate() method, initialize the SDK:
Must be called before performing any transactions
Ensures the SDK is ready for
doSale,payWithLink,payWithAccountand other major payment flows
Required Parameters:
Context: Application context
Organization Id: Predefined organization identenfier
Google Clould Project Number: Project Number of your project on Google Cloud
PayContactless Embed SDK uses Play Integrity API for Automatic integrity protection. You need to enable Integrity API on your project and share required credentioans to the PayContactless team. Please check Play Integrity Configuration section.
Remember to pass the these parameters as arguments when invoking the start method.
By adhering to these steps, you'll ensure the proper and utilization of the PayContactless Embed SDK library functions.
The SDK needs the activity result to parse the Payment activity reponse. The onAcitivtyResult method of the SDK must be called in MainActivity onActivityResult method.
A sample usage is highlighted below;
Creating a React Native Bridge
Create a module class PayContactlessSDKModule in the android directory extending ReactContextBaseJavaModule and expose all public APIs using @ReactMethod.
All methods return Promises and JSON responses (where applicable). Some methods like doSale or payWithLink require currencyCode, e.g 566 is Naira Code.
A simple usage is highlighted below;
Please note that SDK Initialization API is different from the start method, and it has be called before every other public APIs.
Below are the other available public APIs within our SDK.
refundInquiry
doFullRefund
doPartialRefund
getTransactionHistory
getTransactionDetail
sendReceipt
getDailySummary
sendDailySummary
doPreAuth
preAuthInquiry
doPostAuth
Last updated

