Login Account

Security comes first. Perform transactions in a secure manner with the OAuth 2 protocol.

LoginAccountRequest

POST

Login Account

 

 

Description

 

This API will be used to login. User ID, OTP and device info will be sent to JS bank Wallet System for further verification and login on the provided information.

 

 

Request Parameters

 

Name Description Parameter Type Sample Value

PIN

PIN Body 6tBH5Et3C3b9p7Xzr1YVIQ==

EncryptionType

Encryption Type Body 1

UserID

User ID Body 1002283

CatalogVersionNo

Catalog Version No Body -1

ApplicationVersion

Application Version Body 2.2.0.1

DeviceTypeID

DeviceType ID Body 5

IsRooted

IsRooted Body 0

OS

OS Body Android

OSVersion

OS Version Body 4.4.4

Model

Model Body HUAWEI Y550-L01

Vendor

Vendor Body HUAWEI

Network

Network Body Telenor

UniqueDeviceID

UniqueDeviceID Body e9d9311ca1de5966

UserType

UserType Body 3

ApplicationID

ApplicationID Body 1

 

 

Response Parameters

 

Name Description Parameter Type Sample Value

Cookie

Cookie JSON Response Body

 JSESSIONID=VaZhznwFyZ6twAI3Mbdrc

F6k.node1; Path=/i8Microbank; HttpOnly

Rrn

Rrn JSON Response Body  8486433141814

UserType

UserType JSON Response Body  3

AgentType

AgentType JSON Response Body  3

FirstName

FirstName JSON Response Body  Applicant

LastName

LastName JSON Response Body  Applicant

BVSE

BVSE JSON Response Body  1

AgentAreaName

AgentAreaName JSON Response Body  Sindh

IsCNICExpiryRequired

IsCNICExpiry Required JSON Response Body  0

IPCR

IPCR JSON Response Body  0

TSTR

TSTR JSON Response Body

 Dear Agent! Welcome to

Branchless Banking

APUL

APUL JSON Response Body  0

AppVersion

AppVersion JSON Response Body  2.2.0.1

Balance

Balance JSON Response Body  186916.32

BalanceFull

BalanceFull JSON Response Body  186,916.32

IMPCR

IMPCR JSON Response Body  0

AgentMobile

AgentMobile JSON Response Body  03999999999

 

 

 

Resource URL

http://jsbank-test.apigee.net/mb/login/v1 /request

Try out yourself

Header Parameters


Name Values Description
Authorization
(required)

Auth2.0 verification. "Bearer" keyword followed by a space and generated Access Token from OAuth API.Like "Bearer xxxxxxx"

Content-Type
(required)

Content Type applciation/json is supported

Body Parameters


Name Values Description
Request Body
(required)

Add values in JSON Body

Request Body

HTTP Basic

OAuth 2.0

API Key

Clear Request

Make a request and see the response.

Make a request and see the response.

Make a request and see the response.

Code examples

  • var request = require('request'),
    oauth_token = "YOUR_ACCESS_TOKEN",
    url = "http://jsbank-test.apigee.net/mb/login/v1/request"
    auth = "Bearer " + oauth_token;
    request( {
    method: 'POST' url : url,
    headers : { "Authorization" : auth },
    json : {
    "PIN" :"",
    "EncryptionType" :"",
    "UserID" :"",
    "CatalogVersionNo" :"",
    "ApplicationVersion" :"",
    "DeviceTypeID" :"",
    "IsRooted" :"",
    "OS":"",
    "OSVersion":"",
    "Vendor" :"",
    "Network" :"",
    "UniqueDeviceID" :"",
    "UserType":"",
    "ApplicationID" :"",
    "Model":""
    } },
    function (error, response, body) {
    // TODO: Use the body object to extract the response
    console.log(body)
    } )
    
  • <?PHP
    
    $url = 'http://jsbank-test.apigee.net/mb/login/v1/request';
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_HTTPHEADER, 
    array('Content-Type:application/json','Authorization:Bearer 
    ACCESS_TOKEN')); //setting custom header $curl_post_data = array(
    //Fill in the request parameters with valid values
    'PIN' => ' ',
    'EncryptionType' => ' ',
    'UserID' => ' ',
    'CatalogVersionNo' => ' ',
    'ApplicationVersion' => ' ',
    'DeviceTypeID' => ' ',
    'IsRooted' => ' ',
    'OS' => '',
    'OSVersion' => '',
    'Vendor' => '',
    'Network' => '',
    'UniqueDeviceID' => '',
    'UserType' => '',
    'ApplicationID' => '',
    'Model' => ' '
    ); $data_string = json_encode($curl_post_data);
    
  • require 'net/http'
    require 'net/https'
    require 'uri'
    uri = URI('http://jsbank-test.apigee.net/mb/login/v1/request')
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    request = Net::HTTP::Get.new(uri)
    request["accept"] = 'application/json'
    request["content-type"] = 'application/json'
    request["authorization"] = 'Bearer '
    request.body = "{
    \"PIN\":\" \",
    \"EncryptionType\":\" \",
    \"UserID\":\" \",
    \"CatalogVersionNo\":\" \",
    \"ApplicationVersion\":\" \",
    \"DeviceTypeID\":\" \",
    \"IsRooted\":\" \",
    \"OS\":\",
    \"OSVersion\":\",
    \"Vendor\":\",
    \"Network\":\",
    \"UniqueDeviceID\":\",
    \"UserType\":\",
    \"ApplicationID\":\",
    \"Model\":\" \"
    }"
    response = http.request(request)
    puts response.read_body
    
  • curl -X POST --header "Authorization: 
    Bearer " --header "Content-Type:
    application/json" -d "{ \"PIN\":\" \",
    \"EncryptionType\":\" \",
    \"UserID\":\" \",
    \"CatalogVersionNo\":\" \",
    \"ApplicationVersion\":\" \",
    \"DeviceTypeID\":\" \",
    \"IsRooted\":\" \",
    \"OS\":\",
    \"OSVersion\":\",
    \"Vendor\":\",
    \"Network\":\",
    \"UniqueDeviceID\":\",
    \"UserType\":\",
    \"ApplicationID\":\",
    \"Model\":\" \"
    }" "http://jsbank-test.apigee.net/mb/login/v1/request"
    
  • OkHttpClient client = new OkHttpClient();
    MediaType mediaType = 
    MediaType.parse("application/json");
    RequestBody body = 
    RequestBody.create(mediaType, "{
    \"PIN\":\" \",
    \"EncryptionType\":\" \",
    \"UserID\":\" \",
    \"CatalogVersionNo\":\" \",
    \"ApplicationVersion\":\" \",
    \"DeviceTypeID\":\" \",
    \"IsRooted\":\" \",
    \"OS\":\",
    \"OSVersion\":\",
    \"Vendor\":\",
    \"Network\":\",
    \"UniqueDeviceID\":\",
    \"UserType\":\",
    \"ApplicationID\":\",
    \"Model\":\" \"
    }");
    Request request = new Request.Builder()
    .url("http://jsbank-test.apigee.net/mb/login/v1/request")
    .post(body)
    .addHeader("authorization", "Bearer YOUR_OAUTH_TOKEN")
    .addHeader("content-type", "application/json")
    .build();
    Response response = client.newCall(request).execute(); 
    

Response Code Details


{
    "requestId": "3091739560051",
    "errorCode": "01",
    "errorMessage": "Invalid Authorization Header"
}


{ "requestId": "848639949421", "errorCode": "02", "errorMessage": "Bad Request - Invalid PIN" }
{ "requestId": "3091739563751", "errorCode": "02", "errorMessage": "Bad Request - Invalid ENCT" }
{ "requestId": "3091739565311", "errorCode": "02", "errorMessage": "Bad Request - Invalid UID" }
{ "requestId": "3091639568831", "errorCode": "02", "errorMessage": "Bad Request - Invalid CVNO" }
{ "requestId": "848739957661", "errorCode": "02", "errorMessage": "Bad Request - Invalid APPV" }
{ "requestId": "848639959261", "errorCode": "02", "errorMessage": "Bad Request - Invalid DTID" }
{ "requestId": "3091739574152", "errorCode": "02", "errorMessage": "Bad Request - Invalid ISROOTED" }
{ "requestId": "3091639576222", "errorCode": "02", "errorMessage": "Bad Request - Invalid OS" }
{ "requestId": "3091739580321", "errorCode": "02", "errorMessage": "Bad Request - Invalid OSVERSION" }
{ "requestId": "848639982022", "errorCode": "02", "errorMessage": "Bad Request - Invalid MODEL" }
{ "requestId": "3091639599211", "errorCode": "02", "errorMessage": "Bad Request - Invalid NETWORK" }
{ "requestId": "848739987901", "errorCode": "02", "errorMessage": "Bad Request - Invalid UDID" }
{ "requestId": "848739991761", "errorCode": "02", "errorMessage": "Bad Request - Invalid USTY" }
{ "requestId": "3091639606561", "errorCode": "02", "errorMessage": "Bad Request - Invalid APPID" }
{ "requestId": "848743616092", "errorCode": "02", "errorMessage": "Bad Request - Invalid EncryptionType" }
{ "requestId": "848743626312", "errorCode": "02", "errorMessage": "Bad Request - Invalid DeviceTypeID" }
{ "requestId": "3091742952721", "errorCode": "02", "errorMessage": "Bad Request - Invalid IsRooted" }
{ "requestId": "3091647746272", "errorCode": "02", "errorMessage": "Bad Request - Invalid ApplicationID" }
{
    "Cookie": "JSESSIONID=21cOgGGvAMQSmS+zMZcJ-U3v.node1; Path=/i8Microbank; HttpOnly",
    "Rrn": "3091739940811",
    "USTY": "3",
    "ATYPE": "3",
    "FNAME": "Applicant",
    "LNAME": "Applicant",
    "BVSE": "1",
    "AGENT_AREA_NAME": "Sindh",
    "IS_CNIC_EXPIRY_REQUIRED": "0",
    "IPCR": "0",
    "TSTR": "Dear Agent! Welcome to Branchless Banking",
    "APUL": "0",
    "APPV": "2.2.0.1",
    "BAL": "191140.77",
    "BALF": "191,140.77",
    "IMPCR": "0",
    "AMOB": "03993409180"
}
{
    "requestId": "3091739645081",
    "errorCode": "9006",
    "errorMessage": "Server Error - Service unavailable due to technical difficulties, please try again or contact service provider."
}


{ "requestId": "3091639647771", "errorCode": "", "errorMessage": "Server Error - " }
{ "requestId": "848743639202", "errorCode": "9025", "errorMessage": "Server Error - A security PIN has been sent to your registered Mobile Number as device is updated. Please enter your 4 digits Security PIN." }

FAQs

We take security very seriously. This API will make sure you execute your transactions in a safe and controlled environment. We are using the OAuth2 security mechanism.

This API can power your app with a robust set of permission-based consumer and business account and transactional data while adhering to bank-level security requirements. Effectively managing data is also key for regulatory reporting. You use the API to authenticate your users easily through your web/desktop and mobile applications. This will enable you to extend reach and attract additional customers.

In order to actually access the account and retrieve the requested data, account holders need to authorize your application and allow it to access their account. This is achieved using OAuth 2.

The Client Token, commonly referred to as access_token in code samples, is a credential that can be used by a client to access an API.

You can find all the validation rules under the API docs.



Resource Summary

Security:

Content Type:

application/json

Prerequisite(s)

1. Authentication token as Bearer

2. Valid Agent (Apigee agent)

Working...