Importing Native Module in JS

You may now create PayContactlessSDKPackage to register the module.


class PayContactlessSDKPackage : ReactPackage {
    override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
        return listOf(PayContactlessSDKModule(reactContext))
    }
    override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
        return emptyList()
    }
}

Registering the Bridge Package

Add the PayContactlessSDKPackage in your MainApplication.java:

@Override
protected List getPackages() {
return Arrays.asList(
new MainReactPackage(),
new PayContactlessSDKPackage()
);
}

Importing the Native Module in JS

Merchant PayContactless SDK Request & Response Classes

Class / Interface
Type
Properties
Description
Used In

MerchantInfo

Request

merchantId: string terminalId: string phoneNumber: string businessName: string merchantCategoryCode?: string | null city?: string | null state?: string | null country?: string | null firstName?: string | null lastname?: string | null email?: string | null taxIdentificationNumber?: string | null

Merchant details required to initialize the SDK

initialize(apiKey, merchantInfo)

TransactionResult

Response

paymentType?: string status: string payWithCardResult?: Transaction error?: any

Result of a payment or refund operation

doSale, doPreAuth, refunds

Transaction

Response

type: string amount: string code: string date: string time: string respCode: string respDesc: string rrn: string authCode: string stan: string cardNumber: string cardType: string cardBrand: string aid: string isPinUsed: boolean rfuList: Record<string, any>

Detailed card transaction information

TransactionResult.payWithCardResult

TransactionList

Response

transactions: Array empty?: boolean first?: boolean last?: boolean number?: number numberOfElements?: number size?: number totalElements?: number totalPages?: number

Paginated list of transactions

getTransactionHistory

TransactionInfo

Response

id: number transactionCode: string cardNumber: string amount: number currency: string dateTime: string status: string modeOfTransaction: string

Transaction summary information

TransactionList.transactions

TransactionDetail

Response

id?: number status?: string transactionAmount?: string currency?: string cardNumber?: string transactionType?: string modeOfTransaction?: string transactionDescription?: string responseDetail?: string transactionCode?: string transactionDateTime?: string terminalId?: string merchantCode?: string rrn?: string stan?: string authCode?: string

Detailed transaction information

getTransactionDetail

TransactionListQuery

Request

page: number size: number direction?: ASC | DESC transactionCode?: string startDate?: string endDate?: string startAmount?: string endAmount?: string

Query parameters for transaction history

getTransactionHistory

circle-info

Transaction Amount

  • Should be a whole number, with its length capped at 12 digits.

  • Exclude any separators or currency symbols.

  • Examples:

    • A payment amount of $100 should be conveyed as 10000, where the trailing two digits represent cents.

    • Conversely, $1.01 is represented as 101.

    Currency Code

    • Description: The currecy value of the transaction. It has be numeric code of ISO 4217 format.

    • Examples:

      • 566 for Naira instead of NGN

circle-info

Network Security Configuration (Optional)

For development and testing purposes, integrators may optionally configure a network-security-config to allow cleartext traffic and network inspection tools.

Create and add the lines below to application tag in the Android manifest file.

This configuration is NOT required for production and must be restricted to debug builds only.

Allowing cleartext traffic or user-installed certificates in production environments may violate security and PCI compliance requirements.

Usage Example

Last updated