Indusspay Python Payouts API Specification - V1 - 241106 - 175905
Indusspay Python Payouts API Specification - V1 - 241106 - 175905
for Merchants
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 the 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. Add Beneficiary
1.2. Request
3
"email": "[email protected]",
"mobileNumber": "989899898",
"beneName": "Jackson",
"beneAccountNumber": "1002301044741",
"beneIfsc": "CNRB0001007",
"bankName": "INDUSS BANK"
},
{
"name": "Alis",
"email": "[email protected]",
"mobileNumber": "9872343210",
"beneName": "Alis Tony",
"beneAccountNumber": "20348938148",
"beneIfsc": "SBIN0016491",
"bankName": "SBI"
}
],
"signature":"9aecqq0koOes4S0J1V77cfgqHZ+jVf8KIe9uZ0iqG9nlztXC0DbKO8m0jCKTAH2
9zGbGS0/15cToopJhmqOfl+IM9uJDsNCjnzYnv2KRlwr6D5m+zdalrwi4AtVREXfjTGfVU0Dg1
EWKt+7A9Ru6meV08ZXEIw7LBZllvOf2BGJK0kH+8dcnhqZWqq71mstVnKy5mqSUVSs3usR
QPKw3s6RocUfZRjCKd9YG6h75FPdUgffiihq0gBdy9/vIY7rOvADqA5CHEDWthb8Dvjt/xmI7v
vePzLLDj33bJLKPQcmGTgQVwlju3ctcQuhBK7/yJAcjuOPf7qGOgi/MFPEWCrZwFpBwx4TY
Vg9NN1hohOkwfQZ1kUTSZDf+S6f1NgT4FHLiqexzr85yBOubLGNNug=="
}
4
def checksumValidation(self):
""" generated source for method checksumValidation """
sb = StringBuilder()
thisClass = None
try:
sb.append(toJSON(self.beneList).replaceAll("[^a-zA-Z0-9]", ""))
except Exception as e:
e.printStackTrace()
return sb.__str__()
url = "{{baseURL}}/payouts/api/v1/ind/p1/beneficiary/add"
apiKey = 'qfwOd3e48bfa9c4042b987796d7d67303f2c8GUH'
apiSecret = 'b2eYnm6NUl5c0HU9NxFVLVdIwxxzD9QukWh3bz8t'
payload = {
"beneList": [
{
"name": "Jackson",
"email": "[email protected]",
"mobileNumber": "989899898",
"beneName": "Jackson",
"beneAccountNumber": "1002301044741",
"beneIfsc": "CNRB0001007",
"bankName": "INDUSS BANK"
},
{
"name": "Alis",
"email": "[email protected]",
"mobileNumber": "9872343210",
"beneName": "Alis Tony",
"beneAccountNumber": "20348938148",
"beneIfsc": "SBIN0016491",
"bankName": "SBI"
}
]
5
}
auth_string = f"{apiKey}:{apiSecret}"
encoded_auth_string = base64.b64encode(auth_string.encode()).decode()
headers = {
"Authorization": f"Basic {encoded_auth_string}",
"Content-Type": "application/json"
}
if response.status_code == 200:
print("Request was successful.")
else:
print("Request failed with status code: " + str(response.status_code))
1.4. Response
status SUCCESS/FAILED
6
accountNumber Mandatory for RTGS, NEFT 1007104544741
and FT. Can be blank for
rest of the payment modes
7
"bankName": "SBI",
"paymentStatus": "pending",
"status": "Not Verified",
"name": "Alis Tony",
"email": "[email protected]",
"mobileNumber": "9872343210"
}
]
}
8
2. Beneficiary List
2.2. Request
{
"page": 0,
"startDate":"2023-01-24 23:59:59",
"endDate":"2023-01-25 00:00:00",
"beneficiaryId":"",
"signature":"2Va+StGhFzlweiUb/7obNKwQvVLTF41XrQI4gxv11YdKO6DQqQffyWUlwUGn4p
haaEtib7+xCyOhcQQRBbmIB/D9uJ+4EYyV5gGwkz67HDw="
}
9
2.3. Response
10
totalPages
totalSize
currentPage
11
}
}
12
3. Single Payouts Request
3.2. Request
13
3.3. Response
status SUCCESS/FAILED
14
4. Single Payouts Request via Account & IFSC (No Beneficiary ID)
4.2 Request
Payment mode
txnMode identification RT – RTGS, NE NE
– NEFT, PA - IMPS
15
"txnMode": "NE",
"clientTxnId": "txn12345",
"beneName": "John Doe",
"beneAccNum": "1234567890",
"beneIfscCode": "IFSC0001",
"beneEmail": "[email protected]",
"beneMobile": "9876543210",
"bankName": "Some Bank",
"signature": "signature-value"
}
4.3 Response
status SUCCESS/FAILED
"status": "SUCCESS",
"message": "Payout Requests: success",
"timestamp": "25-Jan-2023 18:23:36 Wednesday"
16
5. Bulk Payouts Request
5.2. Request
17
"clientTxnId":"PRIME13456"
}
],
"signature":"MGiCfjLO3K89OVMyJUTB73ZHMQkEGq16/M5cklgmBx0GBwdSCdufcSrn/qo5j
9252LTpjCigyT3owa6DC3VMfZyqu6e/N8CQ0gorzgPMNwJCGR7qgl7QyZ1UeUF+SFvUhQ
Gv1Sl8FONKtEB5dxA376wxC3gOzAnINQb2OGXpU1g="
}
def checkSumValidation(self):
sb = ''
try:
for f in self.__dict__:
if f != 'signature':
value = self.__dict__[f]
if f == 'paymentRequests':
sb += str(value).replace("[^a-zA-Z0-9]", "")
else:
if value is not None:
sb += str(value)
except Exception as e:
print(e)
return sb
5.3. Response
18
Key Description Possible Value/Example
status SUCCESS/FAILED
19
6. Bulk Payouts Request via Account & IFSC (No Beneficiary ID)
6.2 Request
20
6.2.1 Request Body: -
{
"type": "SALARY_SETTELEMENT",
6.3 Response
status SUCCESS/FAILED
{
"status": "SUCCESS",
21
"message": "Payout Requests: success",
"timestamp": "25-Jan-2023 18:23:36 Wednesday"
}
22
7. Payouts Status
7.2. Request
7.3. Response
status SUCCESS/FAILED
23
for NEFT/RTGS)
24
8. Payouts 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 “Payouts Callback” request.
8.1. Path: To be shared by merchants. REST API should be supported in JSON format.
8.2. Request
{
"data": [
{
"transactionStatus": "SUCCESS",
"utr": "AXISCN0006204263",
"clientTxnId": "PRIME123",
"statusDescription": "Credited to beneficiary on 07-05-2020 18:40:22",
"batchId": "BLKAPIFT1674827497691MbNoT"
25
}
],
"signature":
"43jTLz/6TbdOS2dopxvOSij7mAFK87pEWShHr77/uHQyKdJ1gHROdw9/5Y0Vc7kbDlFycrf9
Q8cJ7g30ehj9r12dUUNYygoOKwGCTtikhfq8yfO+3jAVLLkZlA/SfiWrGngz5GFJyOQbBPm+f
eeX6ZOTSFznAxlBWXWS46Xphkyq4gRp7DrwG3QEM6azCmwMr96L0nEYfpG0pel/ZXy90g
\u003d\u003d"
}
26
Sample Code
from Crypto.Cipher import AES
from base64 import b64encode, b64decode
import random
//function call
concatenatedString=" YOUR STRING "
checksumkey=" YOUR KEY "
signature=generateSignature(concatenatedString,checksumkey);
print(signature)
Signature Generation
Please follow the steps below to concatenate the strings and generate the
signature:
27
Example for Array of objects:
"beneList": [
"name": "asdfgh",
"email": "[email protected]",
"mobileNumber": "989899899",
"beneName": "asdfg",
"beneAccountNumber": "1007101044741",
"beneIfsc": "CNRD0001807",
},
"name": "asdfgh",
"email": "[email protected]",
"mobileNumber": "9876548978",
"beneName": "asdfgh",
"beneAccountNumber": "203389387658",
"beneIfsc": "SBIN0016889",
"bankName": "SBI"
],
"signature":
28
"/CaCygKRQCk4xTvnKnErOM4wG9mcClN3Epcd52BbOMQ9TZRBewTuEt4ItOjB6oD5MA
bFNadPzOXB4yJlgko8ma49vJ8mnT6HdUFAV8CJi91U8/UHparsvpBpEXY75C+3VtGrm4
+KnGknnuLZahKW1+LAIgqcQbUjnTWX/96xTUsZtNvQt4/1w7JQQaszNvfrO1DTXEfScIRv
aLkl7xS00ovGDwry4nPkuhWcQ4t3KH9knPyP4Y4DAauTB6enzkCy7S8n/NPXX7SdU5S/
8t6DKWLr0tvERNh9KYhqTlHpCrWS3RNy+t2vWBboBd08jhnbgvfcAgC21/6Mh9yrmR89
HoUl9vdj58bm01JBkYUfgSoS5QuleGfLkjVgOB6cixUPTIkETMwtsrFt40Z9Wme3Izxmaujr
ztd+3GleIoBqQAwE="
Concatenated string:
nameasdfghemailprabhaindusspaycommobileNumber989899899beneNameasdfgbene
AccountNumber1007101044741beneIfscCNRD0001807bankNameCANARABANKnamea
sdfghemailabcdgmailcommobileNumber9876548978beneNameasdfghbeneAccountNu
mber203389387658beneIfscSBIN0016889bankNameSBI
"amount": "1.00",
"beneficiaryId": "2cfd2052-f788-4a3d-b737-11771b66efe6",
"txnMode": "NE",
"clientTxnId":"PRIME4553",
"signature":"YmxgcidGTohZshnbxgfvdcrestl/KHxQbHlDt8Tf+/2VW5Yr3gdoUGt+qOPzay
Bnw4W5NpziTi4S4vWklTkNLvVsjLc8q/JKew2uNihiRcqLW6ba57tmsIOX3vWsFfRH5Qu
W2DCVz+6+0RUWJJ5VqJqYKPQ=="
29
Common Error Messages Encountered During API Integration
1. Error: Invalid checksum
Root cause:
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 Failed: 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.
Root cause:
Root cause:
6. 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.
30
2. Authentication Issues: The API request may fail due to authentication issues,
such as missing or incorrect authentication credentials (e.g., API keys, tokens,
or certificates), expired authentication tokens, or insufficient permissions to
access the requested resource.
Root cause:
8. Transaction amounts outside the range of ₹10.00 to ₹50,000.00 are not permitted.
Root cause:
31