Payment Inquiry

This API will use for Payment Inquiry

PaymentInquiry

POST

Payment Inquiry

 

 

Description

 

This API will use for Payment Inquiry.

 

 

Version


V1


Resource URL

https://sandbox.jsbl.com/payment/v0 /inquiry


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 O/M Type Values Description Length

CNIC

M String 1234567890123 CNIC of Customer 13

MobileNumber

M String 03333333333 Mobile Number of Customer 11

 

 

 

Sample  Request

 

{

            "Cnic":"3520214402765"

            ,"MobileNumber":"03333333333"

}

 

Response Parameters

 

Name Type Values Description Length

ResponseCode

String 00 ResponseCode NA

ResponseDescription

String Successful  ResponseDescription NA

Rrn

String 848721291614  Rrn NA

MobileNumber

String 03333333333 MobileNumber 11

Cnic

String 3578414402454  Cnic 13

HashData

String Hash Data HashData NA

 

 

 

SAMPLE RESPONSE:


SUCCESS

{
"ResponseCode": "00",
"ResponseDescription": "Successful",
"Rrn": "Transactions"
}
[
{
"Date": "2017-12-26 ",
"Description": "Wallet to Wallet",
"Amount": "32000.0"
}

{
"Date": "$DATE1#",
"Description": "$Description1#",
"Amount": "$Amount1#"
}

{
"Date": "2017-12-26",
"Description": "Cash in",
"Amount": "5500.00"
}

{
"Date": "2017-12-26",
"Description": "Wallet to Wallet",
"Amount": "160.0"
}

{
"Date": "2017-12-26",
"Description": "Cash Out",
"Amount": "2900.0"
]
}

Response Code Details


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


{ "requestId": "3091741313471", "errorCode": "03", "errorMessage": "Bad Request - Invalid Request Payload" }
{ "requestId": "3091741309082", "errorCode": "04", "errorMessage": "Bad Request - Resource not found" }
{ "requestId": "3091741303041", "errorCode": "05", "errorMessage": "Bad Request - Invalid Access Token" }
{ "requestId": "3091743188041", "errorCode": "21", "errorMessage": "Bad Request - OtpPin not found" }
{ "requestId": "3091741309081", "errorCode": "20", "errorMessage": "Bad Request - Invalid MobileNumber" }
{
    "ResponseCode": "00",
    "ResponseDescription": "Successful",
    "Rrn": "",
    "MobileNumber": "03464991719",
    "OtpPin": "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 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.

OTP Encryption

NOTE: To provide Unlimited Strength of encryption to your environment, Kindly download library, extract the zip file and replace these policy
file(local_policy &US_export_policy) on following location e-g: "java\jdk1.8.0_102\jre\lib\security"

Download Library
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;

import javax.crypto.*;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.Security;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import java.util.HashMap;
import java.util.Iterator;

public class EncryptionUtil {
    //private static final Logger log = LoggerFactory.getLogger(com.test.security.EncryptionUtil.class);

//    private static final String KEY = ConfigReader.getInstance().getProperty("crypto.channel.key", "682ede816988e58fb6d057d9d85605e0");

	private static final String KEY = "682ede816988e58fb6d057d9d85605e0";
	
    public static String encrypt(String input) {
        return encryptWithAES(KEY, input);
    }

    public static String decrypt(String input) {
        return decryptWithAES(KEY, input);
    }

	public static String encryptWithAES(String key, String strToEncrypt) {
		Security.addProvider(new BouncyCastleProvider());
		byte[] keyBytes;
		keyBytes = new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 };
		try {
			keyBytes = key.getBytes("UTF8");
			SecretKeySpec skey = new SecretKeySpec(keyBytes, "AES");
			byte[] input = strToEncrypt.trim().getBytes("UTF8");

			synchronized (Cipher.class) {
				Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5PADDING");
				cipher.init(Cipher.ENCRYPT_MODE, skey);

				byte[] cipherText = new byte[cipher.getOutputSize(input.length)];

				int ctLength = cipher.update(input, 0, input.length, cipherText, 0);
				ctLength += cipher.doFinal(cipherText, ctLength);

				String encryptedString = new String(org.bouncycastle.util.encoders.Base64.encode(cipherText), "UTF8");
				return encryptedString.trim();
			}
		} catch (UnsupportedEncodingException uee) {
            //log.error("Crypto Exception:", uee);
			System.out.println("Crypto Exception1:"+ uee.getLocalizedMessage());
		} catch (IllegalBlockSizeException ibse) {
            //log.error("Crypto Exception:", ibse);
			System.out.println("Crypto Exception2:"+ ibse.getLocalizedMessage());
		} catch (BadPaddingException bpe) {
            //log.error("Crypto Exception:", bpe);
			System.out.println("Crypto Exception3:"+ bpe.getLocalizedMessage());
		} catch (InvalidKeyException ike) {
            //log.error("Crypto Exception:", ike);
			System.out.println("Crypto Exception4:"+ ike.getLocalizedMessage());
		} catch (NoSuchPaddingException nspe) {
            //log.error("Crypto Exception:", nspe);
			System.out.println("Crypto Exception5:"+ nspe.getLocalizedMessage());
		} catch (NoSuchAlgorithmException nsae) {
            //log.error("Crypto Exception:", nsae);
			System.out.println("Crypto Exception6:"+ nsae.getLocalizedMessage());
		} catch (ShortBufferException e) {
            //log.error("Crypto Exception:", e);
			System.out.println("Crypto Exception7:"+ e.getLocalizedMessage());
		}
		return null;
	}

	public static String decryptWithAES(String key, String strToDecrypt) {
		Security.addProvider(new BouncyCastleProvider());
		byte[] keyBytes = new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13,
				0x14, 0x15, 0x16, 0x17 };
		try {
			keyBytes = key.getBytes("UTF8");
			SecretKeySpec skey = new SecretKeySpec(keyBytes, "AES");
			byte[] input = org.bouncycastle.util.encoders.Base64.decode(strToDecrypt.trim().getBytes("UTF8"));

			synchronized (Cipher.class) {
				Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5PADDING");
				cipher.init(Cipher.DECRYPT_MODE, skey);

				byte[] plainText = new byte[cipher.getOutputSize(input.length)];
				
				int ptLength = cipher.update(input, 0, input.length, plainText, 0);
				ptLength += cipher.doFinal(plainText, ptLength);
				String decryptedString = new String(plainText, "UTF8");
				return decryptedString.trim();
			}
        } catch (UnsupportedEncodingException uee) {
            //log.error("Crypto Exception:", uee);
        } catch (IllegalBlockSizeException ibse) {
            //log.error("Crypto Exception:", ibse);
        } catch (BadPaddingException bpe) {
            //log.error("Crypto Exception:", bpe);
        } catch (InvalidKeyException ike) {
            //log.error("Crypto Exception:", ike);
        } catch (NoSuchPaddingException nspe) {
            //log.error("Crypto Exception:", nspe);
        } catch (NoSuchAlgorithmException nsae) {
            //log.error("Crypto Exception:", nsae);
        } catch (ShortBufferException e) {
            //log.error("Crypto Exception:", e);
        }
		return null;
	}

	public static void main(String[] args) {

		String key = new String("682ede816988e58fb6d057d9d85605e0");
		String enc = encrypt("55880");
		System.out.println("Encrypted Pin is : "+enc);

		System.out.println("Decrypted Pin is : "+decrypt(enc));
	}
	
	
	
}

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.

Prerequisite(s)

1. OAuth2.0 Authorization Bearer access token

Resource Summary

Security

Authentication

Content Type

application/json

Working...