Skip to content
Zohaib edited this page Feb 9, 2023 · 3 revisions

This page describes the ExpressPay Android SDK Setup guide.

1. Info Setup

You should get the following information from the administrator to begin working with the Payment Platform.

Info Description
CLIENT_KEY Unique key to identifying the account in Payment Platform (used as request parameter)
CLIENT_PASS Password for Client authentication in Payment Platform (used for calculating hash parameter)
PAYMENT_URL URL to request the Payment Platform

Where to get this information? Follow the introduction guide.

2. Android Setup

The ExpressPay Android SDK supports two initialization methods: explicit and implicit.

Implicit

  1. In AndroidManifest.xml provide the meta-data with following credentials:
<meta-data
    android:name="com.expresspay.sdk.CLIENT_KEY"
    android:value="merchant-client-key" />
<meta-data
    android:name="com.expresspay.sdk.CLIENT_PASS"
    android:value="merchant-client-pass" />
<meta-data
    android:name="com.expresspay.sdk.PAYMENT_URL"
    android:value="merchant-payment-url" />

The ExpressPay Android SDK credentials are the mirror of the Payment Platform fields. See above.

  1. Call the SDK initialization in the Application:
override fun onCreate() {
    super.onCreate()
    ExpressPaySdk.init(this)
}

Explicit

  1. Call the SDK initialization in the Application:
override fun onCreate() {
    super.onCreate()
    ExpressPaySdk.init(
        this,
        "merchant-client-key",
        "merchant-client-pass",
        "merchant-payment-url",
    )
}

One more thing

  1. ExpressPay Android SDK requires the Internet permission:
<uses-permission android:name="android.permission.INTERNET" />
  1. In case the SDK is not initialized the ExpressPaySdkIsNotInitializedException will be thrown.

  2. To use the testing environment, please use test cards.

ExpressPay

The ExpressPay Android SDK - https://expresspay.sa

Clone this wiki locally