Eazypaydocument
Eazypaydocument
EAZYPAY1.0
1
API Gateway-
Integration
2
Contents
Introduction..................................................................................................................... 4
API Details ....................................................................................................................... 5
1. API Name: QR API ...................................................................................................... 5
2. API Name: Transaction Status ...................................................................................... 8
3. API Name: Callback Status .........................................................................................10
4. API Name: Refund API ............................................................................................... 13
5. API Name: Collect Pay ............................................................................................... 15
6. Error Codes................................................................................................................18
Security...........................................................................................................................23
Encryption & Decryption Process ................................................................................... 24
3
Introduction:
This document describes Merchant and ICICI Bank Integration through API Gateway for
Eazy-Pay Services.
Customer journey, API specification and security implementation for Merchant integration.
4
API Details
As an optional feature, Validation of the Debit Account can be done using Validate Payer Acc
Flag, Payer Account and Payer IFSC parameter.
UAT
https://apibankingonesandbox.icicibank.com/api/MerchantAPI/UPI/v0/QR3/{merchantId}
PROD
https://apibankingone.icicibank.com/api/MerchantAPI/UPI/v0/QR3/{merchantId}
Method: POST
Input Parameters:
Mandatory
Name Type Description (Y-Yes / O- Length
Optional)
merchantId Number Merchant Identification Y 10
Number
terminalId Number Needs to send Merchant Y 4
category code (MCC code).
[Default MCC-5411]
amount Number Amount to be debited (In Y 20
Rupees) in Integer value
with 2 decimal
E.g. : ‘200.00’ or ‘300.12’
merchantTranId AlphaNumeric This will be a Transaction ID Y 35
generated by the API and
should always be unique
billNumber AlphaNumeric Bill Number / Order Number Y 50
validatePayerAccFl String ‘Y’ for validating debit a/c O 1
ag details or ‘N’ for non-
validation
5
payerAccount Number When ‘validatePayerAcc’ O
Flag is ‘Y’ then it is
mandatory. Payer Account
number is required to be
entered.
payerIFSC AlphaNumeric When ‘validatePayerAcc’ O
Flag is ‘Y’ then it is
mandatory. Payer IFSC code
is required to be entered.
6
Sample Request
{
"amount": "5.00",
"merchantId": "118449",
"terminalId": "5411",
"merchantTranId": "p0nillp0k9lqlp091p17",
"billNumber": "sdf1po111b",
"validatePayerAccFlag": "Y",
"payerAccount": "0405012740",
"payerIFSC": "IC00000",
}
Output Parameters:
Response Packet:
{
"response": "0",
"merchantId": "118449",
"terminalId": "5411",
"success": "true",
"message": "Transaction Initiated",
"merchantTranId": " p0nillp0k9lqlp091p17",
"refId":"EZY286844327832"
}
Example: upi://pay?pa=abc@icici&pn=Abc&tr=EZY123456789012&am=10&cu=INR&mc=5411
7
2. API Name: Transaction Status
Description: This API will be used by Merchant to get the status of the transaction based on
‘merchantTranID’ input parameter. This API will fetch the updated status from NPCI.
UAT
https://apibankingonesandbox.icicibank.com/api/MerchantAPI/UPI/v0/TransactionStatus3/{merchantId}
PROD
https://apibankingone.icicibank.com/api/MerchantAPI/UPI/v0/TransactionStatus3/{merchantId}
Method: POST
Input Parameters:
Mandatory Length
Name Type Description
(Y/N)
merchantId Number Merchant Identification Y 10
Number
subMerchantId Number Sub Merchant Identification Y 10
Number of Merchant
terminalId Number Needs to send Merchant Y 4
category code (MCC code).
[Default MCC-5411]
merchantTranId AlphaNumeric This will be a Transaction ID Y 35
generated at the time of
original request
Sample Request
{
"merchantId": "118449",
"subMerchantId": "118449",
"terminalId": "5411",
"merchantTranId": "p0nillp0k9lqlp091p17"
}
Output Parameters:
9
merchantTranId AlphaNumeric This will be a Unique Transaction ID
generated by the Merchant.
OriginalBankRRN Number Reference Number generated by Bank
Amount Number Amount
Status AlphaNumeric Status of the transaction
Sample Response:
{
"response": "0",
"merchantId": "106161",
"subMerchantId": "12234",
"terminalId": "5411",
"OriginalBankRRN": "615519221396",
"merchantTranId": "612411454593",
"amount": "12",
"success": "true",
"message": "Transaction Successful",
"status": "SUCCESS"
}
UAT
https://apibankingonesandbox.icicibank.com/api/MerchantAPI/UPI/v0/CallbackStatus2/{merchantId}
PROD
https://apibankingone.icicibank.com/api/MerchantAPI/UPI/v0/CallbackStatus2/{merchantId}
Method: POST
Input Parameters:
Mandatory
Name Type Description Length
(Y/C)
merchantId Number Merchant Identification Y 10
Number
10
subMerchantId Number Sub Merchant Identification Y 10
Number of Merchant
terminalId Number Needs to send Merchant Y 4
category code (MCC code).
[Default MCC-5411]
transactionType Alphabet Flag to identify type of Y 1
original transaction as C, R, Q
or P as per below mentioned
*table
merchantTranId AlphaNumeric This will be a Transaction ID C 35
generated at the time of
original request.
transactionDate Date Date of the Transaction C 20
BankRRN Number Bank Reference Number of C 15
the original transaction
refID AlphaNumeric Reference Number passed in C
QR/Intent Call
11
Sample Request
{
"merchantId": "118449",
"subMerchantId": "118449",
"terminalId": "5411",
"transactionType": "C",
"merchantTranId": "p0nillp0k9lqlp091p17"
}
Output Parameters:
Sample Response:
{
"response": "0",
"merchantId": "106161",
"subMerchantId": "12234",
"terminalId": "5411",
"OriginalBankRRN": "615519221396",
"merchantTranId": "612411454593",
"Amount": "12",
"payerVA": " testing1@imobile ",
"success": "true",
"message": "Transaction Successful",
12
"status": "SUCCESS",
"TxnInitDate": "20160715142352",
"TxnCompletionDate": "20160715142352"
}
UAT
https://apibankingonesandbox.icicibank.com/api/MerchantAPI/UPI/v0/Refund/{merchantId}
PROD
https://apibankingone.icicibank.com/api/MerchantAPI/UPI/v0/Refund/{merchantId}
Method:POST
Input Parameters:
Mandatory Length
Name Type Description
(Y/N)
merchantId Number Merchant Identification Y 10
Number
subMerchantId Number Sub Merchant Identification Y 10
Number of Merchant
terminalId Number Needs to send Merchant Y 4
category code (MCC code).
[Default MCC-5411]
originalBankRRN String Original Transaction Id Y 15
merchantTranId String Refund Transaction Id Y 35
originalmerchantTr AlphaNumeric Merchant TranID of Refund Y 35
anId transaction.
refundAmount Number Amount to be debited.(In Y 20
Rupees, Integer value with 2
decimal)E.g. : 200.00 / 300.12
13
payeeVA AlphaNumeric Alias name with which the N 255
payee can be identified by his
registered entity.
Note AlphaNumeric Remarks entered by the payer Y 50
for his reference.
onlineRefund String Refund request mode – Online Y 1
or Offline refund – ‘Y’ for
online refund and ‘N’ for
Offline refund
Sample Packet:
{
"merchantId": “106092”,
"subMerchantId": “12234”,
"terminalId": “2342342”,
"originalBankRRN": "622415338172",
"merchantTranId": "88442047",
"originalmerchantTranId": "202020202021",
"payeeVA": "yatin@imobile",
"refundAmount": "10.00",
"note": "refund-request",
"onlineRefund": "Y"
}
Output Parameters:
Sample Response
14
{
"merchantId": “106092”,
"subMerchantId": “12234”,
"terminalId": “2342342”,
"success": "true",
"response": “0”,
"status": "SUCCESS",
"message": "Transaction Successful",
"originalBankRRN": "622415338172",
"merchantTranId": "88442055"
}
As an optional feature, Validation of the Debit Account can be done using Validate Payer Acc
Flag, Payer Account and Payer IFSC parameter.
UAT
https://apibankingonesandbox.icicibank.com/api/MerchantAPI/UPI/v0/CollectPay3/{merchantId}
PROD
https://apibankingone.icicibank.com/api/MerchantAPI/UPI/v0/CollectPay3/{merchantId}
Input Parameters:
Mandatory
Name Type Description (Y-Yes / O- Length
Optional)
merchantId Number Merchant Identification Y 10
Number
subMerchantId Number Sub Merchant Identification Y 10
Number of Merchant. If
there is no subMerchantId
required, merchant should
pass the same value as
‘merchantId’
terminalId Number Needs to send Merchant Y 4
category code (MCC code).
[Default MCC-5411]
15
merchantName String Name of the Merchant Y 50
subMerchantName String Sub Merchant Name of the Y 50
Merchant
payerVa AlphaNumeric Virtual Payment address of Y 255
the Payer
Amount Number Amount to be debited (In Y 20
Rupees) in Integer value
with 2 decimal
E.g. : ‘200.00’ or ‘300.12’
Note AlphaNumeric Remarks entered by the Y 50
payer for his reference.
collectByDate DATE TIME Format : dd/mm/yyyy Y
HH:MM AM/PM
merchantTranId AlphaNumeric This will be a Transaction ID Y 35
generated by the API and
should always be unique
billNumber AlphaNumeric Bill Number / Order Number Y 50
16
validatePayerAccFl String ‘Y’ for validating debit a/c O 1
ag details or ‘N’ for non-
validation
payerAccount Number When ‘validatePayerAcc’ O
Flag is ‘Y’ then it is
mandatory. Payer Account
number is required to be
entered.
payerIFSC AlphaNumeric When ‘validatePayerAcc’ O
Flag is ‘Y’ then it is
mandatory. Payer IFSC code
is required to be entered.
Sample Packet:
{
"payerVa": "testo@icici",
"amount": "5.00",
"note": "collect-pay-request",
"collectByDate": "08/11/2019 06:30 PM",
"merchantId": "118449",
"merchantName": "Testmerchant",
"subMerchantId": "118449",
"subMerchantName": "Test",
"terminalId": "5411",
"merchantTranId": "p0nillp0k9lqlp091p17",
"billNumber": "sdf1po111b",
"validatePayerAccFlag": "Y",
"payerAccount": "0405012740",
"payerIFSC": "ICI00012345",
}
Output Parameters:
Error Codes
19
5007 Virtual address not present If merchant entered invalid
customer VPA
5008 PSP is not registered If merchant entered wrong PSP
handler
5009 Service unavailable. Please try later. Default error response for
unexpected internal failures.
5010 Technical Error If any technical error.
5011 Duplicate merchant TranId Transaction is already initiated with
merchant transaction id
5012 Request has already been initiated If request is initiated already for this
for this transaction transaction.
5013 Invalid VPA If VPA does not exits
5014 Insufficient amount If Original amount is less than
refund amount
5015 Invalid Original TranId If original transaction Id is not
available
5016 Payee VA should not be Merchant Should not be Merchant Virtual
VA Address
5017 Sorry you can't initiate refund Merchant can initiate online refund
request only if online refund flag is enabled
5018 Merchant VPA and Reference ID is
not match
5019 Invalid Terminal Id
5020 No response from Beneficiary Bank. For Deemed approved transactions
Please wait for recon before or timed out requests
initiating the transaction again.
5021 Transaction Timed out. Please check OSB Timed out for collect request
transaction status before initiating
again.
5022 Terminal Id is mandatory
5023 Multiple transactions against given
parameter. Please provide bank RRN
5024 Record not found against given
parameters
5025 Please enter valid refund amount
5026 Invalid Consumer number
5027 Invalid merchant prefix
5028 Virtual Address Already Exists
5029 No Response From Switch
20
5030 Please try again In case Check VPA return actCode
950 from Switch
5031 Validity start date should not be less If Validity start date is less than
than current date current date
21
5032 Validity end date should not be less If Validity end date is less than
than validity start date validity start date
5033 Mandate request not created Without initiating the manage
mandate
5034 No Approved Mandates are available If manage mandate request are not
in SUCCESS state
5035 Mandate expired If mandate validity period is
completed
5036 Mandate amounts mis-matched If manage mandate is EXACT and
different amount given in execute
mandate
5037 Execution amount exceeded to If manage mandate is MAX and
Mandate approved amount execution amount crossed in
execute mandate
5038 Invalid Validate Payer Account Flag If validate payer account flag is
other than Y and N
5039 Invalid Payer Account If Payer Account is null, empty or
invalid pattern
5040 Invalid Payer IFSC If Payer IFSC is null, empty or invalid
pattern
5041 Invalid Sequence Number
5042 Duplicate Sequence Number
5043 Invalid Unique Merchant ReferenceId
5044 Invalid Merchant Name
5045 Invalid Marketing Name
5046 Invalid Bank Assigned MerchantId
5047 OSB Timeout
5048 New Unique Merchant ReferenceId
5049 Failed at switch. Please try
registering again.
5050 Details of Bank Assigned MerchantId
not found
5051 Duplicate Unique Merchant
ReferenceId
22
Security
a. API Key needs to be passed in every request in the header and merchant IPwill
also be required for IP whitelisting.
b. API Key needs to be passed in the parameter name: apikey
c. API request and response to Merchant is secured using advanced and agreed
upon encryption algorithm agreed to maintain data confidentialityand integrity.
d. API Gateway uses the standard authenticating and authorizing process for the
incoming request from merchant and for maintaining the integrity and
confidentiality we apply state of art Encryption/ Decryption algorithm.
23
Encryption & Decryption Process
Asymmetric Encryption & Decryption Process Payload content-type will be in text/plain. Base64 encoded
encrypted Cipher will be passed as a payload.
oG5mU1JJNBuwQaSLKb3wfRZks/cT2Vo2yBNNuqjNHDWEC144WxC8iKqBpJAgq7reFKC4sHNUmNPRD
ya1AvmQ7x1L+3EAdEs9FEWNurZuWTvZpk4y7JrGhg0rz9KptBf+JfJUkSMo7NR3Saxel6EYtckkDr3AG
W7WJZmhcEoAMMXRws/hLVmaNHC/nOjCNqqBd4IOOAzdJh/HADRVI+YAJKT8dE4x9NTl+UX1zAoo
Whza+TsWEHfxzQIa7zai7WSa/wiJD3uD7mk5vT1WY/fKJBquCuzM7l35vigDhmb7dLVLuX8VMiNQrtErW
NI0uVaag1jg+uZUtyDSxjPFi5yEpKVVc7+T503IDnCvkCFDygqasDsPL24qOjYk4XavTZvwGuPAdYNNkVn
LzVElEhg4zS2ye+fa/8fZiMt/3fwYeN9dgn9i5R6VOFbXSuZJYPSci9k0oqz73h1nzFtps60rUEDoGIkGvm9w
aJU3W78VH5mIdGfGvvJjiKIuVHmi/huzEX9v4w3mW7RDGgmOuKImkqki+XWgyB0JvVmsLdO+cBaym/
seZP3+zdfhO9AWSI2tDLD4Vf0jDjzoDSFN2mzUFgHK9mbtbXgvsnReoGqx/KsivzmZNLmDmtg8eR4Z9Ln
Lni4rl4OtkDv5y/mxMtL3MBUUUajkw6OS6NnhEG895yo
Encrypted_Payload = Base64Encode(RSA/ECB/PKCS1Encryption(payload,ICICIPubKey.cer))
Encrypted_Payload = Base64Encode(RSA/ECB/PKCS1Encryption(payload,ClientPubKey.cer))
plainResponse = Base64Decode(RSA/ECB/PKCS1Decryption(encPayload,ClientPrivateKey.p12))
24