0% found this document useful (0 votes)
57 views10 pages

BBPS Bill Payment API Document

The BBPS Bill Payment API document outlines the services offered, including bill verification, payment, operator details, account balance, and transaction status. It provides necessary parameters for API requests, sample code, and response formats for various operations. Users must contact APIScript Developer Private Limited for production credentials and can utilize provided Postman collections for development.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views10 pages

BBPS Bill Payment API Document

The BBPS Bill Payment API document outlines the services offered, including bill verification, payment, operator details, account balance, and transaction status. It provides necessary parameters for API requests, sample code, and response formats for various operations. Users must contact APIScript Developer Private Limited for production credentials and can utilize provided Postman collections for development.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

APISCRIPT DEVELOPER PRIVATE LIMITED

BBPS Bill Payment API Document

API stands for Application Programming Integration which is widely used to integrate and
enable interaction with other software, much in the same way as a user interface facilitates
interaction between humans and computers. Our API codes can be easily integrated to any
web or software application.

API Services List


• Verify Bill
• Bill Payment
• Operator
• Account Balance
• Transaction Status
• JWT Encode

For Production (Live) Environment


You need production (live) URL for real time bill payment transaction so mail us @ [email protected]
for production credential like secret key, IP address white listing etc.

Production URL: https://utility.apiscript.in/

Postman Collection for Recharge API


For quick development use this postman collection request data and response data.

Download URL: https://apiscript.in/BBPS_Bill_Payment_Production.postman_collection.json

1|Page The information contained in this document is proprietary property of APIScript Developer Private Limited.
Unauthorized viewing, printing or reproduction is prohibited.
APISCRIPT DEVELOPER PRIVATE LIMITED

Parameter is used for API Request

Parameter Name Description


username Required - User Name for API Access
pwd Required - Password for API Access
operatorcode Required - Operator Code for Services
customer_mobile Required – Customer Mobile Number (10 Digit)
customer_name Required – Customer Name (Alpha Spacce)
amount Required - Amount for transaction to bill payment
param_json_data Required – Bill Parameter Details Operator – Pass Encoded Json
client_id Required - Your Unique Transaction ID (Only Number Accept)
Token Required - Every API request. It is use for security purpose.
Check how token parameter is passed.

Sample Code Available For PHP, ASP .NET, Java

https://github.com/apiscript-in/SampleCode

2|Page The information contained in this document is proprietary property of APIScript Developer Private Limited.
Unauthorized viewing, printing or reproduction is prohibited.
APISCRIPT DEVELOPER PRIVATE LIMITED

Common API Request Format Bill Verification and Bill Payment

Bill Payment API Request

There are two Step in Bill Payment


1. Verify Bill
URL : https://utility.apiscript.in/verify_bill
2. Payment Bill
URL : https://utility.apiscript.in/bill_payment

Response for Verification false:


{"message":" Either no bill pending/ due date has passed/ invalid
biller","is_verify":"false","bill_number":"","bill_date":"","bill_due_date":"",
"outstanding_bill_amount":"","partial_bill":"","customer_name":"","verify_ref_id":2,
"error_code":"0"}

Response for Verification true:


{"message":" Success","is_verify":"true","bill_number":"","bill_date":"","bill_due_date":"",
"outstanding_bill_amount":"","partial_bill":"","customer_name":"","verify_ref_id":2,
"error_code":"0"}

Response for Error:


{"message":"Paramenter is missing.","error_code":"1"}

3|Page The information contained in this document is proprietary property of APIScript Developer Private Limited.
Unauthorized viewing, printing or reproduction is prohibited.
APISCRIPT DEVELOPER PRIVATE LIMITED

Sample Request and Response

Verify Bill URL : https://utility.apiscript.in/verify_bill


Post Data: username=your_username&pwd=your_password&operatorcode=LA&
param_json_data=%7B%22utility_acc_no%22%3A508860%2C%22city%22%3A%22Ahmedaba
d%22%7D&customer_name=Maurya&customer_mobile=9825378495&token=EncryptTokenV
alue

Payment URL : https://utility.apiscript.in/bill_payment


Post Data:
username=your_username&pwd=your_password&operatorcode=LA&param_json_data=%7B
%22utility_acc_no%22%3A508860%2C%22city%22%3A%22Ahmedabad%22%7D&
&&customer_name=Maurya&customer_mobile=9825378495&amount=200&client_id=100&to
ken=EncryptTokenValue

Response for Success:


{"message":"Your recharge request is accepted.","recharge_id":2,"recharge_status":"Pending",
"amount":"100","number":"022603258744","client_id":"100","recharge_datetime":
"2018-06-28 10:55:26 PM","error_code":"0"}

Response for Error:


{"message":"Paramenter is missing.","error_code":"1"}

4|Page The information contained in this document is proprietary property of APIScript Developer Private Limited.
Unauthorized viewing, printing or reproduction is prohibited.
APISCRIPT DEVELOPER PRIVATE LIMITED

Operator List

URL : https://utility.apiscript.in/operator

Post Data: username=your_username&pwd=your_password&token=EncryptTokenValue

Important : param_data Used to Generate Bill JSON for param_json_data. pname is KEY
parameter for param_json_data. for Example Below Biller param_json_data :
{“utility_acc_no”:”01141054307”}

Response for Success:


{"company": [
{
"name": "ACT FIBERNET",
"service": "BROADBAND POSTPAID",
"code": "5003",
"status": "Active",
"param_data": [
{
"rules": "Please enter a valid min 3 and max 50 Character Account No OR User
Name (eg. 01141054307)",
"label_name": "Account Number/User Name",
"pname": "utility_acc_no",
"ptype": "AlphaNumeric",
"regexp": "^[A-Za-z0-9\\?\\*\\$\\@\\-#,_\\(\\.\\)\\s\\&;\/\\[\\]\\\\]{3,50}$"
}
]
}
"message": "Company list is found.",
"error_code": 0
}

Response for Error:


{"message":"Paramenter is missing.","error_code":"1"}

5|Page The information contained in this document is proprietary property of APIScript Developer Private Limited.
Unauthorized viewing, printing or reproduction is prohibited.
APISCRIPT DEVELOPER PRIVATE LIMITED

Transaction Status

URL : https://utility.apiscript.in/status

Post Data:
username=your_username&pwd=your_password&recharge_id=2&token=EncryptTokenValue
or
username=your_username&pwd=your_password&client_id=100&token=EncryptTokenValue

API Response for Success:


{"message":"Record
found","amount":"10.00","number":"9898598985","recharge_id":"2","client_id":"100","recharge_st
atus":"Pending","operator_code":"NA","recharge_datetime":"2018-06-28 10:55:26
PM","error_code":"0"}

recharge_status possible values are

1) Pending = Wait response from operator (Call Transaction Status API After 5
Minutes or Register Call back URL)
2) Success = Successful Transaction
3) Failure = Failure Transaction

API Response for Error:


{"message":"Paramenter is missing.","error_code":"1"}

6|Page The information contained in this document is proprietary property of APIScript Developer Private Limited.
Unauthorized viewing, printing or reproduction is prohibited.
APISCRIPT DEVELOPER PRIVATE LIMITED

Call back URL

Call back URL: http://www.yourdomainname.com/callback.php

Post Data:
data=%7B%22message%22%3A%22Record+found%22%2C%22amount%22%3A%2210.00%22
%2C%22number%22%3A%229898598985%22%2C%22recharge_id%22%3A%222%22%2C%22
client_id%22%3A%22100%22%2C%22recharge_status%22%3A%22Pending%22%2C%22
operator_code%22%3A%22NA%22%2C%22recharge_datetime%22%3A%222018-06-
28+10%3A55%3A26+PM%22%2C%22error_code%22%3A%220%22%7D

data Parameter is in URL Encode Format.

For Update Call Back URL Response, Mail us [email protected]

7|Page The information contained in this document is proprietary property of APIScript Developer Private Limited.
Unauthorized viewing, printing or reproduction is prohibited.
APISCRIPT DEVELOPER PRIVATE LIMITED

Account Balance

URL : https://utility.apiscript.in/account/balance

Post Data: username=your_username&pwd=your_password&token=EncryptTokenValue

Response for Success:


{"message":"Success","balance":"1001.25","error_code":"0"}

Response for Error:


{"message":"Paramenter is missing.","error_code":"1"}

8|Page The information contained in this document is proprietary property of APIScript Developer Private Limited.
Unauthorized viewing, printing or reproduction is prohibited.
APISCRIPT DEVELOPER PRIVATE LIMITED

JWT Encode

URL : https://utility.apiscript.in/jwt_encode

Post Data:
secret_key=4836-5cbc25d9d9412-716470&[email protected]

Response for Success:


{"encode_token":"eyJ0eXAiOiJK.V1QiLCJhbGciOiJIUzI1NiJ9.IntcIlRpbWVTdGFt","error_code":"0"}

Response for Error:


{"message":"Paramenter is missing.","error_code":"1"}

9|Page The information contained in this document is proprietary property of APIScript Developer Private Limited.
Unauthorized viewing, printing or reproduction is prohibited.
APISCRIPT DEVELOPER PRIVATE LIMITED

API Token Generate

In Every API Request Send Encrypt Token Using Algorithm HS256


Refer http://jwt.io/#debugger or Use JWT Encode URL

Token Format: array("TimeStamp"=>"1536488914","EmailID"=>”[email protected]”)

You need three Parameter for generate token:


1) Time Stamp => Current Time Stamp
2) Email ID => Your Register Email ID.
3) Secret Key => Share by us via Email.

Sample Code in PHP:


require_once 'php-jwt-master/vendor/autoload.php';
use \Firebase\JWT\JWT;
public function get_encode_token($token,$secret_key) {
return JWT::encode($token, $secret_key);
}
public function get_decode_token($token,$secret_key) {
return JWT::decode($token, $secret_key, array('HS256'));
}

$date = new DateTime();


$time = $date->getTimestamp();
$email_id = ‘[email protected]’;
$secret_key = ‘MySecretKey’;
$payload = array(‘TimeStamp’=>(string) $time, ‘EmailID’ => ‘[email protected]’);
$token = $this->get_encode_token($payload, 'MySecretKey'); // Pass this token value in
every API Request

Sample Output Token Value:


eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.IntcIlRpbWVTdGFtcFwiOlwiMTUzNjQ5MDkxMVw
iLFwiRW1haWxJRFwiOlwiaW5mb0BhcGlzY3JpcHQuaW5cIn0i.DrTCpQ5mclAU12md_E-
o25gALZz1Sm17CMz_sOjqcL8

10 | P a g e The information contained in this document is proprietary property of APIScript Developer Private
Limited. Unauthorized viewing, printing or reproduction is prohibited.

You might also like