Security

Securely connecting to the SoftPOS SDK

Setting Up Terminals

You need to set up the terminals in order to use it for performing transaction:

Login to the tumatap.dev dashboard -> Go to Terminals -> Create Terminal ->Create TRSM (Any 6 Digits/Hexadecimal Code) -> Choose whether to assign this an existing merchant (if there's a merchant) or a new merchant.

Allowing your user to login using mobile, email and UserEnter

There are few steps to do in tumatap.dev dashboard to allow the user to login from SDK using email and mobile number.

1- Login to the sandbox dashboard

2- Go to Terminals Tab

3- Go to terminal details

4- Access -> Invite user -> enter user details and invite.

Login from SDK

AuthenticationData .

Login Methods

  1. Login with existing mobile number

AuthenticationData.Mobile("+243500000000")
  1. Login with existing email

AuthenticationData.Email("[email protected]")
  1. Let the user enter the mobile number or email to Login

AuthenticationData.UserEnter

Allowing your user to login using JWT

To be able to connect your user device to a terminal id please use your backend to sign the JWT with flowing data

  1. You will need the following:

  • client_uuid: (483f797a-0e46-44de-a58f-5d5ea80ad7df)

  • JWT Key : (seerbit_pos_dev_key.pem) that you will use to sign the JWT.

  1. terminal_id: test terminal ids provided

import * as fs from 'fs';
import * as jwt from 'jsonwebtoken';

function getToken() {
var privateKey: Buffer = fs.readFileSync('./client_pos_dev_key.pem'); //provided

var terminal:any = {
  data:{
    ops: "auth",
    client_uuid: "483f797a-0e46-44de-a58f-5d5ea80ad7df", // provided
    terminal_id: "provided_terminal_id(s)" //provided
  }
}

return jwt.sign(terminal, privateKey, { algorithm: "RS256"});
}

Last updated