---
updatedAt: 2026-02-26T13:11:24.000Z
agentTools:
  projectIndex: https://docs.ksa.ngenius-payments.com/llms.txt
---

# Android SDK

This guide helps developers create next-generation mobile experiences.

## Android SDK Overview

Welcome to the **Android SDK Developer Guide** for integrating payments via **Network International**. This SDK allows you to accept payments in your Android app using a prebuilt checkout flow and secure APIs.

You can find the SDK and sample app on GitHub:\
👉 [Android Payment SDK on GitHub](https://github.com/network-international/payment-sdk-android)

***

## Requirements

### Supported Android Version

* **Minimum API level**: 19 (Android 4.4, KitKat)
* See full compatibility guidelines in the [Android SDK docs](https://developer.android.com/guide/topics/manifest/uses-sdk-element#min).

### Development Environment

* Language: **Kotlin** (version 1.3+ with Coroutine support)
* IDE: **Android Studio**
* Compatible with **Java-based** Android projects

The SDK leverages Kotlin Coroutines for background and I/O operations to avoid conflicts with third-party dependencies and simplify integration.

***

## Language and Currency Support

* **Languages**: English and Arabic
* **Currencies**: Supports **AED** (Emirati Dirham) by default. Other valid currencies are also supported—refer to the Payment Gateway for details.

***

## Getting Started

To explore the SDK in action or begin integration, use the provided **Furniture Store** sample app or import the SDK modules directly into your own project.

### Included Modules

#### `app` module

* Contains the **sample merchant app**
* Depends on:

  * `payment-sdk`
  * `payment-sdk-core`
  * Popular Android libraries: **RxJava**, **Retrofit**, **OkHttp**, **Glide**

#### `payment-sdk` module

* Implements the **Pay Page** for card-based payments
* Collects card details, handles 3D Secure (if required), and submits requests to the Payment Gateway
* Returns the result (success/failure) via an `Intent` bundle

#### `payment-sdk-core` module

* Provides **shared interfaces and classes** used by other SDK modules

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/e4c26fd59868765db15656d60c4e8eaac1484995061e63aa654be21d687f4dc4-app-modules.png",
        "",
        "The screenshot shows the Android SDK's app modules. "
      ],
      "align": "center",
      "caption": "Android SDK App Modules"
    }
  ]
}
[/block]

## Download the SDK and Sample App

To get started, clone the SDK and sample project from GitHub:

```coffeescript Bash
git clone https://github.com/network-international/payment-sdk-android.git
```

Alternatively, you can [download the ZIP](https://github.com/network-international/payment-sdk-android/archive/refs/heads/master.zip) if you prefer not to use Git.

After downloading:

1. Open the project in **Android Studio**.
2. Allow Gradle to sync and download dependencies.
3. Run the **Furniture Store** sample app on your emulator or physical device.

> 📘 Make sure your device or emulator is running at least **Android 4.4 (API19)**.

## Run the Sample App and Merchant Server

To explore how the SDK works in a real-world scenario, you can use the provided **[Sample App](https://github.com/network-international/payment-sdk-android)** and **<<glossary:Sample Merchant Server>>**. Follow the steps below to get everything up and running in your local environment.

> 📘 The sample merchant servers are available in two versions: **PHP** and **JavaScript(Node.JS)**.

### Step 1: Import the Sample Merchant App

1. Open **Android Studio**.

[block:image]{"images":[{"image":["https://files.readme.io/24aa0bae1115a17f4162299be4f4415c8c5d0e0d02cbd8f485c57e131a40d5fd-open-project-android-studio.png","","The screenshot shows the Android Studio welcome screen where you can navigate to and open an existing project."],"align":"center","caption":"Open Project - Android Studio"}]}[/block]

2. Select **"Open an existing project"** from the welcome screen.
3. Browse to the folder where you cloned the SDK (`payment-sdk-android`).
4. Select the root directory and click **Open**.
5. Allow Gradle to sync and download any missing dependencies.
6. Once the project loads, you’re ready to run the app in an emulator or on a real device.

***

### Step 2: Run the Sample Merchant Server

A sample **Node.js-based merchant server** is included to simulate a backend environment. It handles communication with the Payment Gateway and serves mock payment data.

#### Prerequisites

* **Node.js** must be installed on your system.\
  Download and [install Node.js](https://nodejs.org/)

***

#### 🔧 Configuration

1. Install the `dotenv` package
   ```Text bash
   npm install dotenv
   ```
2. Open the app.js file
3. Add the following line to the file:
   ```Text Node.js
   require('dotenv').config();
   ```
4. Add your **merchant credentials** and **Payment Gateway endpoint** in a `.env` file.
5. The N-Genius portal provides these values.\
   *[Click here](https://docs.ngenius-payments.com/reference/creating-orders) to learn more* .

Example `.env` file:

```text .env
API_KEY=your_api_key_here
IDENTITY_API_URL=https://your.identity.api.url
GATEWAY_API_URL=https://your.gateway.api.url
PORT=3000
REALM=your_realm_here
```

***

#### Start the Server

Open a terminal in the project directory and run:

```bash
node app.js

```

Once the server is running, test it by opening:

```
http://localhost:3000/health

```

If the server does not load, check the terminal logs for errors.

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/dea91d2f716ae4dd51486f4de58e7e8a35d602f288540cd8acb634dec0b2bb4f-image.png",
        null,
        "The screenshot shows the app working status, after the local server is running."
      ],
      "align": "center",
      "caption": "App Working"
    }
  ]
}
[/block]

***

### Step 3: Connect the App to the Server

1. Open the `build.gradle (Module: app)` file.
2. Set the `buildConfigField`address of the merchant server.

> Here's an example if you are running the server locally:

```kotlin
      debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            buildConfigField "String", "BASE_URL", "\"http://10.0.2.2:3000/\""
        }

        release {
            minifyEnabled true
            shrinkResources true
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            buildConfigField "String", "BASE_URL", "\"http://10.0.2.2:3000/\""
        }
```

> For **physical devices**, ensure both the device and your development machine are connected to the **same Wi-Fi network**.

***

### Step 4: Run the Sample App

Click the **Run (Play)** button in Android Studio to launch the app.

When the **sample app** opens, you’ll see an interface with the option to make a payment.

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/a7b87e18e413ef7ba42ccb6cd18291a02c0f19df1e2101036e5e86aa5bd8ea10-demo-store-portrait.png",
        "",
        "The screenshot displays an overview of the Demo Store with clickable buttons and a pay for order option. "
      ],
      "align": "center",
      "sizing": "300px",
      "caption": "Demo Store"
    }
  ]
}
[/block]

**Before** testing payments, we need to add some settings.

1. First, tap the gear icon in the app's top right corner.

2. Next, tap the "+" next to "Merchant Attributes," add a key-value pair, and tap "Add."

[block:image]{"images":[{"image":["https://files.readme.io/207f223c55650f71ff108df9fcb200cb770659bb1c883d548bfdf5add311ebda-merchant-attributes-portrait.png","","The screenshots sho the steps required to take to configure the merchant attributes from within the demo app."],"align":"center","sizing":"300px","caption":"Merchant Attributes"}]}[/block]

3. Then, tap the "+" next to "Environments."

4. Enter a Name, your API key, outlet reference, and realm (found in the portal), and tap "Add."

[block:image]{"images":[{"image":["https://files.readme.io/439df73dd11824e41a04fbcb946bbb03078c919c19c2821aebde7a7fa65538a9-demo-app-environments-portrait.png","","The screenshot demonstrates the steps needed to take to configure the environments from within the demo app"],"align":"center","sizing":"300px","caption":"Add Environment"}]}[/block]

5. Tap the back button to return to the home screen.

For more details, [click here.](https://docs.ngenius-payments.com/reference/creating-orders)

### Step 4: Use the app to make a payment

To test payments, use the app to select any item(s) from the Home screen. Tap "Pay" to proceed.  [Get a test card here](https://docs.ngenius-payments.com/reference/sandbox-test-environment#emv-3ds-20-test-cards--web).

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/ebb7fc8d418a22b6203423ffef09f09d68ebe23a57fb572ddc663afbc70ab108-select-items-to-add-to-cart-portrait.png",
        "",
        "Select items from the demo app home screen and click the Pay button"
      ],
      "align": "center",
      "sizing": "300px",
      "caption": "Select Items to Pay"
    }
  ]
}
[/block]

Enter the card details (any name, expiry, CVV) on the payment screen and tap "Make Payment".

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/134eb7dcfee407b6ae67b1073c1b39ae4ca2782a27114da27a12ede20e906c9d-make-payment-card-details-portrait.png",
        "",
        "Provide the test card details on the card details screne. Grab a card from the test cards section, and use any name, expiry date, and CVV."
      ],
      "align": "center",
      "sizing": "300px",
      "caption": "Enter Card Details"
    }
  ]
}
[/block]

The app will authorize via 3DS, displaying a "Payment Success" message. Congratulations!

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/9ff30227bc0f97716c5319efc8f6c1be14f4127748027e1bcf78e9fa0b679116-payment-success-portrait.png",
        "",
        "The payment success screen displays, showing the payment was a success. Congratulations. "
      ],
      "align": "center",
      "sizing": "300px",
      "caption": "Successful Payment. "
    }
  ]
}
[/block]

***

## SDK Payment Flow

When you tap **PAY WITH CARD** in the sample app:

1. The app requests a payment session from the **sample merchant server**.
2. It then hands off control to the **Payment SDK**, which:

   * Displays a secure card entry form
   * Handles 3D Secure authentication (if required)
   * Returns a success or failure response to the app

## Payment API Reference

Use the Payment SDK to easily integrate secure card payments into your Android app. This section outlines how to configure the SDK, initiate card payments, and handle results from the Payment Gateway.

***

### SDK Modules

The SDK is modular—import only the components you need to keep your app lightweight and efficient.

#### Required Modules

At minimum, import the following Gradle modules:

```gradle
payment-sdk
payment-sdk-core
```

#### Optional Modules

Other modules support specific payment methods. Only import those relevant to your integration to reduce your APK size and build time.

***

### PaymentClient

The `PaymentClient` class is your main entry point to initiate and manage payment flows from within your app.

#### 🔧 Initialization

You must instantiate `PaymentClient` using an `Activity` (not just a `Context`), since payment results are returned via `onActivityResult()`.

```kotlin
class PaymentClient(private val context: Activity)
```

For usage examples, refer to the sample Furniture Store Android App.

***

### Amount Representation

Amounts in the SDK are represented using `BigDecimal`.

Each currency has a specific **exponent** (e.g. 2 for AED, meaning values are in hundredths):

| Currency | Exponent | Format        |
| :------- | :------- | :------------ |
| AED      | 2        | `major.minor` |
| AED 0.00 | →        | `0.00`        |

***

## Card Payments

This section walks through how to initiate and handle card payments using the SDK.

***

### Payment Flow

1. **Merchant App** requests a payment session from your merchant server.
2. **Merchant Server** returns payment session details.
3. **App** calls `launchCardPayment()` with the required parameters.
4. **SDK** presents a card input form to the user and handles 3D Secure if necessary.
5. **Payment Gateway** processes the payment and returns a result.
6. **SDK** returns the result to the merchant app via `onActivityResult()`.

***

### Launch a Card Payment

Use the following method to launch a card payment:

```kotlin
paymentClient.launchCardPayment(
    request: CardPaymentRequest,
    requestCode: Int
)
```

This internally launches an activity to collect card details and manage the 3D Secure flow. When the payment is complete, `onActivityResult()` is triggered in your calling activity.

***

### Handle the Result

Example of handling the card payment result:

```kotlin
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
    super.onActivityResult(requestCode, resultCode, data)
    
    if (requestCode == CARD_PAYMENT_REQUEST_CODE) {
        when (resultCode) {
            Activity.RESULT_OK -> onCardPaymentResponse(
                CardPaymentData.getFromIntent(data!!)
            )
            Activity.RESULT_CANCELED -> onCardPaymentCancelled()
        }
    }
}
```

> 📘 If the user cancels the payment (e.g. presses Back), `RESULT_CANCELED` is returned

### Result Codes

Once the SDK returns control, you can evaluate the outcome using `CardPaymentData`:

```kotlin
override fun onCardPaymentResponse(data: CardPaymentData) {
    when (data.code) {
        CardPaymentData.STATUS_PAYMENT_AUTHORIZED,
        CardPaymentData.STATUS_PAYMENT_CAPTURED -> {
            view.showOrderSuccessful()
        }
        CardPaymentData.STATUS_PAYMENT_FAILED -> {
            view.showError("Payment failed")
        }
        CardPaymentData.STATUS_GENERIC_ERROR -> {
            view.showError("Generic error (${data.reason})")
        }
        else -> IllegalArgumentException("Unknown payment response (${data.reason})")
    }
}
```

#### Result Code Descriptions

| Status Code                 | Description                                                              |
| --------------------------- | ------------------------------------------------------------------------ |
| `STATUS_PAYMENT_CAPTURED`   | Payment was successfully **captured** (`SALE` action).                   |
| `STATUS_PAYMENT_AUTHORIZED` | Payment was successfully **authorized** (`AUTH` action).                 |
| `STATUS_PAYMENT_FAILED`     | Payment failed at the Payment Gateway.                                   |
| `STATUS_GENERIC_ERROR`      | Generic client-side error (e.g., network issue or unexpected exception). |

> 📘 [Learn more: Getting a result from an Activity (Android Developer Site)](https://developer.android.com/training/basics/intents/result)

## Create a Card Payment Request

Before launching a card payment, you need to create a `CardPaymentRequest` object using the `CardPaymentRequest.Builder` class.

The `Builder` requires only one parameter to create a valid request:

* **`gatewayUrl`** – This URL is provided by the merchant server after initiating order creation. The merchant app uses this URL to build the card payment request.

***

## Currency Units for Order Creation

Unlike the SDK, which uses `BigDecimal`, the payment gateway requires amount values to be sent as an **integer** during order creation. This integer represents the full amount in the smallest currency unit.

**Examples:**

* AED 1.00 → `100`
* AED 3.99 → `399`
* USD 1.00 → `100`

Refer to the `PaymentOrderApiInteractor` class in the sample merchant app for more information.

***

## Configure Project Dependencies

Follow the steps below to import the SDK modules into your Android Studio project.

1. **Import SDK Modules**

   * Right-click your main app module and choose **New > Import Module...**
   * Select the `payment-sdk` folder and click **Open**.
   * The `payment-sdk` module will automatically pull in any additional dependencies.
2. **Add SDK Modules to App Dependencies**

   * Right-click your main app module and choose **Open Module Settings**.
   * In the **Project Structure** window:

     1. Go to the **Dependencies** tab.
     2. Click the **+** button and choose **Module Dependency**.
     3. In the list, select all the SDK modules (hold **Shift** to select multiple).
     4. Click **OK**.

Once added, your project is ready to use the SDK.

***

## Using `executeThreeDS()`

The SDK provides an `executeThreeDS()` method that allows you to trigger the EMV 3-D Secure flow. This is useful when integrating **tokenized payments** (e.g. saved cards) and want to authenticate the cardholder securely.

```kotlin
paymentClient.executeThreeDS(
    paymentResponse: PaymentResponse,
    requestCode: Int
)
```

* **`paymentResponse`** is the full JSON response returned from the N-Genius Online saved card payment API.
* **`requestCode`** helps distinguish this callback in `onActivityResult()`.

***

## Customize SDK UI Colors

You can customize the Payment SDK’s color scheme to match your brand. To do this, override specific color resources in your project’s resource files (`colors.xml`).

Example:

```xml
<color name="sdk_primary_color">#FF6200EE</color>
<color name="sdk_secondary_color">#FF03DAC5</color>
```

Refer to the SDK theming documentation (or contact your relationship manager) for the full list of customizable keys.

***

<br />

## Step 1: Install the iOS SDK

The N-Genius iOS SDK supports apps running on **iOS 11 or later**. You can install the SDK using **Swift Package Manager**, **CocoaPods**, or **Carthage**, depending on your project setup.

### Option 1: Swift Package Manager *(Recommended)*

1. Open your project in Xcode.
2. Go to **File > Add Packages**.
3. Enter the SDK repository URL:

   ```Text Text
   https://github.com/network-international/payment-sdk-io
   ```
4. Choose the version range and add the package to your target.

> 📘 Swift Package Manager offers a seamless setup and is preferred for most modern iOS projects.

### Option 2: CocoaPods

1. Create or edit your `Podfile` in the root of your project:

```Text Ruby
target 'YourAppTarget' do
  use_frameworks!
  pod 'NISdk'
end
```

2. Run the following in Terminal:

```shell sh
pod install
```

3. Open the generated `.xcworkspace` file in Xcode.

***

### Option 3: Carthage

If you're using Carthage:

1. Create a `Cartfile` in your project root:

   ```shell sh
   touch Cartfile
   ```
2. Add the SDK reference:

   ```shell nginx
   1. github  "network-international/payment-sdk-ios"
   ```
3. Run the following to fetch dependencies:

   ```shell sh
   carthage update
   ```
4. Link the framework:

   * Drag `NISdk.framework` from `Carthage/Build/iOS` into your app's **Linked Frameworks and Libraries** in the project settings.
5. Add a **Run Script Phase** to your build:

   * Go to **Build Phases > + > New Run Script Phase**.
   * Script content:

     <br />

     ```shell sh
     /usr/local/bin/carthage copy-frameworks
     ```
   * Input Files:

     ```shell shell
     1. $(SRCROOT)/Carthage/Build/iOS/NISdk.framework
     ```
   * Output Files:

     ```javascript
     1.  $(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/NISdk.framework
     ```

***

### Next Steps

Once the SDK is installed, you’re ready to initialize it and start integrating payments into your app. [Continue to Step 2: Configure the SDK ›](#)

## Step 2: Using the SDK

Once the SDK is installed, you’re ready to start processing payments. The typical payment journey begins with creating an order, followed by collecting the customer’s payment via card or Apple Pay.

> 📘 Before proceeding, ensure you've acquired your authentication credentials. For help with this step, please contact your onboarding representative.

### 1. Creating an Order

To accept in-app payments, an order must first be created via your backend.

* Your mobile app sends the order request to your backend server.
* Your backend then calls the N-Genius **Order API** to generate the order securely.

> Integrate the order API on your server[ using this guide.](https://docs.ngenius-payments.com/reference/creating-orders)\
> For details on creating orders via the API, see our [Create Order guide.](https://docs.ngenius-payments.com/reference/create-an-order-paypage)\
> A [sample merchant](https://github.com/network-international/payment-sdk-ios/tree/master/Examples) server is also available for reference.

> 📘 Server-side order creation is crucial for credential protection.

***

### 2. Accepting Card Payments

Once the order is created, you can present the card payment UI in your app.

**Import the SDK into your view controller:**

```swift swift
import NISdk
```

**Implement `CardPaymentDelegate` methods to handle payment events:**

```Text Swift
class YourViewController: UIViewController, CardPaymentDelegate {

  func paymentDidComplete(with status: PaymentStatus) {
    switch status {
    case .PaymentSuccess:
      // Payment succeeded
    case .PaymentFailed:
      // Payment failed
    case .PaymentCancelled:
      // User cancelled payment
    }
  }

  func authorizationDidComplete(with status: AuthorizationStatus) {
    if status == .AuthFailed {
      // Authentication failed
    }
    // Authentication successful
  }

  func showCardPaymentUI(orderResponse: OrderResponse) {
    let sdk = NISdk.sharedInstance
    sdk.showCardPaymentViewWith(
      cardPaymentDelegate: self,
      overParent: self,
      for: orderResponse
    )
  }
}
```

> 📘 **Note:**
>
> `CardPaymentDelegate` handles all payment-related events.\
> `overParent` refers to the view controller presenting the payment UI.\
> `orderResponse` is returned from the Order API.

***

### 3. Accepting Apple Pay Payments

To enable Apple Pay in your app:

1. **Create a Merchant ID** in your Apple Developer account.
2. **Enable Apple Pay** in your app capabilities.
3. **Configure your iTunes account** to accept Apple Pay.

> 📘 See [Enable Apple Pay](https://docs.ngenius-payments.com/docs/apple-pay) for a full guide.

#### i. Create a `PKPaymentRequest`

```swift swift
func createPKPaymentRequest(items: [PurchasedItems], total: Double) {
  let paymentRequest = PKPaymentRequest()
  paymentRequest.merchantIdentifier = merchantId
  paymentRequest.countryCode = "AE"
  paymentRequest.currencyCode = "AED"
  paymentRequest.requiredShippingContactFields = [.postalAddress, .emailAddress, .phoneNumber]
  paymentRequest.requiredBillingContactFields = [.postalAddress, .name]
  paymentRequest.merchantCapabilities = [.capabilityDebit, .capabilityCredit, .capability3DS]

  paymentRequest.paymentSummaryItems = items.map {
    PKPaymentSummaryItem(label: $0.name, amount: NSDecimalNumber(value: $0.amount))
  }
  paymentRequest.paymentSummaryItems.append(
    PKPaymentSummaryItem(label: "Total", amount: NSDecimalNumber(value: total))
  )
}
```

> 📘 Check out the included Swift and Objective-C example apps in [this repository;](https://github.com/network-international/payment-sdk-ios?tab=readme-ov-file#examples) they'll help you integrate the SDK.

***

#### ii. Present the Apple Pay Sheet

```swift swift
func presentApplePay() {
  let sdk = NISdk.sharedInstance
  sdk.initiateApplePayWith(
    applePayDelegate: self as? ApplePayDelegate,
    cardPaymentDelegate: self,
    overParent: self,
    for: orderResponse,
    with: paymentRequest
  )
}
```

> 📘 **Note:**
>
> * `cardPaymentDelegate`: your class handling card events
> * `overParent`: the view controller presenting the Apple Pay sheet
> * `orderResponse`: returned from the Order API
> * `paymentRequest`: the `PKPaymentRequest` object

***

### 4. Set the SDK Language (Optional)

You can localise the SDK UI by setting the language:

```swift swift
NISdk.sharedInstance.setSDKLanguage(language: "ar") // Arabic
```

> Supported languages include `"en"` for English and `"ar"` for Arabic.

***

## Using 3-D Secure (executeThreeDSTwo)

The `executeThreeDSTwo` method is used to initiate **EMV® 3-D Secure (3DS2)** authentication for saved [cards ](https://docs.ngenius-payments.com/reference/sandbox-test-environment#emv-3ds-20-test-cards--web)(tokenized payments). This helps you combine the convenience of saved cards with the added security of cardholder verification.

> This method is most commonly used when integrating saved card (tokenized) payments, providing <<glossary:frictionless>> but secure user experiences.

### Swift Example

```swift swift
NISdk.sharedInstance.executeThreeDSTwo(  
    cardPaymentDelegate: self,  
    overParent: self,  
    for: paymentResponse  
)
```

### Parameters

| Parameter             | Description                                                                 |
| :-------------------- | :-------------------------------------------------------------------------- |
| `cardPaymentDelegate` | A delegate class that implements `CardPaymentDelegate` to handle callbacks. |
| `overParent`          | The view controller presenting the 3DS UI.                                  |
| `paymentResponse`     | The response object from the saved card payment request API.                |

> 📘 `paymentResponse` should be the full JSON response returned by the N-Genius server when you initiate a saved card (tokenized) payment.

***

## Customizing the SDK UI Theme

The Payment SDK allows you to personalize the look and feel of the payment screens to match your app’s branding. You can customize key visual elements like colors using the `SDKColors` class.

### Example (Swift)

```swift swift
let sdkColors = SDKColors()
sdkColors.primaryColor = UIColor.systemBlue
sdkColors.secondaryColor = UIColor.white
sdkColors.buttonTextColor = UIColor.white
sdkColors.navigationBarTintColor = UIColor.black

NISdk.sharedInstance.setSDKColors(sdkColors)
```

### Customizable Elements

| Property                 | Description                                |
| :----------------------- | :----------------------------------------- |
| `primaryColor`           | Main color used for buttons and highlights |
| `secondaryColor`         | Background or accent color                 |
| `buttonTextColor`        | Text color for primary buttons             |
| `navigationBarTintColor` | Tint color for navigation elements         |

> 📘 Use this feature to align the payment UI with your brand and deliver a seamless customer experience.

## Webhooks and Mobile SDKs

Mobile apps cannot receive <<glossary:Webhook>>s directly. Because the final payment status is not always known by the time your customer returns to the app, it's important not to rely solely on in-app responses for order completion or fulfilment.

Instead, set the `webhookUrl` parameter when creating your payment order to point to a trusted server-side endpoint. Your backend will receive asynchronous payment status updates from the payment gateway.

To notify your mobile app of the final payment result:

* Implement a webhook handler on your backend to listen for payment status updates.
* Once the payment is confirmed or failed, your backend can trigger an update to the mobile app via one of the following:

  * **Silent push notification** to wake the app and update the UI
  * **Polling** (less efficient, only if push isn’t viable)
  * **Firebase Cloud Messaging (FCM)**

This approach ensures that your app reflects the true final payment status, regardless of whether the app is foregrounded, backgrounded, or closed when the payment is completed.

See our [webhooks guide](https://docs.ngenius-payments.com/reference/consuming-web-hooks) for a complete list of features.