UBPS Web Service Message Interface Updated 1.3.6

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 58

UBPS WEB SERVICE MESSAGE INTERFACE FOR AN AGGREGATOR

VERSION 1.3.5
UBPS WEB Service Message Interface for an Aggregator

T ABLE OF C ONTENT

1 Introduction ................................................................................................................................. 4
1.1 Purpose ................................................................................................................................................ 4
1.2 Intended Audience ............................................................................................................................. 4

2 UBPS Web Service Message Interface .................................................................................... 5


2.1 Annotation of Data Element Attributes ........................................................................................... 5
2.2 Message Flow ...................................................................................................................................... 6
Transaction and advice Message Flow ........................................................................................ 6
Message Flow for Exception Condition Transaction Advice: .................................................. 6
2.3 Bill Inquiry ........................................................................................................................................... 7
Method Name: BillInquiry ............................................................................................................ 7
2.4 Bill Inquiry With Reserved Field .................................................................................................... 11
Method Name: BillInquiryWithReservedField ........................................................................ 11
2.5 Bill Payment ....................................................................................................................................... 16
Method Name: Bill Payment ........................................................................................................ 16
2.6 Bill Payment With Reserved Field .................................................................................................. 21
Method Name: BillPaymentWithReservedField ...................................................................... 21
2.7 Void Paid Bill ..................................................................................................................................... 27
Method Name: VoidPaidBill....................................................................................................... 27
2.8 Void Paid Bill With Reserved field ................................................................................................. 30
Method Name: VoidBillPaymentWithReservedField ............................................................. 30
2.9 Detail of Response Detail Field ....................................................................................................... 33
Method Name: BillInquiry ........................................................................................................... 33
Method Name: BillPayment ......................................................................................................... 42
Configuration and Settings .................................................................................................................... 50
3.1 Advice Retransmit Mechanism ....................................................................................................... 51
3.2 Transaction Timeout Value.............................................................................................................. 51

3 Digital Signature Calculation Detail ..................................................................................... 51


4.1 Signature Details ............................................................................................................................... 52

4 HASH Calculation Detail ........................................................................................................ 54


5.1 Hash Details ....................................................................................................................................... 54

5 UBPS Web Service Response Codes ..................................................................................... 56

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 2


UBPS WEB Service Message Interface for an Aggregator

6.1 Response Codes ................................................................................................................................. 56


Notice........................................................................................................................................................ 57

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 3


UBPS WEB Service Message Interface for an Aggregator

1 INTRODUCTION

This document outlines the UBPS Web Service Message Interfacing options for an aggregator.

An aggregator uses UBPS to provide several payment services to its client institutions. UBPS
Web Services enable these payment services without requiring the client institution to
understand specific message formats.

1.1 PURPOSE

This document includes interfacing parameters, flows, configurations, response codes and
other related settings that may help an aggregator use web services to enable simple and
secure communication with client institutions.

1.2 INTENDED AUDIENCE

This document is intended for the following audience:

 CUSTOMER CONNECTING TO BILL AGGREGATOR

Any TPS client, for instance a member bank, a telecom company, or an exchange

company that wants to offer bill payment services to its customer can use this

document to connect the installed bill payment system over web services.

 Internal to TPS

All rights for information in this belong to TPS. It may be updated periodically by the

product architect to keep up with changes in the product.

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 4


UBPS WEB Service Message Interface for an Aggregator

2 UBPS WEB SERVICE MESSAGE INTERFACE

2.1 ANNOTATION OF DATA ELEMENT ATTRIBUTES

The following notation conventions describe the attributes of Transaction message data
elements:
Notation Description Padding Rules

A Alphabetic characters A-Z and a-z Spaces should be padded on right side of data to complete the
Left Aligned and padded with Spaces. required length

N Numeric digits 0-9 Zeros should be padded on left side to complete the required
Right Aligned, padded with 0s (zeroes) length

AN Alphabetic and Numeric characters Spaces should be padded on right side of data to complete the
Left Aligned, padded with Spaces required length

ANS Alphabetic, numeric and special characters Spaces should be padded on right side of data to complete the
Left Aligned, padded with Spaces required length of the field

X ‘+’ or ‘-‘ This is not used as individual field. This must be used in
concatenation with other fields

XN Numeric values with negative or positive sign Zeros should be padded between sign operator and numeric value
to complete the required length

M Mandatory; Filled with meaningful data

C Conditional; Blank Spaces should be provided if field is black to complete the overall
length of message

V Variable Length Spaces should be provided if field is black to complete the overall
length of message

The number following an attribute code (a, n, an, ans) specifies the length of the data element.

Example: “N 12” indicates a numeric field of length 12


Example: “AN 30” indicates an alphanumeric field of length 30
Example: “X +N11” indicates a signed numeric field, like
‘+00000500000’ indicates 500000 and
‘-00000500000’ indicates -500000

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 5


UBPS WEB Service Message Interface for an Aggregator

Note: All spaces have been replaced with dots (.) in the sample messages to help visualize the
space characters. This applies to whole document where sample messages / data are written

2.2 MESSAGE FLOW

The flow of messages between web service and a client is similar to a traditional web service
call developed using SOAP. Client sends a request and an advice message to the web service,
and the web service replies with a response message to the calling client.

Transaction and advice Message Flow


The following figure illustrates the transaction message flow between a client and web service.

Client calls a web service method for inquiry. Webs service translates this call to SMPI
message type 0200 and forwards it to the UBPS transaction server. UBPS transaction server
responds to the 0200 message with the message type 0210, which contains an authorized or
denied code in the response code. That response message is then transformed into a web
service response i.e. it is sent to the respective web service as a final response to the caller
application at client side.

Message Flow for Exception Condition Transaction Advice:


If the web service caller receives an invalid response or does not receive a response from the
UBPS web service, then it needs to re-send the same advice with the same transaction
parameters.

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 6


UBPS WEB Service Message Interface for an Aggregator

2.3 BILL INQUIRY

Method Name: BillInquiry


Parameters type: Input request
Padding Rules: Not applied

Field Length Mandatory


Field Name Format Description
sequence (Max) [Y / N]

UserID AN 1 16 Y To authenticate client connecting to UBPS

Pwd ANSX 2 16 Y To authenticate client connecting to UBPS

Represents identification for client institution. Like


ClientID AN 3 10 Y For HBL HBLPAK
For SCB SCB001

00000000 == ATM,
00000001 == IVR
00000002 == Call Center
00000003 == Web
00000004 == SmartATM
ChannelID N 4 8 Y
00000005 == POS
00000006 == CDM_CASH
00000007 == Branch
00000008 == MOB
00000009 == BL Banking

STAN N 5 6 Y System Trace Audit Number

Utility company ID that represent a biller. Bill aggregator


entity is the issuing authority for the value in this field.

CompanyCode AN 6 8 Y Like:
SSGC = SSGC0001
WARID = WARID001

It represents customer of biller. System should return the


ConsumerNo AN 7 24 Y single record of latest bill available to pay against a
consumer number

This is Base64 Encoded Variable length string used to


Signature V 8 344 Y perform certificate based encryption to make the
communication secure and reliable

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 7


UBPS WEB Service Message Interface for an Aggregator

Signature:
BillInquiry(string UserID, string Pwd,
string CLientID, string ChannelID,
string STAN, string CompanyCode,
string ConsumerNo, string Signature)

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 8


UBPS WEB Service Message Interface for an Aggregator

Response Message:
Length: 913 Characters (For certificate)
Length: 657 Characters (For SHA 512 Hash)
Parameters type: Output Response
Padding Rules: Applied

Field Mandatory
Field Name Format Length Description
Sequence [Y / N]

This field will decide acceptance or rejection of transaction.


ResponseCode N 1 2 Y Please refer to the section XXXXX having list of response
codes supported by UBPS

CLientID AN 2 10 Y Same as request

ChannelID N 3 8 Y Same as request

STAN N 4 6 Y Same as request

CompanyCode AN 5 8 Y Same as request

ConsumerNo AN 6 24 Y Same as request

CustomerName AN 7 30 Y Customer Name

Possible values are:


U for Unpaid

BillStatus A 8 1 Y P for Paid


T for Partial payment
B for blocked

BillingMonth ANS 9 4 Y YYMM

DueDate ANS 10 6 Y YYMMDD

+0000000050000 means Rs. 500


AmountWithinDueDate NX 11 14 Y
-0000000012050 means Rs. -120.50

+0000000070000 means Rs. 700


AmountAfterDueDate NX 12 14 Y
-0000000085050 means Rs. -850.50

RRN N 13 12 Y Internal retrieval reference number

Response Detail AN 14 430 Y Response Detail 1 and Response Detail 2 from UBPS

Signature / AN 15 344 Base64 Encoded string (right padded with spaces)


Y
HASH AN 15 88 Base64 Encoded string

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 9


UBPS WEB Service Message Interface for an Aggregator

Sample Data for Bill Inquiry response message (384 Bytes) – All
Companies:

00HBL001....00000003444666PTCL0012555555..................Muhammad.Atif.Hafeez..........U0613140613+0
000000050000+0000000055000061311290001atif.1211+0000000027000130430+0000000028000P036634+00
00000000000+0000000000000555555.0000000000000000000000000000201311010000000000000020131101
000000050000................................................................................................................. ...........................................
.......................................................................................................................VPeAaqDj eB6397mwvfPyJ9PTTHj
vvR1ijNVukoWwe4b4lH5WrXPYeSkE7WftP77YIu0QcQ4xbWeDaVVtO7PlPbBBDJt5xVws4zLA5On3
LjNki4RvpNxZ9DhYebWkEThtelHJnTV1cLqInPv+OVmtJ8pjO8NeVEko9PN38dH0g0HGDQW8biWJ
a2brQW07j2wxP81xYNzoKn8kv7r+jJBS0teJWb4I7u8Ckx8MOOcgXYTmVLhdd45UYtBif7cC5/a+VTvV
OMpwlbnAagh+yHrh1XZIXWf6BoQBgIZYtGThrjcPGKtWwffwx8ckzH+VDQW5ju7YyRhEs2RYzT3l
x+8Lag==

Response Data Elements:


ResponseCode [00]
CLientID [HBL001....]
ChannelID [00000003]
STAN [444666]
CompanyCode [PTCL0012]
ConsumerNo [555555..................]
CustomerName [Muhammad.Atif.Hafeez..........]
BillStatus [U]
BillingMonth [0613]
DueDate [140613]
AmountWithinDueDate [+0000000050000]
AmountAfterDueDate [+0000000055000]
RRN [061311290001]
ResponseDetail
[atif.1211+0000000027000130430+0000000028000
P036634+0000000000000+0000000000000555555.0000000000000000000000000000201311010000
000000000020131101000000050000........................................................................................................
....................................................................................................................................................................
.......]

SignedHash of above response data elements:


H0tj4jdFtBYYQAkeaNc0mt0ytCKwiQs9lm/wmpJVOm29J0bDdpMlDED9RuTPAtTP8eEFH7W+pe3D/
0GOpG1xkws8ek0MjqtzY3dtoMQTx+ux3mFlcMXWUzwdTEYdG1OeKP2dpNXA75IvyRWO9AIiEcN
Z1k3lsrAtH02QM1TFaZ8BXKBfIpHCCF2s032HtOUgnHVlOMDsnPsL/aPwsq4NiZ/lWjd6OoFZ0V3M
z0OV1TQuAgMWqO69GUwrHu8Tpnh2HK44OYGRWDnOkhZDkYNEiYN2zGHR4aykiPqbYMuJQ
XcWIFQS/gqHhgc9sDHg5+qvv+X1VCUL6MqokoxtW6ikWQ==

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 10


UBPS WEB Service Message Interface for an Aggregator

2.4 BILL INQUIRY WITH RESERVED FIELD

Method Name: BillInquiryWithReservedField


Parameters type: Input request
Padding Rules: Not applied

Field Length Mandatory


Field Name Format Description
sequence (Max) [Y / N]

UserID AN 1 16 Y To authenticate client connecting to UBPS

Pwd ANSX 2 16 Y To authenticate client connecting to UBPS

Represents identification for client institution. Like


ClientID AN 3 10 Y For HBL HBLPAK
For SCB SCB001

00000000 == ATM,
00000001 == IVR
00000002 == Call Center
00000003 == Web
00000004 == SmartATM
ChannelID N 4 8 Y
00000005 == POS
00000006 == CDM_CASH
00000007 == Branch
00000008 == MOB
00000009 == BL Banking

STAN N 5 6 Y System Trace Audit Number

Utility company ID that represent a biller. Bill aggregator


entity is the issuing authority for the value in this field.

CompanyCode AN 6 8 Y Like:
SSGC = SSGC0001
WARID = WARID001

It represents customer of biller. System should return the


ConsumerNo AN 7 24 Y single record of latest bill available to pay against a
consumer number

This is Base64 Encoded Variable length string used to


Signature V 9 344 Y perform certificate based encryption to make the
communication secure and reliable

Reserved field will be mapped into relevant data fields of


SPMI which will be forwarded to UBPS. The new reserved
ReservedField ANSX 8 400 N parameter takes key value pairs separated by “,” as input
and further separated by “|” between multiple fields.
Example of usage is mentioned below:

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 11


UBPS WEB Service Message Interface for an Aggregator

CustomerId, 476215******1637 | DeliveryChannelId,1234


Reserved Field value will also be included in HASH
calculation

ReservedField For Inquiry Data Data


Field Break-up Length
Type
NIC 13 Numeric 1111111111111
ResponseDetail1, 383883838383883
111111111111138388383838388383 Account Id 28 Numeric
8383883838838
|ResponseDetail2, 1010101010
BranchCode 10 Numeric
838838388381010101010Standard
Chartered Bank Pakistan KH Pivate Standard
Limited Chartered Bank
BranchName 50
Pakistan KH
Reserved Field value will also be included in
HASH calculation Pivate Limited
Supporting Empty spaces
140 -
Information 1
Empty spaces

Supporting
159 -
Information 2

Signature:
BillInquiryWithReservedField(string UserID, string Pwd,
string CLientID, string ChannelID,
string STAN, string CompanyCode,
string ConsumerNo, string Signature,

string ReservedField)

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 12


UBPS WEB Service Message Interface for an Aggregator

Response Message:
Length: 913 Characters (For certificate)
Length: 657 Characters (For SHA 512 Hash)
Parameters type: Output Response
Padding Rules: Applied

Field Mandatory
Field Name Format Length Description
Sequence [Y / N]

This field will decide acceptance or rejection of transaction.


ResponseCode N 1 2 Y Please refer to the section XXXXX having list of response
codes supported by UBPS

CLientID AN 2 10 Y Same as request

ChannelID N 3 8 Y Same as request

STAN N 4 6 Y Same as request

CompanyCode AN 5 8 Y Same as request

ConsumerNo AN 6 24 Y Same as request

CustomerName AN 7 30 Y Customer Name

Possible values are:


U for Unpaid

BillStatus A 8 1 Y P for Paid


T for Partial payment
B for blocked

BillingMonth ANS 9 4 Y YYMM

DueDate ANS 10 6 Y YYMMDD

+0000000050000 means Rs. 500


AmountWithinDueDate NX 11 14 Y
-0000000012050 means Rs. -120.50

+0000000070000 means Rs. 700


AmountAfterDueDate NX 12 14 Y
-0000000085050 means Rs. -850.50

RRN N 13 12 Y Internal retrieval reference number

Response Detail AN 14 430 Y Response Detail 1 and Response Detail 2 from UBPS

Signature / AN 15 344 Base64 Encoded string (right padded with spaces)


Y
HASH AN 15 88 Base64 Encoded string

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 13


UBPS WEB Service Message Interface for an Aggregator

Sample Data for Bill Inquiry response message (384 Bytes) – All
Companies:

00HBL001....00000003444666PTCL0012555555..................Muhammad.Atif.Hafeez..........U0613140613+0
000000050000+0000000055000061311290001atif.1211+0000000027000130430+0000000028000P036634+00
00000000000+0000000000000555555.0000000000000000000000000000201311010000000000000020131101
000000050000................................................................................................................. ...........................................
.......................................................................................................................VPeAaqDjeB6397mwvfPyJ9PTTHj
vvR1ijNVukoWwe4b4lH5WrXPYeSkE7WftP77YIu0QcQ4xbWeDaVVtO7PlPbBBDJt5xVws4zLA5On3
LjNki4RvpNxZ9DhYebWkEThtelHJnTV1cLqInPv+OVmtJ8pjO8NeVEko9PN38dH0g0HGDQW8biWJ
a2brQW07j2wxP81xYNzoKn8kv7r+jJBS0teJWb4I7u8Ckx8MOOcgXYTmVLhdd45UYtBif7cC5/a+VTvV
OMpwlbnAagh+yHrh1XZIXWf6BoQBgIZYtGThrjcPGKtWwffwx8ckzH+VDQW5ju7YyRhEs2RYzT3l
x+8Lag==

Response Data Elements:


ResponseCode [00]
CLientID [HBL001....]
ChannelID [00000003]
STAN [444666]
CompanyCode [PTCL0012]
ConsumerNo [555555..................]
CustomerName [Muhammad.Atif.Hafeez..........]
BillStatus [U]
BillingMonth [0613]
DueDate [140613]
AmountWithinDueDate [+0000000050000]
AmountAfterDueDate [+0000000055000]
RRN [061311290001]
ResponseDetail
[atif.1211+0000000027000130430+0000000028000
P036634+0000000000000+0000000000000555555.0000000000000000000000000000201311010000
000000000020131101000000050000........................................................................................................
....................................................................................................................................................................
.......]

SignedHash of above response data elements:


H0tj4jdFtBYYQAkeaNc0mt0ytCKwiQs9lm/wmpJVOm29J0bDdpMlDED9RuTPAtTP8eEFH7W+pe3D/
0GOpG1xkws8ek0MjqtzY3dtoMQTx+ux3mFlcMXWUzwdTEYdG1OeKP2dpNXA75IvyRWO9AIiEcN
Z1k3lsrAtH02QM1TFaZ8BXKBfIpHCCF2s032HtOUgnHVlOMDsnPsL/aPwsq4NiZ/lWjd6OoFZ0V3M

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 14


UBPS WEB Service Message Interface for an Aggregator

z0OV1TQuAgMWqO69GUwrHu8Tpnh2HK44OYGRWDnOkhZDkYNEiYN2zGHR4aykiPqbYMuJQ
XcWIFQS/gqHhgc9sDHg5+qvv+X1VCUL6MqokoxtW6ikWQ==

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 15


UBPS WEB Service Message Interface for an Aggregator

2.5 BILL PAYMENT

Method Name: Bill Payment


Parameters type: Input request
Padding Rules: Not applied
Field Length Mandatory
Field Name Format Description
Sequence (Max) [Y / N]

UserID AN 1 16 Y To authenticate client connecting to UBPS

Pwd ANSX 2 16 Y To authenticate client connecting to UBPS

Represents identification for client institution. Like


CLientID AN 3 10 Y
HBLPAK, SCB001 etc

00000000 == ATM,
00000001 == IVR
00000002 == Call Center
00000003 == Web
00000004 == SmartATM
ChannelID N 4 8 Y
00000005 == POS
00000006 == CDM_CASH
00000007 == Branch
00000008 == MOB
00000009 == BL Banking

STAN N 5 6 Y System Trace Audit Number

Utility company ID that represent a biller. Bill aggregator


CompanyCode AN 6 8 Y entity is the issuing authority for the value in this field.
Like: SSGC0001 for SSGC, WARID001 for WARID

It represents customer of biller. System should return the


ConsumerNo AN 7 24 Y single record of latest bill available to pay against a
consumer number

Treated as transaction reference number. Included in keys


AuthID N 8 6 Y
used to uniquely identify a transaction

Rs. 5000.00 will appear as “500000”,


Amount XN 9 12 Y
Rs. 3593.50 will appear as “359350”

TransactionDateTime N 10 14 Y Format: yyyyMMddHHmmss. Like 20140313154530

Signature ANSX 11 344 Y Variable length Base64 Encoded string

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 16


UBPS WEB Service Message Interface for an Aggregator

Signature:
BillPayment(string UserID, string Pwd,
string CLientID, string ChanneID,
string STAN, string CompanyCode,
string ConsumerNo, string AuthID,
string Amount,
string TransactionDateTime,
string Signature)

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 17


UBPS WEB Service Message Interface for an Aggregator

Response Message
Length: 850 Characters (For certificate)
Length: 594 Characters (For SHA 512 Hash)
Parameters type: Output Response
Padding Rules: Applied

Field Mandatory
Field Name Format Length Description
Sequence [Y / N]

This field will decide acceptance or rejection of transaction.


Response Code N 1 2 Y Please refer to the section XXXXX having list of response
codes supported by UBPS

CLientID AN 2 10 Y Same as request

ChannelID N 3 8 Y Same as request

STAN N 4 6 Y Same as request

CompanyCode AN 5 8 Y Same as request

ConsumerNo AN 6 24 Y Same as request

AuthID N 7 6 Y Same as request

RRN N 8 12 Y Internal retrieval reference number

Response Detail AN 9 430 Y Response Detail 1 and Response Detail 2 from UBPS

Signature / ANSX 10 344 Base64 Encoded string (right padded with spaces)
Y
HASH AN 10 88 Base64 Encoded string

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 18


UBPS WEB Service Message Interface for an Aggregator

Sample Data
Bill Payment response message (420 Bytes) for all Companies:

00HBL001....00000003444666PTCL0012555555..................112233061311290001..............................................
....................................................................................................................................................................................
....................................................................................................................................................................................
........................tAHBuBE2JK/zIr8FvnxklcxmcrH9lbRnRHLNE0ZCmn63ZfYfKSDX/DLNk6eeSQaFreQZ
FNsIaRaKnm9Oh5S9rlhI7TmmsotIq8MB5aow8i1PSo6L13x9omlRNyc4hhsSmc378VjPKzS4pH0P2BEE
0ur1/rnWqP4eBEuiAWM2itNlZZzbdBjBFA38DELZNmB29sdfAviD4E9ZUN6wIgcuf2loDepjEr16R1M
VLH1fvTAmsUCvL1yjH7M/050Bt7/TqniuAg6uihVEZskA91ubR6/9eM7t3qNdxgVLO+3cUrgJu/tjhWR
sg92PbfIvIV4f7+Gz4SFe5wf23yr0aHZ+OQ==

Sample XML:

<?xml version="1.0" encoding="utf-8" ?>


<string
xmlns="http://tempuri.org/">00HBL001....00000003444666PTCL0012555555...
...............112233061311290001.......................................................................
.....................................................................................................................
.....................................................................................................................
.....................................................................................................................
........tAHBuBE2JK/zIr8FvnxklcxmcrH9lbRnRHLNE0ZCmn63ZfYfKSDX/DLNk6eeSQaFr
eQZFNsIaRaKnm9Oh5S9rlhI7TmmsotIq8MB5aow8i1PSo6L13x9omlRNyc4hhsSmc37
8VjPKzS4pH0P2BEE0ur1/rnWqP4eBEuiAWM2itNlZZzbdBjBFA38DELZNmB29sdfAviD4
E9ZUN6wIgcuf2loDepjEr16R1MVLH1fvTAmsUCvL1yjH7M/050Bt7/TqniuAg6uihVEZsk
A91ubR6/9eM7t3qNdxgVLO+3cUrgJu/tjhWRsg92PbfIvIV4f7+Gz4SFe5wf23yr0aHZ+
OQ==</string>

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 19


UBPS WEB Service Message Interface for an Aggregator

Response Data Elements:

Response Code [00]


CLientID [HBL001....]
ChannelID [00000003]
STAN [444666]
CompanyCode [PTCL0012]
ConsumerNo [555555..................]
AuthID [112233]
RRN [061311290001]
ResponseDetail
[............................................................................................
..............................................................................................
..............................................................................................
..............................................................................................
........................................................]

SignedHash of above response data elements:

tAHBuBE2JK/zIr8FvnxklcxmcrH9lbRnRHLNE0ZCmn63ZfYfKSDX/DLNk6eeSQaFreQZFNsIaRaKnm
9Oh5S9rlhI7TmmsotIq8MB5aow8i1PSo6L13x9omlRNyc4hhsSmc378VjPKzS4pH0P2BEE0ur1/rnWqP4
eBEuiAWM2itNlZZzbdBjBFA38DELZNmB29sdfAviD4E9ZUN6wIgcuf2loDepjEr16R1MVLH1fvTAm
sUCvL1yjH7M/050Bt7/TqniuAg6uihVEZskA91ubR6/9eM7t3qNdxgVLO+3cUrgJu/tjhWRsg92PbfIvIV
4f7+Gz4SFe5wf23yr0aHZ+OQ==

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 20


UBPS WEB Service Message Interface for an Aggregator

2.6 BILL PAYMENT WITH RESERVED FIELD

Method Name: BillPaymentWithReservedField


Parameters type: Input request
Padding Rules: Not applied
Field Length Mandatory
Field Name Format Description
Sequence (Max) [Y / N]

UserID AN 1 16 Y To authenticate client connecting to UBPS

Pwd ANSX 2 16 Y To authenticate client connecting to UBPS

Represents identification for client institution. Like


CLientID AN 3 10 Y
HBLPAK, SCB001 etc

00000000 == ATM,
00000001 == IVR
00000002 == Call Center
00000003 == Web
00000004 == SmartATM
ChannelID N 4 8 Y
00000005 == POS
00000006 == CDM_CASH
00000007 == Branch
00000008 == MOB
00000009 == BL Banking

STAN N 5 6 Y System Trace Audit Number

Utility company ID that represent a biller. Bill aggregator


CompanyCode AN 6 8 Y entity is the issuing authority for the value in this field.
Like: SSGC0001 for SSGC, WARID001 for WARID

It represents customer of biller. System should return the


ConsumerNo AN 7 24 Y single record of latest bill available to pay against a
consumer number

Treated as transaction reference number. Included in keys


AuthID N 8 6 Y
used to uniquely identify a transaction

Rs. 5000.00 will appear as “500000”,


Amount XN 9 12 Y
Rs. 3593.50 will appear as “359350”

TransactionDateTime N 10 14 Y Format: yyyyMMddHHmmss. Like 20140313154530

Signature ANSX 11 344 Y Variable length Base64 Encoded string

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 21


UBPS WEB Service Message Interface for an Aggregator

Reserved field will be mapped into relevant data fields of


SPMI which will be forwarded to UBPS. The new reserved
parameter takes key value pairs separated by “,” as input
and further separated by “|” between multiple fields.
ReservedField ANSX 8 400 N Example of usage is mentioned below:
CustomerId, 476215******1637 | DeliveryChannelId,1234
Reserved Field value will also be included in HASH
calculation

ReservedField Parsing For Payment Data Data


Field Break-up Length
Type
NIC 13 Numeric 3838838383838
ResponseDetail1, City Karachikharchikhar
3838838383838Karachikharchikha 30 AN(X)
chikharchikh
|ResponseDetail2, PunjabPunjabPunja
rchikharchikhPunjabPunjabPunjabPa Province 20 AN(X)
bPa
38388383838388383838838388381
010101010Standard Chartered Bank 383883838383883
Account Id 28 Numeric
Pakistan KH Pivate Limited 8383883838838
BranchCode 10 Numeric 1010101010
Reserved Field value will also be included in Standard
HASH calculation Chartered Bank
BranchName 50
Pakistan KH
Pivate Limited
fromAccountType 2 N(X)
fromAccountTitle 30 AN(X)
Supporting
140 -
Information 1

Supporting
77 -
Information 2

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 22


UBPS WEB Service Message Interface for an Aggregator

Signature:
BillPaymentWithReservedField(string UserID, string Pwd,
string CLientID, string ChanneID,
string STAN, string CompanyCode,
string ConsumerNo, string AuthID,
string Amount,
string TransactionDateTime,
string Signature , string ReservedField)

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 23


UBPS WEB Service Message Interface for an Aggregator

Response Message
Length: 850 Characters (For certificate)
Length: 594 Characters (For SHA 512 Hash)
Parameters type: Output Response
Padding Rules: Applied

Field Mandatory
Field Name Format Length Description
Sequence [Y / N]

This field will decide acceptance or rejection of transaction.


Response Code N 1 2 Y Please refer to the section XXXXX having list of response
codes supported by UBPS

CLientID AN 2 10 Y Same as request

ChannelID N 3 8 Y Same as request

STAN N 4 6 Y Same as request

CompanyCode AN 5 8 Y Same as request

ConsumerNo AN 6 24 Y Same as request

AuthID N 7 6 Y Same as request

RRN N 8 12 Y Internal retrieval reference number

Response Detail AN 9 430 Y Response Detail 1 and Response Detail 2 from UBPS

Signature / ANSX 10 344 Base64 Encoded string (right padded with spaces)
Y
HASH AN 10 88 Base64 Encoded string

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 24


UBPS WEB Service Message Interface for an Aggregator

Sample Data
Bill Payment response message (420 Bytes) for all Companies:

00HBL001....00000003444666PTCL0012555555..................112233061311290001..............................................
....................................................................................................................................................................................
....................................................................................................................................................................................
........................tAHBuBE2JK/zIr8FvnxklcxmcrH9lbRnRHLNE0ZCmn63ZfYfKSDX/DLNk6eeSQaFreQZ
FNsIaRaKnm9Oh5S9rlhI7TmmsotIq8MB5aow8i1PSo6L13x9omlRNyc4hhsSmc378VjPKzS4pH0P2BEE
0ur1/rnWqP4eBEuiAWM2itNlZZzbdBjBFA38DELZNmB29sdfAviD4E9ZUN6wIgcuf2loDepjEr16R1M
VLH1fvTAmsUCvL1yjH7M/050Bt7/TqniuAg6uihVEZskA91ubR6/9eM7t3qNdxgVLO+3cUrgJu/tjhWR
sg92PbfIvIV4f7+Gz4SFe5wf23yr0aHZ+OQ==

Sample XML:

<?xml version="1.0" encoding="utf-8" ?>


<string
xmlns="http://tempuri.org/">00HBL001....00000003444666PTCL0012555555...
...............112233061311290001.......................................................................
.....................................................................................................................
.....................................................................................................................
.....................................................................................................................
........tAHBuBE2JK/zIr8FvnxklcxmcrH9lbRnRHLNE0ZCmn63ZfYfKSDX/DLNk6eeSQaFr
eQZFNsIaRaKnm9Oh5S9rlhI7TmmsotIq8MB5aow8i1PSo6L13x9omlRNyc4hhsSmc37
8VjPKzS4pH0P2BEE0ur1/rnWqP4eBEuiAWM2itNlZZzbdBjBFA38DELZNmB29sdfAviD4
E9ZUN6wIgcuf2loDepjEr16R1MVLH1fvTAmsUCvL1yjH7M/050Bt7/TqniuAg6uihVEZsk
A91ubR6/9eM7t3qNdxgVLO+3cUrgJu/tjhWRsg92PbfIvIV4f7+Gz4SFe5wf23yr0aHZ+
OQ==</string>

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 25


UBPS WEB Service Message Interface for an Aggregator

Response Data Elements:

Response Code [00]


CLientID [HBL001....]
ChannelID [00000003]
STAN [444666]
CompanyCode [PTCL0012]
ConsumerNo [555555..................]
AuthID [112233]
RRN [061311290001]
ResponseDetail
[............................................................................................
..............................................................................................
..............................................................................................
..............................................................................................
........................................................]

SignedHash of above response data elements:

tAHBuBE2JK/zIr8FvnxklcxmcrH9lbRnRHLNE0ZCmn63ZfYfKSDX/DLNk6eeSQaFreQZFNsIaRaKnm
9Oh5S9rlhI7TmmsotIq8MB5aow8i1PSo6L13x9omlRNyc4hhsSmc378VjPKzS4pH0P2BEE0ur1/rnWqP4
eBEuiAWM2itNlZZzbdBjBFA38DELZNmB29sdfAviD4E9ZUN6wIgcuf2loDepjEr16R1MVLH1fvTAm
sUCvL1yjH7M/050Bt7/TqniuAg6uihVEZskA91ubR6/9eM7t3qNdxgVLO+3cUrgJu/tjhWRsg92PbfIvIV
4f7+Gz4SFe5wf23yr0aHZ+OQ==

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 26


UBPS WEB Service Message Interface for an Aggregator

2.7 VOID PAID BILL

Method Name: VoidPaidBill


Parameters type: Input request
Padding Rules: Not applied
Field Length Mandatory
Field Name Format Description
Sequence (Max) [Y / N]

UserID AN 1 16 Y To authenticate client connecting to UBPS

Pwd ANSX 2 16 Y To authenticate client connecting to UBPS

Represents identification for client institution. Like


CLientID AN 3 10 Y
HBLPAK, SCB001 etc

00000000 == ATM,
00000001 == IVR
00000002 == Call Center
00000003 == Web
00000004 == SmartATM
ChannelID N 4 8 Y
00000005 == POS
00000006 == CDM_CASH
00000007 == Branch
00000008 == MOB
00000009 == BL Banking

STAN N 5 6 Y System Trace Audit Number

Utility company ID that represent a biller. Bill aggregator


CompanyCode AN 6 8 Y entity is the issuing authority for the value in this field.
Like: SSGC0001 for SSGC, WARID001 for WARID

It represents customer of biller. System should return the


ConsumerNo AN 7 24 Y single record of latest bill available to pay against a
consumer number

Treated as transaction reference number. Included in


AuthID N 8 6 Y
keys used to uniquely identify a transaction

Rs. 5000.00 will appear as “500000”,


Amount XN 9 12 Y
Rs. 3593.50 will appear as “359350”

TransactionDateTime N 10 14 Y Format: yyyyMMddHHmmss. Like 20140313154530

Signature ANSX 11 344 Y Variable length Base64 Encoded string

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 27


UBPS WEB Service Message Interface for an Aggregator

Signature:
BillPayment(string UserID, string Pwd,
string CLientID, string ChanneID,
string STAN, string CompanyCode,
string ConsumerNo, string AuthID,
string Amount,
string TransactionDateTime,
string Signature)

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 28


UBPS WEB Service Message Interface for an Aggregator

Response Message
Length: 850 Characters (For certificate)
Length: 594 Characters (For SHA 512 Hash)

Parameters type: Output Response


Padding Rules: Applied

Field Mandatory
Field Name Format Length Description
Sequence [Y / N]

This field will decide acceptance or rejection of transaction.


Response Code N 1 2 Y Please refer to the section XXXXX having list of response
codes supported by UBPS

CLientID AN 2 10 Y Same as request

ChannelID N 3 8 Y Same as request

STAN N 4 6 Y Same as request

CompanyCode AN 5 8 Y Same as request

ConsumerNo AN 6 24 Y Same as request

AuthID N 7 6 Y Same as request

RRN N 8 12 Y Internal retrieval reference number

Signature / ANSX 10 344 Base64 Encoded string (right padded with spaces)
Y
HASH AN 10 88 Base64 Encoded string

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 29


UBPS WEB Service Message Interface for an Aggregator

2.8 VOID PAID BILL WITH RESERVED FIELD

Method Name: VoidBillPaymentWithReservedField


Parameters type: Input request
Padding Rules: Not applied
Field Length Mandatory
Field Name Format Description
Sequence (Max) [Y / N]

UserID AN 1 16 Y To authenticate client connecting to UBPS

Pwd ANSX 2 16 Y To authenticate client connecting to UBPS

Represents identification for client institution. Like


CLientID AN 3 10 Y
HBLPAK, SCB001 etc

00000000 == ATM,
00000001 == IVR
00000002 == Call Center
00000003 == Web
00000004 == SmartATM
ChannelID N 4 8 Y
00000005 == POS
00000006 == CDM_CASH
00000007 == Branch
00000008 == MOB
00000009 == BL Banking

STAN N 5 6 Y System Trace Audit Number

Utility company ID that represent a biller. Bill aggregator


CompanyCode AN 6 8 Y entity is the issuing authority for the value in this field.
Like: SSGC0001 for SSGC, WARID001 for WARID

It represents customer of biller. System should return the


ConsumerNo AN 7 24 Y single record of latest bill available to pay against a
consumer number

Treated as transaction reference number. Included in


AuthID N 8 6 Y
keys used to uniquely identify a transaction

Rs. 5000.00 will appear as “500000”,


Amount XN 9 12 Y
Rs. 3593.50 will appear as “359350”

TransactionDateTime N 10 14 Y Format: yyyyMMddHHmmss. Like 20140313154530

Signature ANSX 11 344 Y Variable length Base64 Encoded string

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 30


UBPS WEB Service Message Interface for an Aggregator

Reserved field will be mapped into relevant data fields of


SPMI which will be forwarded to UBPS. The new reserved
parameter takes key value pairs separated by “,” as input
and further separated by “|” between multiple fields.
ReservedField ANSX 8 400 N Example of usage is mentioned below:
CustomerId, 476215******1637 | DeliveryChannelId,1234
Reserved Field value will also be included in HASH
calculation

Response Message Detail for


Signature:
VoidBillPaymentWithReservedField(string UserID, string Pwd,
string CLientID, string ChanneID,
string STAN, string CompanyCode,
string ConsumerNo, string AuthID,
string Amount,
string TransactionDateTime,
string Signature, string ReservedField)

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 31


UBPS WEB Service Message Interface for an Aggregator

Response Message
Length: 850 Characters (For certificate)
Length: 594 Characters (For SHA 512 Hash)

Parameters type: Output Response


Padding Rules: Applied

Field Mandatory
Field Name Format Length Description
Sequence [Y / N]

This field will decide acceptance or rejection of transaction.


Response Code N 1 2 Y Please refer to the section XXXXX having list of response
codes supported by UBPS

CLientID AN 2 10 Y Same as request

ChannelID N 3 8 Y Same as request

STAN N 4 6 Y Same as request

CompanyCode AN 5 8 Y Same as request

ConsumerNo AN 6 24 Y Same as request

AuthID N 7 6 Y Same as request

RRN N 8 12 Y Internal retrieval reference number

Signature / ANSX 10 344 Base64 Encoded string (right padded with spaces)
Y
HASH AN 10 88 Base64 Encoded string

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 32


UBPS WEB Service Message Interface for an Aggregator

2.9 DETAIL OF RESPONSE DETAIL FIELD

Method Name: BillInquiry

Following is a list of response detail for each utility company in the Bill Inquiry response
message.

Response Message Detail for Non-Telco’s


Field Mandatory
Field Name Format Length Description
Sequence [Y / N]
General Utility Bill Information

Subscriber Name AN 1 30 Y Name of the utility customer

Billing Month N 2 4 Y YYMM


Total Amount payable within due date,
Amount Within Due Date XN 3 14 Y
inclusive of all taxes and arrears
Last date for payment formatted as:
Payment Due Date N 4 6 Y
YYMMDD
Amount After Due Date XN 5 14 Y
P = Paid
U = Unpaid
Bill Status A 6 1 Y
B = Unpaid but Blocked for Payment
T = In case of partial payment
Payment Auth Response Id AN 7 6 Y Filled only if Bill Status is “P”
Total GST/CED in the total payable
Net CED XN 8 13 Y
amount
Total WHT amount in the total payable
Net Withholding Tax XN 9 13 Y
amount
Utility company specific bill
Additional Data var. 10
information

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 33


UBPS WEB Service Message Interface for an Aggregator

Response Message Detail for Telco’s


Forma Field Mandator
Field Name Length Description
t Sequence y [Y / N]
General Utility Bill Information
Connection Type AN 1 30 Y Prepaid/Postpaid/Retailer
For prepaid, White space
Billing Month A 2 4 Y
For postpaid, YYMM
Total Amount payable within due date, inclusive of all taxes and
arrears
Total Amount Payable
XN 3 13 Y
Within Due Date Amount Value will be returned in case of postpaid

for prepaid/retailer Amount Value set 0


Last date for payment formatted as: YYMMDD

Payment Due Date N 4 6 Y Due date return in case of Post Paid

For Prepaid/Retailer “000000” is send


Total Amount payable after due date, inclusive of all taxes and
arrears
Total Amount Payable
XN 5 13 Y
After Due Date Amount Value will be return in case of postpaid

for prepaid/retailer Amount Value set 0


P = Paid
U = Unpaid
Bill Status A 6 1 Y
B = Unpaid but Blocked for Payment
T = In case of partial payment
Response Code AN 7 2 Y In case of postpaid only else white space

Response Message Detail for Charity


Field
Field Name Format Length Mandatory [Y /N] Description
Sequence
General Utility Bill Information
Company Name AN 1 30 Y Name of the utility company

Response Message Detail for EPAY

Field Mandatory
Field Name Format Length Description
Sequence [Y / N]
General Utility Bill Information
zeroes N 1 430 Y

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 34


UBPS WEB Service Message Interface for an Aggregator

Additional Data
PTCLOnline Specific Bill Information for DEFAULTER, EVOPOST and PSTN
Forma Field Mandator
Field Name Length Description
t Sequence y [Y / N]
Customer Name A 1 30 Y Name of utility customer

Billing Month N 2 2 Y Month of the year for which customer is being billed

Amount Before DD N 3 12 Y Requested bill amount if the due date has not passed

Due Date N 4 6 Y YYMMDD

Amount After DD N 5 12 Y Requested bill amount if the due date has passed

Additional Data
PTCL Specific Bill Information
Forma Field Mandatory
Field Name Length Description
t Sequence [Y / N]
Consumer Number N 1 13 Y Utility Company Account Number for the customer

Current Charges N 2 14 Y Charges for current billing period (eg: month)

Arrears N 3 13 Y Previous unpaid charges

Closing Date N 4 8 Y Date which payment was closed

Surcharge N 5 13 Y Any additional charges that are applicable


Date on which the payment was made. Formatted as
CCYYMMDD.
Date Paid N 6 8 Y
Filled only if Bill Status is “P”
Amount Paid N 7 12 Y Filled only if Bill Status is “P”

Additional Data
MOBILINK Specific Bill Information
Field Mandator
Field Name Format Length Description
Sequence y [Y / N]
Consumer Name A 1 30 Y All Spaces

For prepaid, White space


Billing Month A 2 4 Y
For postpaid, YYMM

[1]+ or – sign

Amount Before DD AN 3 14 Y [11] Amount in rupees with leading zeroes

[2] Amount in Paisa’s with leading zero

Due Date A 4 6 Y All Spaces

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 35


UBPS WEB Service Message Interface for an Aggregator

+0000000010000 means 100.00, -0000000000000

Amount After DD AN 5 14 Y [1]+ or – sign

[11] Amount in rupees with leading zeroes

[2] Amount in Paisa’s with leading zero


Constant A 6 1 Y Constant value ‘T’

Additional Data
SSGC Specific Bill Information
Field Mandator
Field Name Format Length Description
Sequence y [Y / N]
Consumer Number N 1 10 Y Utility Company Account Number
Current Charges N 2 14 Y Charges for current billing period (eg: month)
Arrears N 3 14 Y Previous unpaid charges
Closing Date N 4 8 Y Date which payment was closed
Surcharge N 5 13 Y Any additional charges that are applicable
Date on which the payment was made. Formatted as CCYYMMDD.
Date Paid N 6 8 Y
Filled only if Bill Status is “P”
Amount Paid N 7 12 Y Amount paid. Filled only if Bill Status is “P”

Additional Data
SNGPL Specific Bill Information
Field Lengt Mandator
Field Name Format Description
Sequence h y [Y / N]
Date on which the payment was made. Formatted as
Date Paid N 1 8 Y
CCYYMMDD. Filled only if Bill Status is “P”
Amount Paid N 2 12 Y Amount paid. Filled only if Bill Status is “P”

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 36


UBPS WEB Service Message Interface for an Aggregator

Additional Data
GEPCO Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Consumer Number N 1 14 Y Utility Company Account Number
Date on which the payment was made. Formatted as
Date Paid N 2 8 Y
CCYYMMDD. Filled only if Bill Status is “P”
Amount Paid N 3 12 Y Amount paid. Filled only if Bill Status is “P”

Additional Data
LESCO Specific Bill Information
Field Mandatory [Y /
Field Name Format Length Description
Sequence N]
Consumer Number N 1 10 Y Utility Company Account Number
Current Charges N 2 14 Y Charges for current billing period (eg: month)
Arrears N 3 13 Y Previous unpaid charges
Closing Date N 4 8 Y Date which payment was closed
Surcharge N 5 13 Y Any additional charges that are applicable
Date on which the payment was made. Formatted as
Date Paid N 6 8 Y
CCYYMMDD. Filled only if Bill Status is “P”
Amount Paid N 7 12 Y Amount paid. Filled only if Bill Status is “P”

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 37


UBPS WEB Service Message Interface for an Aggregator

Additional Data
KESC Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Consumer Number N 1 12 Y Utility Company Account Number
Current Charges N 2 14 Y Charges for current billing period (eg: month)
Arrears XN 3 13 Y Previous unpaid charges
Closing Date N 4 8 Y Date which payment was closed
Surcharge N 5 13 Y Any additional charges that are applicable
Date on which the payment was made. Formatted as
Date Paid N 6 8 Y
CCYYMMDD. Filled only if Bill Status is “P”
Amount Paid N 7 12 Y Amount paid. Filled only if Bill Status is “P”

Additional Data
HESCO Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Consumer Number N 1 14 Y Utility Company Account Number
Date on which the payment was made. Formatted as
Date Paid N 2 8 Y
CCYYMMDD. Filled only if Bill Status is “P”
Amount Paid N 3 12 Y Amount paid. Filled only if Bill Status is “P”

Additional Data
FESCO Specific Bill Information
Field
Field Name Format Sequenc Length Mandatory [Y / N] Description
e
Consumer Number N 1 14 Y Utility Company Account Number
Date on which the payment was made. Formatted as
Date Paid N 2 8 Y
CCYYMMDD. Filled only if Bill Status is “P”
Amount Paid N 3 12 Y Amount paid. Filled only if Bill Status is “P”

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 38


UBPS WEB Service Message Interface for an Aggregator

Additional Data
IESCO Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Consumer Number N 1 14 Y Utility Company Account Number
Date on which the payment was made. Formatted as
Date Paid N 2 8 Y
CCYYMMDD. Filled only if Bill Status is “P”
Amount Paid N 3 12 Y Amount paid. Filled only if Bill Status is “P”

Additional Data
MEPCO Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Consumer Number N 1 14 Y Utility Company Account Number
Date on which the payment was made. Formatted as
Date Paid N 2 8 Y
CCYYMMDD. Filled only if Bill Status is “P”
Amount Paid N 3 12 Y Amount paid. Filled only if Bill Status is “P”

Additional Data
PESCO Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Consumer Number N 1 14 Y Utility Company Account Number
Date on which the payment was made. Formatted as
Date Paid N 2 8 Y
CCYYMMDD. Filled only if Bill Status is “P”
Amount Paid N 3 12 Y Amount paid. Filled only if Bill Status is “P”

Additional Data
QESCO Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Consumer Number N 1 14 Y Utility Company Account Number
Date on which the payment was made. Formatted as
Date Paid N 2 8 Y
CCYYMMDD. Filled only if Bill Status is “P”
Amount Paid N 3 12 Y Amount paid. Filled only if Bill Status is “P”

Additional Data
MAXCOM Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Consumer Number N 1 14 Y Utility Company Account Number
Date on which the payment was made. Formatted as
Date Paid N 2 8 Y
CCYYMMDD. Filled only if Bill Status is “P”
Amount Paid N 3 12 Y Amount paid. Filled only if Bill Status is “P”

Additional Data
WASA Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Consumer Number N 1 14 Y Utility Company Account Number
Date on which the payment was made. Formatted as
Date Paid N 2 8 Y
CCYYMMDD. Filled only if Bill Status is “P”
Amount Paid N 3 12 Y Amount paid. Filled only if Bill Status is “P”

Additional Data
WITRIBE Specific Bill Information

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 39


UBPS WEB Service Message Interface for an Aggregator

Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Consumer Number N 1 24 Y Utility Company Account Number
Date on which the payment was made. Formatted as
Date Paid N 2 8 Y
CCYYMMDD. Filled only if Bill Status is “P”
Amount Paid N 3 12 Y Amount paid. Filled only if Bill Status is “P”

Additional Data
PIA Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Date on which the payment was made. Formatted as
Date Paid N 1 8 Y
CCYYMMDD. Filled only if Bill Status is “P”
Amount Paid N 2 12 Y Amount paid. Filled only if Bill Status is “P”
Consumer Passenger name record in the reservation system
AN 3 6 Y
Number/PNR No.
Flight No AN 4 6 Y Unique flight number for a particular filght

Flight Date AN 5 7 Y Format ddMMMyy

Additional Data
HBL E SAHULAT Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Date on which the payment was made. Formatted as
Date Paid N 2 8 Y
CCYYMMDD. Filled only if Bill Status is “P”
Amount Paid N 3 12 Y Amount paid. Filled only if Bill Status is “P”

Additional Data
AIRLINE COMPANIES Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
PNR NO AN 1 8 Y PRU87YT6
PAX COUNT N 2 2 Y 02
CONTACT
N 3 14 Y 00923214748600
NUMBER
FLIGHT NUMBER N 4 8 Y PK235856
FLIGHT TIME N 5 10 Y DDMMYYhhmm

Response Message Detail for Loan Inquiry


Response Detail Parsing for Loan Payment Field Break-up Length Data Type
Response Detail (430) Alphabetic with
ConsumerName 30
spaces
BillingMonth 4 yymm
AmountWithinDD (Amount per SN(X)2
Response Detail 1 and Response Detail 2 from UBPS 14
installment/ Due Amount)
DueDate 6 yymmdd
AmountAfterDD (Amount per SN(X)2
14
installment/ Due Amount)
BillStatus 1 Numeric
PaymentAuthResponseID 6 AlphaNumeric
NetCED 14 SN(X)2
NetWitholdingTax 14 SN(X)2
Total loan amount 12 N(X)2
Total outstanding amount 12 N(X)2

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 40


UBPS WEB Service Message Interface for an Aggregator

Fee Amount 12 N(X)2


Max Limit 12 N(X)2
min Limit 12 N(X)2
Biller Name 20 AN
Biller Category 30 AN
Supporting Information 1 200
Supporting Information 2 17

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 41


UBPS WEB Service Message Interface for an Aggregator

Method Name: BillPayment

Following is a list of response detail for each utility company in Bill Payment response
message.

Response Message Detail for Non-Telco’s

Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
General Utility Bill Payment Information

Consumer Number N 1 14 Y Utility Company Account Number


Customer Name N 2 30 Y Name of the non-telco customer
Billing Month N 3 6 Y Month for which bill is being charged
Current Charges N 4 14 Y Charges for current billing period (eg: month)
Closing Date N 5 8 Y Date which payment was closed
Arrears N 6 14 Y Previous unpaid charges
Due Date N 7 8 Y Date before bill should be paid
Surcharge N 8 13 Y Any additional charges that are applicable
Amount Within DD N 9 14 Y Billing amount before due date
AmountAfterDD N 10 14 Y Billing amount after due date
Payment_AuthId N 11 6 Y Unique Authentication ID for the particular transaction
PayerId N 12 25 Y Paying agent’s user ID
DatePaid N 13 8 Y Date on which bill was paid by customer
TimePaid N 14 6 Y Time on which bill was paid by customer
AmountPaid N 15 13 Y Actual amount paid by customer
PayerBank N 16 6 Y Name of the bank at which bill was paid
PayerBranch N 17 4 Y Name of the bank branch at which bill was paid
PaymentMode N 18 1 Y Mode of payment (cash, cheque, etc.)
PayerAccNo N 19 28 Y Paying agent’s bank account number
Paying agent’s bank account type (current, savings,
PayerAccType N 20 2 Y
etc.)
PaymentCurrency N 21 3 Y Paying agent’s bank account number
UtilityCompanyAccount N 22 28 Y Utility company’s bank account number
FIID N 23 6 Y
AIID N 24 6 Y
Utility company’s bank account type (current, savings,
UtilityCompanyAccountType N 25 2 Y
etc.)
Date on which PTCL settled the transaction at their
DateSettlementPTCL N 26 8 Y
end
Date on which the respective switch settled the
DateSetllementSwitch N 27 8 Y
transaction
ExportDate N 28 8 Y Date on which the transaction record was exported
Unique Terminal ID of the terminal (eg: ATM) on
AcquiringTerminalID N 29 4 Y
which the transaction was made by customer
Additional Data var. Utility company specific bill information

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 42


UBPS WEB Service Message Interface for an Aggregator

Response Message Detail for ZONG0001/ZONG0002

Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
General Utility Bill Payment Information
Consumer No N 1 20 Y Utility Company Account Number
Auth ID N 2 6 Y Unique Authentication ID for the particular transaction
DatePaid N 3 8 Y DDMMYYYY
TimePaid N 4 6 Y Hhmmss
Amount Paid N 5 12 Y Actual amount paid by customer
UBPS_DatePaid N 6 8 Y DDMMYYYY
UBPS_TimePaid N 7 6 Y Hhmmss
DateSettlement N 8 8 Y Date on which the bill was settled
Date on which the respective switch settled the
DateSettlementSwitch N 9 8 Y
transaction ExportDate

Response Message Detail for LESCO

Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
General Utility Bill Payment Information

Consumer Number N 1 14 Y Utility Company Account Number


Customer Name N 2 30 Y Name of the non-telco customer
Billing Month N 3 4 Y Month for which bill is being charged
Current Charges N 4 14 Y Charges for current billing period (eg: month)
Closing Date N 5 8 Y Date which payment was closed
Arrears N 6 14 Y Previous unpaid charges
Due Date N 7 8 Y Date before bill should be paid
Surcharge N 8 13 Y Any additional charges that are applicable
Amount Within DD N 9 14 Y Billing amount before due date
AmountAfterDD N 10 14 Y Billing amount after due date
Payment_AuthId N 11 6 Y Unique Authentication ID for the particular transaction
PayerId N 12 25 Y Paying agent’s user ID
DatePaid N 13 8 Y Date on which bill was paid by customer
TimePaid N 14 6 Y Time on which bill was paid by customer
AmountPaid N 15 13 Y Actual amount paid by customer
PayerBank N 16 6 Y Name of the bank at which bill was paid
PayerBranch N 17 4 Y Name of the bank branch at which bill was paid
PaymentMode N 18 1 Y Mode of payment (cash, cheque, etc.)
PayerAccNo N 19 28 Y Paying agent’s bank account number
Paying agent’s bank account type (current, savings,
PayerAccType N 20 2 Y
etc.)
PaymentCurrency N 21 3 Y Paying agent’s bank account number
UtilityCompanyAccount N 22 28 Y Utility company’s bank account number
FIID N 23 6 Y
AIID N 24 6 Y
Utility company’s bank account type (current, savings,
UtilityCompanyAccountType N 25 2 Y
etc.)
Date on which PTCL settled the transaction at their
DateSettlementPTCL N 26 8 Y
end
Date on which the respective switch settled the
DateSetllementSwitch N 27 8 Y
transaction
ExportDate N 28 8 Y Date on which the transaction record was exported
Unique Terminal ID of the terminal (eg: ATM) on
AcquiringTerminalID N 29 4 Y
which the transaction was made by customer
Additional Data var. Utility company specific bill information

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 43


UBPS WEB Service Message Interface for an Aggregator

Response Message Detail for FWASA

Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
General Utility Bill Payment Information
Consumer No N 1 24 Y Utility Company Account Number
Unique Authentication ID for the particular
Auth ID N 2 6 Y
transaction
DatePaid N 3 8 Y DDMMYYYY
TimePaid N 4 6 Y Hhmmss
Amount Paid N 5 12 Y Actual amount paid by customer
UBPS_DatePaid N 6 8 Y DDMMYYYY
UBPS_TimePaid N 7 6 Y Hhmmss
DateSettlement N 8 8 Y Date on which the bill was settled
Date on which the respective switch settled the
DateSettlementSwitch N 9 8 y
transaction ExportDate

Response Message Detail for SNGPL

Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
General Utility Bill Payment Information

Consumer Number N 1 11 Y Utility Company Account Number


Customer Name N 2 30 Y Name of the non-telco customer
Billing Month N 3 6 Y Month for which bill is being charged
Current Charges N 4 14 Y Charges for current billing period (eg: month)
Closing Date N 5 8 Y Date which payment was closed
Arrears N 6 14 Y Previous unpaid charges
Due Date N 7 8 Y Date before bill should be paid
Surcharge N 8 13 Y Any additional charges that are applicable
Amount Within DD N 9 14 Y Billing amount before due date
AmountAfterDD N 10 14 Y Billing amount after due date
Unique Authentication ID for the particular
Payment_AuthId N 11 6 Y
transaction
PayerId N 12 25 Y Paying agent’s user ID
DatePaid N 13 8 Y Date on which bill was paid by customer
TimePaid N 14 6 Y Time on which bill was paid by customer
Actual amount paid by customer with one
AmountPaid N 15 13 Y
space at the end
PayerBank N 16 6 Y Name of the bank at which bill was paid
PayerBranch N 17 4 Y Name of the bank branch at which bill was paid
PaymentMode N 18 1 Y Mode of payment (cash, cheque, etc.)
PayerAccNo N 19 28 Y Paying agent’s bank account number
Paying agent’s bank account type (current,
PayerAccType N 20 2 Y
savings, etc.)
PaymentCurrency N 21 3 Y Paying agent’s bank account number
UtilityCompanyAccount N 22 28 Y Utility company’s bank account number
FIID N 23 6 Y
AIID N 24 6 Y
Utility company’s bank account type (current,
UtilityCompanyAccountType N 25 2 Y
savings, etc.)
Date on which PTCL settled the transaction at
DateSettlementPTCL N 26 8 Y
their end
Date on which the respective switch settled the
DateSetllementSwitch N 27 8 Y
transaction
Date on which the transaction record was
ExportDate N 28 8 Y
exported
Unique Terminal ID of the terminal (eg: ATM)
AcquiringTerminalID N 29 4 Y on which the transaction was made by
customer

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 44


UBPS WEB Service Message Interface for an Aggregator

Additional Data var. Utility company specific bill information

Response Message Detail for KENC

Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
General Utility Bill Payment Information

Consumer Number N 1 11 Y Utility Company Account Number


Customer Name N 2 30 Y Name of the non-telco customer
Billing Month N 3 4 Y Month for which bill is being charged
Current Charges N 4 14 Y Charges for current billing period (eg: month)
Closing Date N 5 8 Y Date which payment was closed
Arrears N 6 14 Y Previous unpaid charges
Due Date N 7 8 Y Date before bill should be paid
Any additional charges that are applicable with
Surcharge N 8 13 Y
one space at the end.
Amount Within DD N 9 14 Y Billing amount before due date
AmountAfterDD N 10 14 Y Billing amount after due date
Unique Authentication ID for the particular
Payment_AuthId N 11 6 Y
transaction
PayerId N 12 25 Y Paying agent’s user ID
DatePaid N 13 8 Y Date on which bill was paid by customer
TimePaid N 14 6 Y Time on which bill was paid by customer
AmountPaid N 15 13 Y Actual amount paid by customer
PayerBank N 16 6 Y Name of the bank at which bill was paid
PayerBranch N 17 4 Y Name of the bank branch at which bill was paid
PaymentMode N 18 1 Y Mode of payment (cash, cheque, etc.)
PayerAccNo N 19 28 Y Paying agent’s bank account number
Paying agent’s bank account type (current,
PayerAccType N 20 2 Y
savings, etc.)
PaymentCurrency N 21 3 Y Paying agent’s bank account number
UtilityCompanyAccount N 22 28 Y Utility company’s bank account number
FIID N 23 6 Y
AIID N 24 6 Y
Utility company’s bank account type (current,
UtilityCompanyAccountType N 25 2 Y
savings, etc.)
Date on which PTCL settled the transaction at
DateSettlementPTCL N 26 8 Y
their end
Date on which the respective switch settled the
DateSetllementSwitch N 27 8 Y
transaction
Date on which the transaction record was
ExportDate N 28 8 Y
exported
Unique Terminal ID of the terminal (eg: ATM)
AcquiringTerminalID N 29 4 Y on which the transaction was made by
customer
Additional Data var. Utility company specific bill information

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 45


UBPS WEB Service Message Interface for an Aggregator

Response Message Detail for SSGC

Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
General Utility Bill Payment Information

Consumer Number N 1 10 Y Utility Company Account Number


Customer Name N 2 30 Y Name of the non-telco customer
Billing Month N 3 4 Y Month for which bill is being charged
Current Charges N 4 14 Y Charges for current billing period (eg: month)
Closing Date N 5 8 Y Date which payment was closed
Arrears N 6 14 Y Previous unpaid charges
Due Date N 7 8 Y Date before bill should be paid
Surcharge N 8 13 Y Any additional charges that are applicable
Amount Within DD N 9 14 Y Billing amount before due date
AmountAfterDD N 10 14 Y Billing amount after due date
Unique Authentication ID for the particular
Payment_AuthId N 11 6 Y
transaction
PayerId N 12 25 Y Paying agent’s user ID
DatePaid N 13 8 Y Date on which bill was paid by customer
TimePaid N 14 6 Y Time on which bill was paid by customer
AmountPaid N 15 13 Y Actual amount paid by customer
PayerBank N 16 6 Y Name of the bank at which bill was paid
PayerBranch N 17 4 Y Name of the bank branch at which bill was paid
PaymentMode N 18 1 Y Mode of payment (cash, cheque, etc.)
PayerAccNo N 19 28 Y Paying agent’s bank account number
Paying agent’s bank account type (current,
PayerAccType N 20 2 Y
savings, etc.)
PaymentCurrency N 21 3 Y Paying agent’s bank account number
UtilityCompanyAccount N 22 28 Y Utility company’s bank account number
FIID N 23 6 Y
AIID N 24 6 Y
Utility company’s bank account type (current,
UtilityCompanyAccountType N 25 2 Y
savings, etc.)
Date on which PTCL settled the transaction at
DateSettlementPTCL N 26 8 Y
their end
Date on which the respective switch settled the
DateSetllementSwitch N 27 8 Y
transaction
Date on which the transaction record was
ExportDate N 28 8 Y
exported
Unique Terminal ID of the terminal (eg: ATM)
AcquiringTerminalID N 29 4 Y on which the transaction was made by
customer
Additional Data var. Utility company specific bill information

Response Message Detail for KWSB

Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
General Utility Bill Payment Information

Consumer Number N 1 14 Y Utility Company Account Number


Customer Name N 2 30 Y Name of the non-telco customer
Irrelevant N 3 4 Y It is a garbage value
Current Charges N 4 14 Y Charges for current billing period (eg: month)
Date which payment was closed with one
Closing Date N 5 8 Y
space at the start
Previous unpaid charges with 6 spaces at the
Arrears N 6 14 Y
end
Due Date N 7 8 Y Date before bill should be paid
Any additional charges that are applicable with
Surcharge N 8 13 Y
one space at the end.
Amount Within DD N 9 14 Y Billing amount before due date
AmountAfterDD N 10 14 Y Billing amount after due date

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 46


UBPS WEB Service Message Interface for an Aggregator

Unique Authentication ID for the particular


Payment_AuthId N 11 6 Y
transaction
PayerId N 12 25 Y Paying agent’s user ID
DatePaid N 13 8 Y Date on which bill was paid by customer
TimePaid N 14 6 Y Time on which bill was paid by customer
AmountPaid N 15 13 Y Actual amount paid by customer
PayerBank N 16 6 Y Name of the bank at which bill was paid
PayerBranch N 17 4 Y Name of the bank branch at which bill was paid
PaymentMode N 18 1 Y Mode of payment (cash, cheque, etc.)
PayerAccNo N 19 28 Y Paying agent’s bank account number
Paying agent’s bank account type (current,
PayerAccType N 20 2 Y
savings, etc.)
PaymentCurrency N 21 3 Y Paying agent’s bank account number
UtilityCompanyAccount N 22 28 Y Utility company’s bank account number
FIID N 23 6 Y
AIID N 24 6 Y
Utility company’s bank account type (current,
UtilityCompanyAccountType N 25 2 Y
savings, etc.)
Date on which PTCL settled the transaction at
DateSettlementPTCL N 26 8 Y
their end
Date on which the respective switch settled the
DateSetllementSwitch N 27 8 Y
transaction
Date on which the transaction record was
ExportDate N 28 8 Y
exported
Unique Terminal ID of the terminal (eg: ATM)
AcquiringTerminalID N 29 4 Y on which the transaction was made by
customer
Additional Data var. Utility company specific bill information

Response Message Detail for Loan Payment


Data Element Data Length Format

General Utility Bill Information


Response Detail 1 & 2 ConsumerNo 24 Numeric
(430)
PaymentAuthId 6 Numeric

Date_Paid 8 YYYYMMDD

Time_Paid 6 HHmmss

Amount 12 SN(X)2

UBPS_DatePaid 8 YYYYMMDD

UBPS_TimePaid 6 HHmmss

DateSettlement 8 yyyymmdd

DateSettlementSwitch 8 yyyymmdd

Supporting Information 200


1
Supporting Information 144
2

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 47


UBPS WEB Service Message Interface for an Aggregator

Response Message Detail for Telco’s

Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
General Utility Bill Payment Information
UBPS_DatePaid N 1 8 Y DDMMYYYY
UBPS_TimePaid N 2 6 Y Hhmmss
Date_Settlement N 3 8 Y Date on which the bill was settled
AdditionalData

Additional Data
HESCO/MEPCO Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
CircleCode N 1 3 Y
UBPS_DatePaid N 2 8 Y Date on which the bill was paid
UBPS_TimePaid N 3 6 Y Time on which the bill was paid

Additional Data
FESCO/GEPCO//IESCO Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
CircleCode N 1 2 Y
UBPS_DatePaid N 2 6 Y Date on which the bill was paid
UBPS_TimePaid N 3 8 Y Time on which the bill was paid

Additional Data
KESC Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Spaces N 1 10 Y Padding spaces
UBPS_DatePaid N 2 6 Y Date on which the bill was paid
UBPS_TimePaid N 3 8 Y Time on which the bill was paid
BillID N 4 15 Y Unique ID for the respective bill
ConsumerNoActual N 5 8 Y Actual consumer number

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 48


UBPS WEB Service Message Interface for an Aggregator

Additional Data
LESCO Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Spaces N 1 10 Y Padding spaces
UBPS_DatePaid N 2 8 Y Date on which the bill was paid (DDMMYYYY)
UBPS_TimePaid N 3 6 Y Time on which the bill was paid (Hhmmss)
CartType N 4 1 Y
RUCode N 5 1 Y

Additional Data
Maxcom/WASA/WITRIBE Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
UBPS_DatePaid N 1 8 Y Date on which the bill was paid (DDMMYYYY)
UBPS_TimePaid N 2 6 Y Time on which the bill was paid (Hhmmss)

Additional Data
PTCL Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
UBPS_DatePaid N 1 8 Y Date on which the bill was paid (DDMMYYYY)
UBPS_TimePaid N 2 6 Y Time on which the bill was paid (Hhmmss)
DateSettlementPTCL N 3 8 Y Date on which the bill was settled at PTCL end
Unique number associated with bill payment
UniqueTranNumber N 4 12 Y
transaction

Additional Data
MOBILINK Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
UBPS_DatePaid N 1 8 Y Date on which the bill was paid (DDMMYYYY)
UBPS_TimePaid N 2 6 Y Time on which the bill was paid (Hhmmss)
DateSettlement N 3 8 Y Date on which the bill was settled
TransactionID N 4 14 Y Unique ID associated with bill payment transaction
ReceiptNo AN 5 30 Y Receipt number for the particular transaction

Additional Data
SSGC Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
OldConsumerNo N 1 10 Y Previous consumer number
UBPS_DatePaid N 2 8 Y DDMMYYYY
UBPS_TimePaid N 3 6 Y Hhmmss

Additional Data
SNGPL Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
<space> N 1 10 Y Padding space
UBPS_DatePaid N 2 8 Y DDMMYYYY
UBPS_TimePaid N 3 6 Y Hhmmss

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 49


UBPS WEB Service Message Interface for an Aggregator

Additional Data – Payment Advice


Airline Companies
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
General Utility Bill Payment Information
PNRNo AN 1 8 Y PRU87YT6
TicketNo N 2 13 Y 7404205568642
Contact Number N 3 14 Y 00923214748600
PAXName ANS 4 30 Y SAJID HUSSAIN ASHIQ / MR
PAXCount N 5 2 Y 02

Additional Data
SEPCO Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
UBPS_DatePaid N 1 8 Y Date on which the bill was paid
UBPS_TimePaid N 2 6 Y Time on which the bill was paid

Additional Data
KWSB Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Spaces N 1 10 Y
UBPS_DatePaid N 2 8 Y Date on which the bill was paid (DDMMYYYY)
UBPS_TimePaid N 3 6 Y Time on which the bill was paid (Hhmmss)

Additional Data
SEPCO Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
UBPS_DatePaid N 1 8 Y Date on which the bill was paid
UBPS_TimePaid N 2 6 Y Time on which the bill was paid

Additional Data
KENC Specific Bill Information
Field
Field Name Format Length Mandatory [Y / N] Description
Sequence
Spaces N 1 10 Y Padding spaces
UBPS_DatePaid N 2 8 Y Date on which the bill was paid (DDMMYYYY)
UBPS_TimePaid N 3 6 Y Time on which the bill was paid (Hhmmss)
LoadType A 4 1 Y
DocCode A 5 1 Y
ApplicationNo AN 6 11 Y Customer address information along with spaces

CONFIGURATION AND SETTINGS

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 50


UBPS WEB Service Message Interface for an Aggregator

3.1 ADVICE RETRANSMIT MECHANISM

If UBPS web service sends any response code other than the following (in response to an
advice from a client), the client must have the ability to re-transmit the advice.

Response Code Description

67 Back dated transaction

00 Successful transaction

In order to avoid processing the same transaction (retransmitted via client) multiple times, the
client should values provided in the following fields. These fields help identify the
transactions that have been re-transmitted from the client side.

STAN

CompanyCode

ConsumerNo

AuthID

Amount

TransactionDateTime

3.2 TRANSACTION TIMEOUT VALUE

Transaction Timeout Value denotes the amount of time after which the web service client
should end the transaction at their end and map it as a transaction time out.

The aggregator that processes transactions will define and share the transaction timeout value
with the web service client. This transaction timeout value needs to be used at the web service
client’s end as well.

The timeout value can be configured in web.config file of the web service in the node named
key="iResponseTimeout" value="30"

3 DIGITAL SIGNATURE CALCULATION DETAIL

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 51


UBPS WEB Service Message Interface for an Aggregator

4.1 SIGNATURE DETAILS

Please be notified that Digital Signature is no longer being used since May 2016 and all
new members are requested to incorporate the Hashing (Section 5) instead of Digital
Signature. You are requested to test and migrate to Hashing as soon as possible because a
new certificate will not be exchanged by 1LINK.

The signatures in all request and response messages are calculated as per the following
mechanism:

Signatures = CalculateSignature (DataToBeSigned, PrivateKeyOfDigitalCertificate)

Where CalculateSignature() is a DSS method (data security standard method). It is used to


calculate the digital signature within the data, using the SHA1 hash algorithm. The
calculated signature is finally converted into a Base64 string, to use in both inquiry and
response messages.

Following is an example C# code for reference:

private string Sign_String(string sPlainText) {

// Initialize Signature object


string sSignature = string.Empty;

// Set Encoding type


UnicodeEncoding oEncoding = new UnicodeEncoding();

// Convert string into Byte array


byte[] baData = oEncoding.GetBytes(sPlainText);

// Sign the data using SHA1 hash algorithm


byte[] baSignatureData = oCSP.SignData(baData, SHA1.Create());

// Convert signature to Base64 string. It gives 344 length string


sSignature = Convert.ToBase64String(baSignatureData);

return sSignature;
}

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 52


UBPS WEB Service Message Interface for an Aggregator

Signature: Signature value calculated on DataToBeSigned using PrivateKeyOfDigitalCertificate

Example:

tAHBuBE2JK/zIr8FvnxklcxmcrH9lbRnRHLNE0ZCmn63ZfYfKSDX/DLNk6eeSQaFreQZFNsIaRaKn
m9Oh5S9rlhI7TmmsotIq8MB5aow8i1PSo6L13x9omlRNyc4hhsSmc378VjPKzS4pH0P2BEE0ur1
/rnWqP4eBEuiAWM2itNlZZzbdBjBFA38DELZNmB29sdfAviD4E9ZUN6wIgcuf2loDepjEr16R1M
VLH1fvTAmsUCvL1yjH7M/050Bt7/TqniuAg6uihVEZskA91ubR6/9eM7t3qNdxgVLO+3cUrgJu/t
jhWRsg92PbfIvIV4f7+Gz4SFe5wf23yr0aHZ+OQ==

DataToBeSigned: Concatenated values of data elements.

Example:

00HBL001 00000003444666PTCL0012555555 112233061311290001

PrivateKeyOfDigitalCertificate:

This is the Private Key part of the client’s digital certificate. It will be extracted from the private
key certificate.

When the client calculates the signature, it will use its own private key from its own private
key certificate.

Similarly, when the web service calculates the signature, it will use its own private key from
its own private key certificate.

Digital Certificate:

A Digital Certificate is an electronic certificate that is used to establish credentials between


two parties when doing business (or other) transactions on the web. X509 certificates are the
most commonly used digital certificates issued by any certificate authority (CA).

How to obtain a digital certificate?

Digital certificates can be obtained through various certificate authorities, for example:
VeriSign, Norton, etc. This digital certificate will have both public and private keys in it.

Process to Exchange public key certificates between a client and bill payment server:

Both the client and bill payment server acquire their own X509 digital certificates from any
certificate authority. Both parties then export their public key certificates (from their own X509
digital certificate) and exchange them with each other.

Note that the client now has its own private key certificate as well as the bill payment system
public key certificate. Similarly, the bill payment system now has its own private key
certificate and the client’s public key certificate.

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 53


UBPS WEB Service Message Interface for an Aggregator

4 HASH CALCULATION DETAIL

5.1 HASH DETAILS

The SHA 512 hash in all request and response messages are calculated as per the
following mechanism.

Hashes = ComputeHash (plaintextwithsaltbytes)

Where ComputeHash () is a DSS method (data security standard method) provided as a


built-in method in c# library. It is used to calculate the hash of the data, using the hash
algorithm defined. The calculated hash is finally converted into a Base64 string, to use in
both request and response messages.

An example c# code is here for reference.

private string Sign_String(string plaintext,byte[] saltBytes) {

// Convert plain text into a byte array.


byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText);

// Allocate array, which will hold plain text and salt.


byte[] plainTextWithSaltBytes =
new byte[plainTextBytes.Length + saltBytes.Length];

// Copy plain text bytes into resulting array.


for (int i = 0; i < plainTextBytes.Length; i++)
plainTextWithSaltBytes[i] = plainTextBytes[i];

// Append salt bytes to the resulting array.


for (int i = 0; i < saltBytes.Length; i++)
plainTextWithSaltBytes[plainTextBytes.Length + i] = saltBytes[i];

HashAlgorithm hash = new SHA512Managed();

// Compute hash value of our plain text with appended salt.


byte[] hashBytes = hash.ComputeHash(plainTextWithSaltBytes);

// Convert result into a base64-encoded string.


return string hashValue = Convert.ToBase64String(hashBytes);
}

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 54


UBPS WEB Service Message Interface for an Aggregator

Hash: Hash value is calculated on DataToBeSigned using PrivateSaltOfEachBank

Example:

ok99UBt5EVK46/uwNLGKW8BmADMxybfZcfU70VgADizuzkHuDyBlKJfYOq/jt0j/EaDst7XGWD4soeypiS
lexg==

Data To Be Signed: Concatenated values of data elements.

Example:

00HBL001 00000003444666PTCL0012555555 112233061311290001

Private Key of Bank:

This is the Unique Private Key for bank which will be used as salt with concatenated
parameters (Plain text + Salt/Key) to hash and would be provided by 1link to every bank.

HASH:

A hash function is any function that can be used to map data of arbitrary size to data of fixed
size. The values returned by a hash function are called hash values, hash codes, hash sums, or
simply hashes.

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 55


UBPS WEB Service Message Interface for an Aggregator

5 UBPS WEB SERVICE RESPONSE CODES

6.1 RESPONSE CODES

Response Code Description Possible Scenarios

00 Success When transaction is processed successfully

21 Inactive Channel When requested channel status is blocked in Web


Service

22 Invalid Signature When digital signatures are not matched with


provided data

25 UBPS service timed out or is not available When UBPS service is not responding in due time or
it is not available

27 Internal / Unspecified Error When UBPS Web service crashes due to any reason

66 Bill in Process When bill inquiry of a consumer number is made,


when the same customer’s bill payment transaction
is already stuck in SAF

86 Malformed Index in Relationship Inquiry When deviation exists in the message of


Relationship inquiry at Local UBPS

87 Invalid Index When deviation exists in the message

88 Customer Not Found In case if customer relationship enquiry (Tran Code:


71) doesn’t get any data

89 Bill Already Paid If a paid bill is attempted to be payed again through


a new transaction (different Payment Auth ID)

90 Transaction Not Supported Currently not in use by UBPS application

91 Utility Company ID not Found When utility/telco company is not configured in


database

92 Relationship Not Found When Bill enquiry (Tran Code: 72) is not successfully
responded by respective company’s web service

93 Login Failed Network Message Currently not in use by UBPS application

94 Bill Not Found When Bill Payment Advice (Tran Code: 73) is not
successfully responded by respective company’s
web service

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 56


UBPS WEB Service Message Interface for an Aggregator

95 Web Service timed out or is not available When respective company’s web service is not
responding in due time or it is not available

96 Malformed Request (Error in Request Message Currently not in use by UBPS application
Format)

97 Internal / Unspecified Error When UBPS application crashes due to any reason

98 Some Error occurred in web-service If any error has occurred in the web service of the
respective utility/telco company

© 2021 TPS Pakistan (PVT.) Ltd. All rights reserved. 57


NOTICE

This is an unpublished, confidential document of TPS Private Limited.

No part of this document may be reproduced, stored in retrieval form, adopted or


transmitted in any form or by any means, electronic, mechanical, photographic, graphic,
optic or otherwise, translated in any language or computer language, without prior written
permission from TPS Private Limited (TPS).

This document has been prepared with all due diligence, however, TPS Private Limited,
makes no representation or warranties with respect to the contents hereof and shall not be
responsible for any loss or damage caused to the user by the direct or indirect use of this
document and the accompanying information. Furthermore TPS Private Limited, reserves
the right to alter, modify or otherwise change in any manner the content hereof, without
the obligation to notify any person of such revision or changes.

All registered and trademarked names referred to in this document are owned by their
respective owners.

TPS Pakistan (Pvt) Ltd. TPS Middle East FZ LLC


TPS Tower, A-43 Block 7/8 Suite 1204, Al Thuraya Tower II,
K.C.H.S., Karachi 75350, Pakistan. DIC, P.O. Box 502785, Dubai, UAE
UAN: +92 (21) 111 877 111, Fax: +92 21 34302786 Tel: +971 4 4264603, Fax: +971 4 4264605
info@tpsonline.com
www.tpsonline.com

You might also like