0% found this document useful (0 votes)
16 views37 pages

Indusspay Python API Specification V1 241105 201706

Uploaded by

akash1231
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views37 pages

Indusspay Python API Specification V1 241105 201706

Uploaded by

akash1231
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

API Specifications (Python)

for Merchant's
Security Considerations

All the APIs shared in this document will have a common security as
mentioned below.
1. All requests are on HTTPS.
2. Only POST Method is allowed.
3. API header should have below information:
I. Basic authentication
II. Content-Type application/json
4.IP whitelisting
We allow only select IP addresses to access our application over the
internet. Hence as a consumer it. may be required to whitelist all the ip
addresses that the consumer would be consuming the application from. This
step is a prerequisite to setup successful connectivity.

2
1. Verify VPA

Path: /api/v1/upi/t1/verify/vpa

Request

Key Description Possible Value/Example

upiId Customer Payer Upi/Vpa induss@upi

signature Concatenated Encrypted Checksum key will be


String In shared separately along
with logic and algorithm

Request Body: -

{
"upiId": "primeindus.pay@cosb",
"signature":"yulwYhXQorF0TbvbLpIj26L94/djNRaFyqJD0Qbym1sH8oP2RsqqwNY
Oxb2lcbnE"
}

Response

Key Description Possible Value/Example

status SUCCESS/FAILURE

message Response Message

timestamp Response Date Time

responseMessage SUCCESS/FAILURE

customerName Banking name of the “Jackson Patrickr”


customer

Response Body: -
{

3
"status": "SUCCESS",
"message": "Vpa Details Fetched : success",
"timestamp": "22-Dec-2022 16:04:56 Thursday",
"data": {
"responseMessage": "SUCCESS",
"customerName": "PRIMEINDUS FINTECH SOLUTIONS PRIVATE LIMITED"
}
}

Sample Code

import requests
import json

url = "https://<BASE-URL>/api/v1/upi/t1/verify/vpa"
concatenatedString="indusspay@upi "
checksumkey=" YOUR KEY "
signature=generateSignature(concatenatedString,checksumkey);

payload = json.dumps({
"upiId": "indusspay@upi",
"signature": signature
})
headers = {
'Authorization': 'Basic
RDF1ZDhkMGM1ODIwZWZhOWE0YTA5ODY2YWIzNzM2OTI3MjhlNFphSnk6ZFEzckZQQkF
uaGJHZzRYQkNzT1lWdW9xOU8zcmcyZUc0d0QwOFJTRG4=',
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload, verify=False)

print(response.text)

4
2. Intent

Path: /api/v1/upi/t1/payment/upi/link/intent

Request

Key Description Possible Value/Example

txnId Transaction Identifier PRIMERCpra316927702351


85yMw7GoV3

amount Amount Value Up To 2 10.00


Decimal

timeLimit Requested limit 600

remarks Transaction Notes null

minAmount Minimum amount 10.00

fullName Customer Fullname Jackson

email Customer EmailID [email protected]

mobileNumber Customer Mobile Number 8778333755

intentApp Application name GPAY/PAYTM/PHONEPE/


BHARATPE
If it is NULL then you will get
the option to select the
payment apps.

param1 This is an optional parameter. param123


Whatever you provide here
will be returned in callback
and status response.

param2 Optional parameter abc111

param3 Optional parameter

5
signature Concatenated encrypted Checksum key will be
string in shared separately along
with logic and Algorithm

Request body: -

{
“txnId”: “PRIMERCpra31692770235185yMw7GoV3”,
“amount”: "10.00",
“timeLimit”: “600,
“remarks”: null,
“minAmount”: “10.00”,
“fullName”: “Jackson”,
“email”: “[email protected]”,
“mobileNumber”: “8778333755”,
“intentApp”: “gpay”,
"param1": "param123",
"param2": "abc111",
"param3": "",
“signature”:“oFycrcxc2ovcSi2q386elFgTlFPDyJp8fjPKDWagAlf+wkyN7XNQhh2sktKRXqK9l
CKdsQYP5UswfKxK61k0gQ==”
}

Response

Key Description Possible Value/Example

status SUCCESS/FAILURE

message Response Message

timestamp Response Date Time

data

url URL By hitting this URL you can


open the respective
app(GPAY/PAYTM/PHONEP
E/BHARATPE)

6
txnId Transaction Identifier PRIMERCind3167171926700
3OiuI6DXz

Response body: -

{
"status": "SUCCESS",
"message": "Intent Link Generated : Success",
"timestamp": "14-Sep-2023 06:35:20 Thursday",
"data": {
"url": "https://localhost.test.com/payment/intent/get/bz0BUhtAwO",
"txnId" : "PRIMERCind31671719267003OiuI6DXz"
}
}

7
3. Raise Collect

Path: /api/v1/upi/t1/payment/upi/raise-collect

Request

Key Description Possible Value/Example

upiId Customer Payer Upi/Vpa induss@upi

amount Amount Value Up To 2 1.00


Decimal

remark Transaction Notes Petrol Expense

fullName Customer Fullname Jackson

email Customer EmailID [email protected]

mobileNumber Customer Mobile Number 8778333755

param1 This is an optional parameter. param111


Whatever you provide here
will be returned in the
callback and status response.

param2 Optional parameter 123

param3 Optional parameter info

signature Concatenated encrypted Checksum key will be


string in shared separately along
with logic and Algorithm

Request Body: -

{
"upiId": "primeindus.pay@cosb",
"amount": "1.00",
"remark": "test",

8
"fullName": "Jackson",
"email": "[email protected]",
"mobileNumber": "8778333755",
"param1": "param111",
"param2": "123",
"param3": "info",
"signature":"yulwYhXQorF0TbvbLpIj24dffcE/pgF3SFQfZfx/n/jsosI+4QEwoQDpy08eDLVvTt
Q6VFCuvYiTG67aEnW8Ew=="
}

Response

Key Description Possible Value/Example

status SUCCESS/FAILURE

message Response Message

timestamp Response Date Time

transactionId Transaction Identifier PRIMERCind3167171926700


3OiuI6DXz

Response Body: -

{
"status": "SUCCESS",
"message": "Raise Collects : success",
"timestamp": "27-Dec-2022 18:05:48 Tuesday",
"data": {
"transactionId": PRIMERCind31671719267003OiuI6DXz
}
}

Sample Code
import requests
import json

url = "https://<BASE-URL>/api/v1/upi/t1/payment/upi/intent"

9
concatenatedString="[email protected]@gmail.com8778333755"
checksumkey=" YOUR KEY "
signature=generateSignature(concatenatedString,checksumkey);

payload = json.dumps({
"upiId": "primeindus@upi",
"amount": "1.00",
"remark": "test",
"fullName": "Jackson",
"email": "[email protected]",
"mobileNumber": "8778333755",
"signature": signature
})
headers = {
'Authorization': 'Basic
NU9WSDM2eDJiMzYwNzh6OWEwNDE0N2FiZmE4ZTA0MDQ0YzNmNmRmcFd0OlpJYWk2
S1R4QkM2SHV4cnpQNUdBUVQ4Y1RUM2loM0tjQkhTb2NocTMzOQ==',
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload, verify=False)

print(response.text)

10
4.Raise Collect status

Path: /api/v1/upi/t1/status/upi/raise-collect

Request

Key Description Possible Value/Example

txnId Transaction id PRIMERCind3167172531955


4CdUFTFUf

signature Concatenated encrypted Checksum key will be


string in shared separately along
with logic and algorithm

Request Body: -

{
"txnId": "PRIMERCind31671719267003OiuI6DXz",
"signature":"xulwYhXQorF0TbvbLpIj26L94/djNRaFyqJD0Qbym1sH8oP2RsqqwNY
Oxb2lcbnE"
}

Response

Key Description Possible Value/Example

status SUCCESS/FAILURE

message Response Message

timestamp Response Date Time

upiTxnId Upi Transaction Id, Please COBA4DE02BC16564D50B


Associate With Your Order 5C280F0E134F025
Id / Exttransactionid

amount Amount Value Up To 2 1.00


Decimal

11
upiId Customer Payer Upi/Vpa induss@up

custRefNo Transaction Rrn 235619540002

extTransactionId Transaction Identifier PRIMERCind3167171926700


3OiuI6DXz

status Status Of Api Success


Success/Failure/
Pending - In Case Of
Response Awaited

param1 Optional parameter param1

param2 Optional parameter 123

param3 Optional parameter message

Response Body: -

{
"status": "SUCCESS",
"message": "Raise Collect Transaction status fetched : success",
"timestamp": "22-Dec-2022 19:05:53 Thursday",
"data": {
"upiTxnId": "COBA4DE02BC16564D50B5C280F0E134F025",
"amount": "1.00",
"upiId": "induss@upi",
"custRefNo": "235619540002",
"extTransactionId": "PRIMERCind31671719267003OiuI6DXz",
"status": "SUCCESS",
"param1": "param1",
"param2": "123",
"param3": "message"
}
}

12
Sample Code

import requests
import json

url = "https://<BASE-URL>/api/v1/upi/t1/status/upi/intent"

concatenatedString="PRIMERCARm31672164914986t1DofEe1"
checksumkey=" YOUR KEY "
signature=generateSignature(concatenatedString,checksumkey);

payload = json.dumps({
"txnId": "PRIMERCARm31672164914986t1DofEe1",
"signature": signature
})
headers = {
'Authorization': 'Basic
NU9WSDM2MmJzMzYwNzg5YTA0MTQ3YWJmYThlMDQwNDRjM2Y2ZGZwV3Q6WklhaTZ
LVEJDczZIdXJ6UDVHQVFUOGNUVDNpaDNLY0JIU29jaHEzMzk=',
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload, verify=False)

print(response.text)

13
5.Dynamic QR

Path: /api/v1/upi/t1/payment/upi/qr/dynamic

Request

Key Description Possible Value/Example

amount Amount value up to 2 1.00


decimal

timeLimit Requested Limit

remarks Transaction Notes Food Expenses

fullName Customer Fullname Jackson

email Customer EmailID [email protected]

mobileNumber Customer Mobile Number 8778333755

param1 This is an optional xyz


parameter. Whatever you
provide here will be
returned in the callback and
status response.

param2 Optional parameter 987abc

param3 Optional parameter 345-78

signature Concatenated encrypted Checksum key will be


string in shared separately along
with logic and algorithm

Request Body: -

{
"amount": "1.00",
"timeLimit": "600",

14
"remarks": "test",
"fullName": "Jackson",
"email": "[email protected]",
"mobileNumber": "8778333755",
"param1": "xyz",
"param2": "987abc",
"param3": "345-78",
"signature":"xulwYhXQorF0TbvbLpIj26L94/djNRaFyqJD0Qbym1sH8oP2RsqqwN
YOxb2lcbnE"
}

Response

Key Description Possible Value/Example

status SUCCESS/FAILURE

message Response Message

timestamp Response Date Time

qrImage Base64 format of the QR


image

txnId Transaction id PRIMERCind3167172531955


4CdUFTFUf

Response Body: -

{
"status": "SUCCESS",
"message": "QR Transaction: success",
"timestamp": "22-Dec-2022 19:55:55 Thursday",
"data": {
"qrImage":
"iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAQAAAACFI5MzAAADR0lEQVR4Xu2XS66jMB
BFC3ngWdgAkrfhmbcEG+CzAbIlz7wNS2wAZh5YVN9KyOvXLfUglVnrIRRFPoiy63OrIP7XRX
8vfF0/5L8kO9EUqQ9uSd1IRLYSOTU5uPZh271ZLY3ecawTf0Bi1xPvoQ54hMzpa28/IhNvd9z
JMOfRdh+SPph76oi63tPN/rGDtwnXITEXGphu3p32u3feJojPkLrv97fIvU1YIEIEj7qjdFN5LGnJ
7mvLuSfc5s4GLmminnB0M21Hyq34g0+/cXF6wh2yBlteaVsitfCrvexoSDKrN7sEPCPUQzH3
eNnRkFKbQj09L7N7nsNlR0GOCAfg9bhRxNsZ6njtWkNO6m7W7TY3CHXEL89X7mgIJyxLW

15
M6wIXeGAm3Qk50yJKpNbkGg4E7JpueuNUQseGy8axOypvaIlb3OoyC7F3WZLUTUrT7D1P
GqYAWRRI5mJvwxS9lWgmLpCfSgKduSIC1IalQM9Ve0dQRezKN4AlnpZo9setl5n3CkITJKBJ
IwsTlFZp52NGQX7TSzd6uFJFDDZomfEPRDFArKDg4QH1C4zqMgp3diiqpYSHwvbpezKAlyB
4fGxo/k0BgpoAu9dqAgJNI+cCd2WEaAo1x2FOSIRB4N1jwegV+pSXpyYiG6Ezoq3Tu3hVd7e
VRBsOVRjl4ndEXr5lCbpCcsL4YSoFF00tAiROsDgtdD1yUN6y2gbyOP9ESS2qJKAKEubg00vj
JRQ3yeEjYOGciNpI8ojZ6gg0FERWBqW+oYcvsV7ffJUSrJ/EVtfJQdZs+r/2gItOoM1HtEG55A
cKCjTzsq4pHIEAFUCY0WdUy330qhIJABKAoWZIzF4DO9qlFBDskdDOmYwuoQ4YDtuHatIc
xmlS6BCkYfQ4jMq+Y0BD5A6p2EX/mzh64penJaXtihY6NEyNJUAFlNsDZEJCP6D4QBHkXT
+IBI+kD5MMCi5njFxr+88z6R2Z8NVKGRqR/jZycfFlqCmCCjoeuwc3o8hf7ztKMiUXR0ePTGR
cqOJJU+IDK9Riifg2JBrl7KpySjxcszWcwU+RZy7y8faIh8sKLgzL1IVuLz+qs3KsgjPhhjMaTIiD1
i3CY9+cf1Q36IXL8Aa0HiIeifakgAAAAASUVORK5CYII=",
"txnId": "PRIMESQRind31671738955187Tbg5f7to"
}
}

Sample Code
import requests
import json

url = "https://<BASE-URL>/api/v1/upi/t1/payment/upi/qr/dynamic"

concatenatedString="[email protected]"
checksumkey=" YOUR KEY "
signature=generateSignature(concatenatedString,checksumkey);

payload = json.dumps({
"amount": "1.00",
"timeLimit": "600",
"remarks": "test",
"fullName": "Jackson",
"email": "[email protected]",
"mobileNumber": "8778333755",
"signature": signature
})
headers = {
'Authorization': 'Basic
NU9WSDM2MmIzNjA3OHM5YTA0MTQ3YXNiZmE4ZTA0MDQ0YzNmNmRmcFd0OlpJYWk2
S1RCQzZIdXJ6UDVHQVFUOGNUVDNpaDNLY0JIU29jaHEzMzk=',
'Content-Type': 'application/json'
}

16
response = requests.request("POST", url, headers=headers, data=payload, verify=False)
print(response.text)

17
6.Static QR Code

Path: /api/v1/upi/t1/payment/upi/qr/static

Request

Key Description Possible Value/Example

timeLimit Requested Limit

remarks Transaction Notes Petrol Expense

minAmount Minimum Amount to allow 1.00

fullName Customer Fullname Jackson

email Customer EmailID [email protected]

mobileNumber Customer Mobile Number 8778333755

param1 This is an optional town


parameter. Whatever you
provide here will be
returned in the callback and
status response.

param2 Optional parameter 123-456

param3 Optional parameter abc

signature Concatenated encrypted Checksum key will be


string in shared separately along
with logic and algorithm

Request Body: -

{
"timeLimit": "600",
"remarks":”Petrol Expense”,
"minAmount": "1.00",

18
"fullName": "Jackson",
"email": "[email protected]",
"mobileNumber": "8778333755",
"param1": "town",
"param2": "123-456",
"param3": "abc",
"signature":"xulwYhXQorF0TbvbLpIj26L94/djNRaFyqJD0Qbym1sH8oP2RsqqwNY
Oxb2lcbnE"
}

Response

Key Description Possible Value/Example

status SUCCESS/FAILURE

message Response Message

timestamp Response Date Time

qrImage Base64 format of the QR


image

txnId Transaction id PRIMERCind3167172531955


4CdUFTFUf

Response Body: -

{
"status": "SUCCESS",
"message": "QR Transaction : success",
"timestamp": "22-Dec-2022 19:38:36 Thursday",
"data": {
"qrImage":
"iVBORw0KGgoAAAANSUhEUgAAAMgAAADIAQAAAACFI5MzAAADPUlEQVR4Xu2XPY7jMA
xGGbhwF1/AgK6hTldKLhDHF0iupE7XMKAL2J0KQ9rHTDI7u8AWw3SLEYJBRi8Aaf58pKX96
8jfF5/nh/yXZBU5SXeP3dUvQ+lu/S7izGRr+9T2Y79MJd9LV4V/3yBxPKduDd29yRDHoeyn/i1
yCm7t25baveH1+C7pW/VuFTeXZUp/2Pk2IQZpPxS+uLm1a/9HdL5LyM85jV8/XzL3bfI4rpW
Mna2N4t3jxkhW2U8ynstCBbW4SOjWZwwsZIvkmfzk6oVKbCnPxU6qLBfCEOXY5xaJqJzCh
9cWsgZXezn6RlHfpKt+PzQ72eJ+8plKnAu94qq41b+e5/tklcxzV9+tvtHER2rcPz0wERGu4YS
TkPRow8uOgYQ8x3xvC1VTA5nn+9OOgWxpGdo+xHzz7tqTK0JrJ7XHcbcRTp+vPWEgwHb

19
Cn6Hk1jIFfukfWvUG2SK1s09NLhhEqISf2Mnqx3NsNz8eQ1f75dA0S2ZSdVzQIstFJ0auNN/Tj
oW0NF7QAI8YtJsggfzETraISomEfShy8SOz6FCcmdC+gr/RXcUxIdEY6d8g3q1hJJAziuVlKm
5LdsL1uWUVleRunhlOwu2kBpX2cyISIzHA5ZceWMiWiIF6fRWuCYZ8Kp+BrDpmcXzReSt8F+
TKTkRFvQYMoljcEdqnHQOhAKlrYZQlhFkOZbzorZHQvuw7j7GD8qEuRMJO0OMa8j1hUHtu1
kXAmclW5ISuF4cY33mC5F4dbCIRx7W0z8Cy082tPO0YSA00rqodcqU7bEAhPuxYyKbpBXY
zQuUX9GB6g1SazO+MoA/lu7JfvLw2EAasDh9yXhiPO0rzWMeMZNOdmoQjojonJwZRaGayB
jSvu/m8UTjkyusOZSeecPIuouEUGYf0qEorYW7j75XaiZl9h7getY+NpDGoA8vOoms1e+JvjTc
RbRR4ntHRwGBE4z+8

thC0is7guendk24BfOxE30sKhNWVRI3MjfWpoyYSxyl1unWSc0H2OE87NoLy0cdTyqtfHq8U
7xFevLzG4Khtt7C520njdZAOJkuUoYbzcx81EJ0/PU3cqcCHZUife6KF/OP8kB+i5xcYz1ZYd7
wi5gAAAABJRU5ErkJggg==",
"txnId": "PRIMESQRind31671737915776u8WgqgyD"
}
}

Sample Code
import requests
import json
url = "https://<BASE-URL>/api/v1/upi/t1/payment/upi/qr/static"

concatenatedString="[email protected]"
checksumkey=" YOUR KEY "
signature=generateSignature(concatenatedString,checksumkey);

payload = json.dumps({
"timeLimit": "600",
"remarks": "transaction",
"minAmount": "1.00",
"fullName": "Jackson",
"email": "[email protected]",
"mobileNumber": "8778333755",
"signature": signature
})
headers = {
'Authorization': 'Basic
NU9WSDM2MnNiMzYwNzg5YWQwNDE0N2FiZmE4ZTA0MDQ0YzNmNmRmcFd0OlpJYWk
2S1RCQzZIdXJ6UDVHQVFUOGNUVDNpaDNLY0JIU29jaHEzMzk=',
'Content-Type': 'application/json'
}

20
response = requests.request("POST", url, headers=headers, data=payload, verify=False)
print(response.text)

21
7.QR Transaction Status by ExtTransactionId

Path: /api/v1/upi/t1/status/upi/qr

Request

Key Description Possible Value/Example

txnId External Transactional Id

signature Concatenated Encrypted Checksum key will be


String In shared separately along
with logic and algorithm

Request Body: -

{
"txnId": "PRIMEINUV1670918752937",
"signature":"xulwYhXQorF0TbvbLpIj26L94/djNRaFyqJD0Qbym1sH8oP2RsqqwNY
Oxb2lcbnE"

Response

Key Description Possible Value/Example

status SUCCESS/FAILURE

message Response Message

timestamp Response Date Time

respMessge Transaction Status

respCode Transaction Error Code

22
customerName Jackson Patric

upiTxnId Upi Transaction Id

txnTime Transaction Time

amount Transaction Amount

extTransactionId Reference Id Of Upi


Transaction/Exttransaction
Id

custRefNo Upi Rrn No.

remark Transaction Note

param1 Optional parameter param0

param2 Optional parameter test23

param3 Optional parameter message

Response Body: -

{
"status": "SUCCESS",
"message": "QR Transaction : success",
"timestamp": "22-Dec-2022 19:55:55 Thursday",
"data":[ {
"respMessge":"SUCCESS",
"respCode":"0",
"customerName":"abc",
"upiTxnId":"COB66C739A28D3A43CBBCAEFE80544F8A17",
"txnTime":"2022-01-06T16:38:47.847 05:30",
"amount":"50.00",
"upiId":"7387551812@cosb",
"extTransactionId":"NPST06012022004",
"custRefNo":"200616380004",
"remark":"upiPayment",
"param1": "param0",

23
"param2": "test23",
"param3": "message"

}
]

Sample Code
import requests
import json

url = "https://<BASE-URL>/api/v1/upi/t1/status/upi/qr"

concatenatedString="PRIMESQRARm31672229632063sSGvdC8i"
checksumkey=" YOUR KEY "
signature=generateSignature(concatenatedString,checksumkey);

payload = json.dumps({
"txnId": "PRIMESQRARm31672229632063sSGvdC8i",
"signature": concatenatedString
})
headers = {
'Authorization': 'Basic
NU9WSDM2MmIzNnMwNzg5YTA0MTQ3YWJkZmE4ZTA0MDQ0YzNmNmRmcFd0OlpJYW
k2S1RCQzZIdXJ6UDVHQVFUOGNUVDNpaDNLY0JIU29jaHEzMzk=',
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload, verify=False)

print(response.text)

24
8.QR Transaction Status by RRN

Path: /api/v1/upi/t1/status/upi/qr/rrn

Request

Key Description Possible Value/Example

txnId Transactionid

signature Concatenated Encrypted Checksum key will be


String In shared separately along
with logic and algorithm

Request Body: -

{
"txnId": "PRIMEINUV1670918752937",
"signature":"xulwYhXQorF0TbvbLpIj26L94/djNRaFyqJD0Qbym1sH8oP2RsqqwNY
Oxb2lcbnE"
}

Response

Key Description Possible Value/Example

status SUCCESS/FAILURE

message Response Message

timestamp Response Date Time

respMessge Transaction Status

respCode Transaction Error Code

customerName Jackson Patric

25
upiTxnId Upi Transaction Id

txnTime Transaction Time

amount Transaction Amount

extTransactionId Reference Id Of Upi


Transaction/Exttransaction
Id

custRefNo Upi Rrn No.

remark Transaction Note

Response Body: -

{
"status": "SUCCESS",
"message": "QR Transaction : success",
"timestamp": "22-Dec-2022 19:55:55 Thursday",
"data":[ {
"respMessge":"SUCCESS",
"respCode":"0",
"customerName":"abc",
"upiTxnId":"COB66C739A28D3A43CBBCAEFE80544F8A17",
"txnTime":"2022-01-06T16:38:47.847 05:30",
"amount":"50.00",
"upiId":"7387551812@cosb",
"extTransactionId":"NPST06012022004",
"custRefNo":"200616380004",
"remark":"upiPayment"

}
]

Sample Code
import requests
import json

url = "https://<BASE-URL>/api/v1/upi/t1/status/upi/qr/rrn"

26
concatenatedString="234265110802"
checksumkey=" YOUR KEY "
signature=generateSignature(concatenatedString,checksumkey);

payload = json.dumps({
"txnId": "234265110802",
"signature": signature
})
headers = {
'Authorization': 'Basic
NU9WSDM2MmIzNjBzNzg5YTA0MTQ3YWJmYThlMDQwNDRjM2Y2ZGZwV3RzOlpJYWk2S
1RCQzZIdXJ6UDVHQVFUOGNUVDNpaDNLY0JIU29jaHEzMzk=',
'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload, verify=False)

print(response.text)

27
Raise Collect Callback

If the merchant shares a URL, then Indusspay will hit the merchant’s URL with the transaction
details. This will be called only for the “Raise Collect” request.

Path: To be shared by merchants. REST API should be supported in JSON format.

Request

Key Description Possible Value/Example

status SUCCESS/FAILURE

extTransactionId Transaction Identifier PRIMERCind3167171926700


3OiuI6DXz

upiTxnId Upi Transaction Id, Please COBA4DE02BC16564D50B


Associate With Your Order 5C280F0E134F025
Id / Exttransactionid

respCode Response of transaction 0 for success in case of


submission for collect successful
submission

upiId Customer Payer Upi/Vpa induss@upi

custRefNo Transaction Rrn 235619540002

txnTime Transaction Date Time 2022-01-23 12:37:51.0

amount Amount Value Up To 2 1.00


Decimal

terminalId Merchant terminal id PRIMEINDUS001-IP

customerName Banking name of the IP


customer

respMessge Status Of Api Success


Success/Failure/
Pending - In Case Of
Response Awaited

28
param1 Optional parameter param0

param2 Optional parameter test123

param3 Optional parameter message

signature Concatenated encrypted Checksum key will be


string in shared separately along
with logic and Algorithm

Request Body: -

{
"extTransactionId":"PRIME111300w2sw8sIsND",
"status":"SUCCESS",
"data":[
{
"respCode":"0",
"upiTxnId":"COBDBE481DCFEFC424CBCFD678D9C9A41E8",
"txnTime":"Wed Nov 09 12:39:22 IST 2022",
"mcc":"0000",
"upiId":"9311529210@cosb",
"custRefNo":"231312370064",
"requestTime":"2022-01-23 12:37:51.0",
"amount":"99.00",
"respMessge":"SUCCESS",
"terminalId":"PRIMEINDUS001-IP",
"customerName":"Indusspay",
"param1": "param0",
"param2": "test23",
"param3": "message",
"signature":"NiT09bDGfW2n/IqFKeHf8twMIFWYWL6HXUqjP4JTNuCAVVvVKyilG0X
yoPWeEyiZYNTKUlaOZxJb85fdvW4+Mg=="
}
]
}

29
QR Callback

Path: To be shared by merchants. REST API should be supported in JSON format.

Request

Key Description Possible Value/Example

extTransactionId Reference Id Of Upi PRIME11545


Transaction/Exttransaction

status SUCCESS/FAILURE SUCCESS

errCode Transaction Error Code null

customer_vpa Customer VPA 931154910@cosb

merchant_vpa Merchant/payee VPA primeindus.ip@cosb

rrn UPI RRN no. 231312440065

txnId UPI Transaction id COBKOCP0BK5H1XZIPGED


08UFJE012MU0L20

amount Transaction Amount 199.00

responseTime Transaction end Time Wed Nov 09 12:44:15 IST


2022

customerName Name of customer VISHWAS

remark Transaction Note test

param1 Optional parameter param55

param2 Optional parameter text12

param3 Optional parameter

signature Concatenated encrypted Checksum key will be


string in shared separately along
with logic and Algorithm

30
Request Body: -

{
"extTransactionId":"PRIME11545",
"checksum":"",
"status":"SUCCESS",
"errCode":null,
"customer_vpa":"9311549210@cosb",
"merchant_vpa":"primeindus.pay@cosb",
"rrn":"231312440065",
"txnId":"COBKOCP0BK5H1XZIPGED08UFJE012MU0L20",
"amount":"199.00",
"responseTime":"Wed Nov 09 12:44:15 IST 2022",
"customerName":"DUBAL USHA VISHWAS",
"remark":"upiPayment",
"param1": "param55",
"param2": "text12",
"param3": "",
"signature":"NiT09bDGfW2n/IqFKeHf8twMIFWYWL6HXUqjP4JTNuCAVVvVKyilG0X
yoPWeEyiZYNTKUlaOZxJb85fdvW4+Mg=="
}

Signature Generation Logic:

Sample Request:
request={
attr1: val1,
attr2 : val2,
.
attrN : valN,
signature:null,
}
concatenatedString string = val1+val2+...+valN;
checksumkey=" YOUR KEY "

request.signature=generateSignature(concatenatedString,checksumkey);

Sample Code:
from Crypto.Cipher import AES

31
from base64 import b64encode, b64decode
import random

def generateSignature(concatenatedString, checksumkey):


BLOCK_SIZE = 16
pad = lambda s: s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * chr(BLOCK_SIZE - len(s) %
BLOCK_SIZE)
key = b64decode(checksumkey)
inputString= concatenatedString+"|"+checksumkey
inputString = pad(inputString)
encryptor = AES.new(key, AES.MODE_ECB)
encoded = encryptor.encrypt(inputString.encode('utf-8'))
return b64encode(encoded).decode('utf-8')

concatenatedString=" YOUR STRING "


checksumkey=" YOUR KEY "

signature=generateSignature(concatenatedString,checksumkey);
print(signature)

32
Signature Generation

Please follow the steps below to concatenate the strings and generate the
signature:

1. Check if the input is an array of objects or a plain object.


2. If it's an array of objects, concatenate both the key and value of each
object, removing special characters from the resulting string.
3. If it's a plain object, concatenate only the values of the object, without
removing the special character between each value.
4. Return the concatenated string.
5. Write the Signature code in the respective language (refer sample
code).
6. Use the checksum key shared with you to generate the Signature.
7. Generated Signature shall be added into the JSON request of API.

Example for Array of objects:

"beneList": [

"name": "asdfgh",

"email": "[email protected]",

"mobileNumber": "989899899",

"beneName": "asdfg",

"beneAccountNumber": "1007101044741",

"beneIfsc": "CNRD0001807",

"bankName": "CANARA BANK"

},

"name": "asdfgh",

33
"email": "[email protected]",

"mobileNumber": "9876548978",

"beneName": "asdfgh",

"beneAccountNumber": "203389387658",

"beneIfsc": "SBIN0016889",

"bankName": "SBI"

],

"signature":
"/CaCygKRQCk4xTvnKnErOM4wG9mcClN3Epcd52BbOMQ9TZRBewTuEt4ItOjB6oD5MA
bFNadPzOXB4yJlgko8ma49vJ8mnT6HdUFAV8CJi91U8/UHparsvpBpEXY75C+3VtGrm4
+KnGknnuLZahKW1+LAIgqcQbUjnTWX/96xTUsZtNvQt4/1w7JQQaszNvfrO1DTXEfScIRv
aLkl7xS00ovGDwry4nPkuhWcQ4t3KH9knPyP4Y4DAauTB6enzkCy7S8n/NPXX7SdU5S/
8t6DKWLr0tvERNh9KYhqTlHpCrWS3RNy+t2vWBboBd08jhnbgvfcAgC21/6Mh9yrmR89
HoUl9vdj58bm01JBkYUfgSoS5QuleGfLkjVgOB6cixUPTIkETMwtsrFt40Z9Wme3Izxmaujr
ztd+3GleIoBqQAwE="

Concatenated string:
nameasdfghemailprabhaindusspaycommobileNumber989899899beneNameasdfgbene
AccountNumber1007101044741beneIfscCNRD0001807bankNameCANARABANKnamea
sdfghemailabcdgmailcommobileNumber9876548978beneNameasdfghbeneAccountNu
mber203389387658beneIfscSBIN0016889bankNameSBI

Example for Plain object:

"description": "Jan 2022 Salary settelement",

"amount": "1.00",

"beneficiaryId": "2cfd2052-f788-4a3d-b737-11771b66efe6",

34
"txnMode": "NE",

"clientTxnId":"PRIME4553",

"signature":"YmxgcidGTohZshnbxgfvdcrestl/KHxQbHlDt8Tf+/2VW5Yr3gdoUGt+qOPzay
Bnw4W5NpziTi4S4vWklTkNLvVsjLc8q/JKew2uNihiRcqLW6ba57tmsIOX3vWsFfRH5Qu
W2DCVz+6+0RUWJJ5VqJqYKPQ=="

Concatenated string: Jan 2022 Salary settelement1.002cfd2052-f788-4a3d-b737-


11771b66efe6NEPRIME4553

35
Common Error Messages Encountered During API Integration
1. Error: Invalid checksum

Root cause:

when there is an incorrect concatenation of strings and signatures.

2. Something went wrong please try again/Something went wrong!

Root cause:

1. Invalid Input: The API request may contain invalid or missing parameters,
causing the server to fail in processing the request.
2. Authentication Failure: The API request may lack proper authentication
credentials (e.g., API key, OAuth token), leading to an authentication error.
3. Server Issues: The server handling the API request may be experiencing
technical issues, such as high load, maintenance, or downtime.
4. Data Format Issues: Problems with data formats (e.g., JSON, XML) or encoding
can cause errors when parsing API responses.

3. Your IP address is not allowed

Root cause:

IP Whitelisting Configuration: The server has IP whitelisting configured to restrict


access only to specific IP addresses. If your IP address is not included in the whitelist,
access will be denied.

4. You cannot consume this service

Root cause:

Service Unavailability: When UPI/Payout services are inactive.

5. Bad Request

Root cause:

1. Invalid or Missing Parameters: The API request may contain invalid or missing
parameters required for the operation to be processed successfully. This could
include missing required fields, incorrect data formats, or parameters that do
not adhere to the API specifications.
2. Authentication Issues: The API request may fail due to authentication issues,
such as missing or incorrect authentication credentials (e.g., API keys, tokens,

36
or certificates), expired authentication tokens, or insufficient permissions to
access the requested resource.

6. no Route matched with those values

Root cause:

When the API URL is incorrect.

37

You might also like