Quickstart

Get up and running with NamiPay terminal integration in about 15 minutes — connect, register, start a session, and run your first purchase.

Get up and running with NamiPay terminal integration in about 15 minutes.

Step 1: Pick your platform

Jump to the integration for your platform. Not sure which to use? See the use-case guide on Welcome to Nami first.

PlatformPackageUse case
AndroidSkyBandSDK-release.aarMobile POS apps
iOSNamiECRSDK.frameworkiPad / iPhone POS
React Nativeecrlib packageCross-platform mobile
Flutterecrlib packageCross-platform mobile
.NetECR.dll (P/Invoke)Windows desktop POS
C/C++SBCoreECR.h / EcrApi.hEmbedded / native Windows
REST API — LocalInstaller packageAny language via API calls
REST API — CloudCloud MiddlewareAny language via API calls

Step 2: Connect to the terminal

Make sure the Nami payment terminal is powered on and connected:

  1. On the same network for TCP/IP (or a reachable network if the terminal and the POS device are on different networks).
  2. Paired via device settings for Bluetooth.
  3. Connected via a data cable (Micro-USB / Type-C to Type-A) for Serial/COM.
  4. Connected to WiFi for Cloud Middleware, with the ECR Adapter application installed.

Step 3: Register the terminal

Send a Register request (txnType = 17) with your cash register number.

Register Request:
  txnType: 17
  cashRegisterNumber: "12345678"
  Expected: Success response confirming registration

Step 4: Start a session

Send a Start Session request (txnType = 18) to begin the transaction session.

Start Session Request:
  txnType: 18
  cashRegisterNumber: "12345678"
  Expected: Success response confirming session start

📘

Not needed for every integration

Start Session / End Session are deprecated for the App-to-App and REST API (Local and Cloud Middleware) integrations — you can skip this step there.

Step 5: Perform a purchase

Send a Purchase request (txnType = 0) with the ECR reference number and amount. The amount pops up on the terminal.

Purchase Request:
  txnType: 0
  amount: "100"            (SAR 1.00 — amount in halalas)
  ecrRefNo: "12345678900001"
  date: "130623193000"     (ddMMyyHHmmss)

Step 6: Parse the response

Once payment completes, the terminal returns a response. Use the SDK's parse function to extract the response code, approval code, and receipt data from the semicolon-delimited response string.

📘

Middleware skips this step

Parsing is not applicable for the Local and Cloud Middleware integrations — they return structured JSON when jsonResponse: true.

Bluetooth connection

For Bluetooth terminals:

  1. Ensure the payment terminal is switched on and the display is active.
  2. Verify Bluetooth is enabled on the terminal.
  3. Pair the terminal from your device's Bluetooth settings before connecting from your app.