Checksum Document for PHP

Transaction Detail Checksum Facility
On Payment Gateway
Provided By TechProcess Solutions Ltd

TPSL has checksum facility for providing security at transaction time. This is one of the types of integration we have. In this type of integration, TPSL will provide API to the merchant, what they have to deploy at their end. A checksum value will be generated using this API. Please find the below mentioned detailed process.

Process for Checksum

1.Merchant has to deploy the API given by TPSL at their end.
2.All the necessary request parameter will be send to this API.
3.This API will generate a checksum value.
4.At the request time this checksum value will come to TPSL’s end with request parameter as per Annexure 01.
5.When request will reach TPSL’s side TPSL will once again generate the checksum value using the request parameter received from the Merchant.
6.If the value of the checksum matches at both the end, then the transaction will be forwarded to the respective bank.
7.Once TPSL receives the response from the bank, TPSL generate checksum value with the response parameter that will be sent to the merchant.
8.Once TPSL send the response to the merchant along with the checksum value, merchant will generate checksum using the response parameter received from TPSL.
9.If checksum value matches at merchant side using API then that transaction will return as a Transaction Success. After that to check auth status as per annexure 03:If auth status=0300 is for success transaction or auth status=0399 is for failed transactions
10.If checksum mismatches, that transaction will be considered as Failed/Fraud transaction.

Technical Process Flow:

01.Merchant has to share the request URL (From which the transaction request will come) with TPSL.TPSL will configure the same at TPSL end and validate transaction time for security purpose.
02.Merchant can hit the below URL for Transaction Processing




1.PHP 5 or greater

1.Step 1: Files and Directory Verification

1.1.Please make sure total 5 files are provided to you. (Request.php, getcheck.php,
1.2.Response.php, keystoretekp.pem and
1.3.Make sure these files are placed under same directory except
1.4.It is not compulsory to place files under directory provided by Techprocess.
1.5.Please assure following values are available inside file.
1.5.1.BillerId= [Represent the Merchant ID provided by TPSL.]
1.5.2.ResponseUrl= [Represent the Response URL of merchant.]
1.5.3.CRN= [Currency.]
1.5.4.CheckSumKey= [Unique key provided by TPSL.]
1.5.5.CheckSumGenUrl= [URL provided by TPSL.]
1.5.6.TPSLUrl= [TPSL Payment gateway URL.]

2.Step 2: Implementation

2.1.Make sure file is not accessible from browser.
2.2.For testing default URL will be present for “TPSLUrl=” in file.
2.3.You can change this URL once you get the new URL from TPSL for Live Transactions.
2.4.Change the following in with the details TPSL have provided.
2.5.Make sure there should not be any spaces at the beginning and the end of each value of Follow Screen:1

Screen: 1

2.7.Copy “Request.php”,”getcheck.php”, “Response.php” and “keystoretekp.pem” to the desired directory.
2.8.Open “getcheck.php” and change the Property file path to the path where you have placed your property file. Make similar change in “Response.php”. Follow Screen:2.

Screen: 2

2.9.Now, look for “curl_setopt($ch,
line and change the URL to where your getcheck.php and Response.php file is placed. Make sure you replace the filename.php with the respected file names. e.g.

For getcheck.php:
curl_setopt($ch, CURLOPT_REFERER,’’);

For response.php:
curl_setopt($ch, CURLOPT_REFERER,’’);

3. Step 3: Important things to remember.
3.1 Do not modify “keystoretekp” file.
3.2 Do not modify any code in any of the file.
3.3 To get response values, you can check “Response.php” file. Do not bypass any of the procedure from “Response.php” file.
3.4 Under response.php you will get following array once the transaction done.

[0] => T1234 [Biller Id]
[1] => 1 [Transaction ID]
[2] => 00
[3] => NA
[4] => 1 [Amount]
[5] => 470 [Bank code]
[6] => NA
[7] => NA
[8] => INR
[9] => NA
[10] => NA
[11] => NA
[12] => NA
[13] => 18-07-2011 10:12:18 [Timestamp]
[14] => 0399 [Could be 0300/0399] 0300: Success transaction. 0399: Failed transaction.
[15] => NA
[16] => 1 [Market code]
[17] => 1 [Account Number]
[18] => NA
[19] => NA
[20] => NA
[21] => NA
[22] => NA
[23] => NA
[24] => NA
[25] => 292697030925

3.4 Please remember integration will be handled in two ways.
a) Test server transaction.
b) Live server transaction.
For both types you need to perform configuration in same files/fields which are provided to you.

Request.php: Do not require any kind of configuration.
getcheck.php: Configuration required.
Response.php: Configuration required. Configuration required.
Keystoretekp.pem: Do not require any kind of configuration.

Configuration Required in Files Revised for both types

i.Set property file path.
ii.Set curl_opt REFERER path to your domain name.
iii.Set curl_opt CURLOPT_CAINFO path to the certificate which is provided to you. Please note Test and Live certificates are different.

iv.Set property file path.
v.Set curl_opt REFERER path to your domain name.
vi.Set curl_opt CURLOPT_CAINFO path to the certificate which is provided to you. Please note Test and Live certificates are different.
vii.Change BillerID to the one provided to you.
viii.Change Responseurl to the one where your Response.php file is located.
ix.Change CheckSumKey to the one which is provided to you.
x.Change CheckSumGenUrl when Live URL is provided to you.
xi.Change TPSLUrl when Live URL is provided to you.

For more details related to Request and Response please refer Annexure.

Annexure 01: Checksum Request Parameter (From Merchant to TPSL)

Sample ValueSizeTypeDescription
Transaction Id12345568 (string)MandatoryMERCHANT unique reference number
Market Code123410 (String)MandatoryExtra information from merchant for product details with alphanumeric plus ‘_’
Account No123-334444 OR
1200 (String)MandatoryIt will be account number of customer provided by MERCHANT or if MERCHANT don’t want to pass account no then they need to pass constant value as 1.
Payment Amount500.008MandatoryIt will be transaction amount
Bank Code3005 (String)MandatoryIt will be bank Code as per Annexure 08.
Property file pathD:\TechProcess\Property\MerchantDetails_T1199.properties150 (String)MandatoryMerchant needs to pass the complete or relative path of the property file residing in the system.

Annexure 02: Checksum Response Parameter (From TPSL to Merchant)

ParameterSample ValueSizeTypeDescription
MERCHANT IDL1236CharacterMERCHANT id provided by TPSL to MERCHANT.
CustomerID987123456720varcharMERCHANT unique transaction id.
TxnreferenceNoNANANATPSL unique transaction ID
BankReferenceNoNANANABanks unique transaction ID.
TxnAmount70015VarcharTransaction Amount provided by MERCHANT (SRC AMT field in TPSL system).
BankID3003NumericBank Id provided by TPSL.
BankMERCHANTIDNANANAIt will be MERCHANT id of MERCHANT provided by bank (provided by bank). For rest banks, it will be “NA”.
TxnTypeNANANAThis will be “NA” always.
Currency NameINR3VarcharThis will be “INR” always.
Item CodeNANANAThis will be “NA” always.
Security TypeNANANAThis will be “NA” always.
Security IDNANANAThis will be “NA” always.
Security PasswordNANANAThis will be “NA” always.
TxnDateDate20Date Format DD-MM-YYYY HH:MM:SSTime and date at which TPSL sends response. Format is
Auth StatusRefer Annexure 03
Settlement TypeNANANAThis will be “NA” always.
AdditionalInfo1707200620VarcharThis will be market code.
AdditionalInfo2102-102976395100VarcharThis will be account number.
AdditionalInfo3NANADateThis will be “NA” always.
AdditionalInfo4NANAVarcharThis will be “NA” always.
AdditionalInfo5NANAVarcharThis will be “NA” always.
AdditionalInfo6NANAVarcharThis will be “NA” always.
AdditionalInfo7NANAVarcharThis will be “NA” always.
ErrorStatusNANANAThis will be “NA” always
Error DescriptionNA or xxx100NA or VarcharThis will be either “NA” or respective error messages.
CheckSum12345678950VarcharThis will be unique checksum number as per logic.

Note: Checksum that are generated is 12 digit number.

Annexure 03:

AUTHSTATUSStatus ReasonProposed Transaction
“0300”SuccessSuccessful Transaction
“0399”Invalid Authentication at BankCancel Transaction

Test Account

integration of the TechProcess payment gateway, indian payment gateway integration, techprocess test account, live account of techprocess


  1. I am really enjoying the theme/design of your blog.
    Do you ever run into any web browser compatibility issues?
    A number of my blog audience have complained about
    my site not working correctly in Explorer but looks great in Safari.

    Do you have any ideas to help fix this issue?

  2. Hi there, Υou have done a great job. I’ll certainly digg it and personally suggest to my friends. I am confident they will be benefited from this site.

  3. It’s awesome to visit this web page and reading the views of all mates regarding this paragraph, while I am also zealous of getting experience.


Please enter your comment!
Please enter your name here