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 upward
circle-info

To 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

circle-exclamation

circle-info

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.

circle-info

SDK does not allow to run the app on debug. The application must be release build.

Check Security Mechanisms section for the other restriction.

Security Mechanismschevron-right
triangle-exclamation

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.

circle-exclamation

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,payWithAccount and 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

circle-exclamation
Play Integrity Configurationchevron-right

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;

circle-info

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