Debit Payment

This API will debit customers as per product.

DebitPayment

POST

DebitPayment

 

 

Description

 

This API will debit customers as per product.

 

 

Version


V2


Resource URL

https://sandbox.jsbl.com/v2 /debitpayment-blb2


Header


Name Type Values Description Length

Authorization

String Bearer
Example: Bearer xxxxxxxxxxxxx
Access Token will be generated through OAuth API NA

Content-Type

String Example:
application/json
Only “application/json” Content-Type is supported. NA


 

 

Request Parameters

 

Name Description Parameter Type Sample Value

processingCode

processing Code String DebitPayment

merchantType

merchant Type String 0088

traceNo

trace No Only numbers are allowed 599013

companyName

company Name String IBCC

dateTime

date Time YYYYMMddHHmmss 20200906121218

mobileNo

mobile No String 03463564149

channelId

channel Id String IBCC

terminalId

terminal Id String IBCC

productId

product Id String xxxxxxxx

otpPin

otp Pin String

WjbGEHEJ5IrqOiH3z313KaO3iiHvEa4l5uNPPUoN9jOBPLGh

0NxQ/TZA7Lnaw+9Uz+2ZI5QtCRyjak4kzZ+BG5O4ddYNJeK

moTCZI9+jghlr/Vu1HO5qtB2/Xm+OIAgRyPhgItGn7BpW9POd

JZpdXrR/EiE1bn4jklsDPYNrIoEgmDsBFvv8wFl7JDyPEFFXuV

IKJMUK3JWUbCKCkXo9yfZ3yLOJGcchARVE5XoSuwnY+Bq

56t4AgPVHblLdr5Typw0CQUOUG3HXny1xyY+S8zplHM4hNu

AGfGcgiGd6eCQpk7srkzeQ6wgpTSrNuV7LIgy+uEgWVu6l/m

FL0lQWcA== "

pinType

pin Type String 02

transactionAmount

transaction Amount String 20.0

reserved1

reserved 1 String NA

reserved2

reserved 2 String NA

reserved3

reserved 3 String NA

reserved4

reserved 4 String NA

reserved5

reserved 5 String NA

reserved6

reserved 6 String NA

reserved7

reserved 7 String NA

reserved8

reserved 8 String NA

reserved9

reserved 9 String NA

reserved10

reserved 10 String NA

 

 

Sample  Request

 

{"DebitPaymentRequest":{
    "processingCode": "DebitPayment",
    "merchantType": "0088",
    "traceNo": "599013",
    "companyName": "IBCC",
    "dateTime": "20200906121218",
    "mobileNo": "03463564149",
    "channelId": "IBCC",
    "terminalId": "IBCC",
    "productId": "xxxxxxxx",
    "otpPin":" WjbGEHEJ5IrqOiH3z313KaO3iiHvEa4l5uNPPUoN9jOBPLGh0NxQ/TZA7Lnaw+9Uz+2ZI5QtCRyjak4kzZ+BG5O4ddYNJeKmoTCZI9+jghlr/Vu1HO5qtB2/Xm+OIAgRyPhgItGn7BpW9POdJZpdXrR/EiE1bn4jklsDPYNrIoEgmDsBFvv8wFl7JDyPEFFXuVIKJMUK3JWUbCKCkXo9yfZ3yLOJGcchARVE5XoSuwnY+Bq56t4AgPVHblLdr5Typw0CQUOUG3HXny1xyY+S8zplHM4hNuAGfGcgiGd6eCQpk7srkzeQ6wgpTSrNuV7LIgy+uEgWVu6l/mFL0lQWcA== ",
    "pinType": "02",
    "transactionAmount": "20.0",
    "reserved1": "",
    "reserved2": "",
    "reserved3": "",
    "reserved4": "",
    "reserved5": "",
    "reserved6": "",
    "reserved7": "",
    "reserved8": "",
    "reserved9": "",
    "reserved10": ""
}}
 

Response Parameters

 

Name Description Parameter Type Sample Value

processingCode

processing Code String  DebitPayment

merchantType

merchant Type String  0088

traceNo

trace No Only numbers are allowed  509013

companyName

company Name String  IBCC

dateTime

date Time YYYYMMddHHmmss  20200906121218

responseCode

response Code String

 9029

responseDetails

response Details String  
Your OTP has been expired. Please regenerate new OT

rrn

rrn String

 
IBCC2020090612121859901

responseDescription

response Description String  ""

responseDateTime

response Date Time String

 ""

transactionId

transaction Id String ""

commissionAmount

commission Amount String

 ""

transactionAmount

transaction Amount String  20.00

totalTransactionAmount

total Transaction Amount String

 ""

 

 

Sample  Response

 

{
    "DebitPaymentResponse": {
        "processingCode": "DebitPayment",
        "merchantType": "0088",
        "traceNo": "599013",
        "companyName": "IBCC",
        "dateTime": "20200906121218",
        "responseCode": "9029",
        "responseDetails": "["Your OTP has been expired. Please regenerate new OTP."]",
        "rrn": "IBCC20200906121218599013",
        "responseDescription": "",
        "responseDateTime": "",
        "transactioId": "",
        "commissionAmount": "",
        "transactionAmount": "20.0",
        "totalTransactionAmount": ""
    }
}
 

 

Response Code Details


{
"requestId": "3091741309081",
"errorCode": "01",
"errorMessage": "Bad Request - Invalid Authorization Header"
}



{
"requestId": "3091741309081",
"errorCode": "03",
"errorMessage": "Bad Request - Invalid Request Payload"
}



{
"requestId": "3091741309081",
"errorCode": "04",
"errorMessage": "Bad Request - Resource not found"
}



{
"requestId": "3091741309081",
"errorCode": "05",
"errorMessage": "Bad Request - Invalid Access Token"
}
{
    "ResponseCode": "00",
    "ResponseDescription": "Successful",
    "Rrn": "",
    "MobileNumber": "03464991719",
    "Cnic": "3520214402765",
    
}


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 application/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 = "https://sandbox.jsbl.com/mb/verifyaccount/v0/request"
    auth = "Bearer " + oauth_token;
    request(
    {
    method: 'POST'
    url : url,
    headers : {
    "Authorization" : auth
    }, json : {
    
    "ProcessingCode" :"",
    "merchantType" :"",
    "traceNo" :"",
    "companyName" :"",
    "dateTime" :"",
    "mobileNo" :"",
    "channelId" :"",
    "terminalId" :"",
    "productId" :"",
    "pinType" :"",
    "transactionAmount" :"",
    "reserved1" :"",
    "reserved2" :"",
    "reserved3" :"",
    "reserved4" :"",
    "reserved5" :"",
    "reserved6" :"",
    "reserved7" :"",
    "reserved8" :"",
    "reserved9" :"",
    "reserved10" :"",
    
    
    
    
    } }, function (error, response, body) {
    // TODO: Use the body object to extract the response
    console.log(body)
    }
    )
    
  • <?PHP
    
    $url = 'https://sandbox.jsbl.com/mb/verifyaccount/v0/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
    'ProcessingCode' => ' ',
    'merchantType' => ' '
    'traceNo' => ' ',
    'companyName' => ' '
    'dateTime' => ' ',
    'mobileNo' => ' '
    'channelId' => ' '
    'terminalId' => ' '
    'productId' => ' '
    'pinType' => ' '
    'transactionAmount' => ' ',
    'reserved1' => ' '
    'reserved2' => ' ',
    'reserved3' => ' '
    'reserved4' => ' ',
    'reserved5' => ' '
    'reserved6' => ' '
    'reserved7' => ' '
    'reserved8' => ' '
    'reserved9' => ' '
    'reserved10' => ' ',
    
    
    
    ); $data_string = json_encode($curl_post_data);
    
  • require 'net/http'
    require 'net/https'
    require 'uri'
    uri = URI('https://sandbox.jsbl.com/mb/verifyaccount/v0/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 = "{
    
    
    \"ProcessingCode\":\" \",
    \"merchantType\":\" \"
    \"traceNo\":\" \",
    \"companyName\":\" \"
    \"dateTime\":\" \",
    \"mobileNo\":\" \"
    \"channelId\":\" \"
    \"terminalId\":\" \"
    \"productId\":\" \"
    \"pinType\":\" \"
    \"transactionAmount\":\" \",\"TransactionType\":\" \"
    \"reserved1\":\" \"
    \"reserved2\":\" \",
    \"reserved3\":\" \"
    \"reserved4\":\" \",
    \"reserved6\":\" \"
    \"reserved7\":\" \"
    \"reserved8\":\" \"
    \"reserved9\":\" \"
    \"reserved10\":\" \"
    
    
    }"
    response = http.request(request)
    puts response.read_body
    
  • curl -X POST --header "Authorization: 
    Bearer " --header "Content-Type: 
    \"ProcessingCode\":\" \",
    \"merchantType\":\" \"
    \"traceNo\":\" \",
    \"companyName\":\" \"
    \"dateTime\":\" \",
    \"mobileNo\":\" \"
    \"channelId\":\" \"
    \"terminalId\":\" \"
    \"productId\":\" \"
    \"pinType\":\" \"
    \"transactionAmount\":\" \",\"TransactionType\":\" \"
    \"reserved1\":\" \"
    \"reserved2\":\" \",
    \"reserved3\":\" \"
    \"reserved4\":\" \",
    \"reserved6\":\" \"
    \"reserved7\":\" \"
    \"reserved8\":\" \"
    \"reserved9\":\" \"
    \"reserved10\":\" \"
    
    }" "https://sandbox.jsbl.com/mb/verifyaccount/v0/request"
    
  • OkHttpClient client = new OkHttpClient();
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{
    \"ProcessingCode\":\" \",
    \"merchantType\":\" \"
    \"traceNo\":\" \",
    \"companyName\":\" \"
    \"dateTime\":\" \",
    \"mobileNo\":\" \"
    \"channelId\":\" \"
    \"terminalId\":\" \"
    \"productId\":\" \"
    \"pinType\":\" \"
    \"transactionAmount\":\" \",\"TransactionType\":\" \"
    \"reserved1\":\" \"
    \"reserved2\":\" \",
    \"reserved3\":\" \"
    \"reserved4\":\" \",
    \"reserved6\":\" \"
    \"reserved7\":\" \"
    \"reserved8\":\" \"
    \"reserved9\":\" \"
    \"reserved10\":\" \"
    
    
    }");
    Request request = new Request.Builder()
    .url("https://sandbox.jsbl.com/mb/verifyaccount/v0/request")
    .post(body)
    .addHeader("authorization", "Bearer YOUR_OAUTH_TOKEN")
    .addHeader("content-type", "application/json")
    .build();
    Response response = client.newCall(request).execute(); 
    

FAQs

You need to go through the section "How it Works".

Prerequisite(s)

1. Authentication Bear OAuth access token

2. Debit Inquiry

Resource Summary

Security

Authentication

Content Type

application/json

Working...