# India Payments API Documentation: www.deekpay.com

# India Payments API Documentation

1. Go to "Developer Centre" - "API Key" section, click "Create API Key". Each API key has its own configuration page and is bound to a fixed IP address ("0.0.0.0" means no IP filtering, allowing access from any IP). You can configure different API keys according to different needs. Be sure to keep your Access Key and Secret Key confidential to prevent loss of assets. Once a secret key is generated, it cannot be viewed again, so please make sure to save it in time. If you forget your secret key, you can recycle the key pair and request a new one in the merchant backend.

2. Click "Developer Centre" - "API Key".

3. Select whether to enable debug mode (when debug mode is enabled, you will receive standardised error messages and a log viewing address to view any errors).

4. Select the API key authority.

5. Enter the whitelisted address ("0.0.0.0" means any IP address is accessible).

Note: When entering whitelisted domain names, use commas to separate multiple IPs.

6. Click Create to generate the API key.

(After generating an API key, you can copy, view, edit and delete it in the "My API Keys" list below. Please note that the secret key only appears once when it is generated, so keep it safe. If you forget your secret key, please recycle the key pair and request a new one).

7. Click Edit to enable or disable the Start Debugging option, and modify the API key permissions and whitelist address. After modifying, click "Save".

8. Note: After creating or editing an API key, wait 90 seconds for the API key to take effect.

9. The current API key requires the following parameters in the request header:

- access_key: API access key (e.g., TPhoa7ZQ) - Required

- timestamp: millisecond timestamp (13 digits, e.g., 1679669488472) - Required

- nonce: UUID (36 digits, e.g., 02f7a04f-53cc-47d4-bb3f-fae69dab49ac) - Required

- sign: signature of the parameter (e.g., GXx2wYUD6UVr+zcmeCSFFPzcBLA=) - Required

10. API requests transmitted over the Internet are highly susceptible to tampering. To ensure the integrity of the request, private interfaces (excluding public interfaces, such as basic information and market data) must be authenticated with a signature using your API key to verify that the parameter or parameter value has not been altered during transmission.

11. A valid request contains the following components:

- access_key: API access key

- secret_key: secret key for signature encryption (only visible once in the background during API key application, please copy and save it securely, do not disclose it)

- timestamp: the time you sent the request (UTC time). For example, 1632811287325 (13 digits). Including this value in your query request helps prevent third parties from intercepting your request.

- nonce: random UUID string. For example, 053a1b81-48a0-4bb1-96b2-60f6e509d911 (36 digits)

- sign: the value calculated by the signature, used to ensure the validity and integrity of the signature

12. All interfaces are required to pass the above public parameters (excluding secret_key) in the HTTP request header. The public parameters include (access_key, timestamp, nonce, sign). Please refer to the API interface description for other signature parameters.

13. Define a Map dictionary object and add the parameters in the request as keys and values.

14. Add access_key, timestamp and nonce to the Map defined in step one.

15. Sort the attributes in the Map in ascending order according to ASCII (dictionary order) and convert the Map to a string in the format "key1=value1&key2=value2".

16. HMAC_SHA1 encrypt the string converted in the previous step using secret_key and Base64 encode it to get the sign parameter value. secret_key is the information in the apikey created by the merchant platform.

17. Add the sign value and other required parameters to the request header and send the request to the target interface.

18. SignUtil: Login to Cashier-Developer Centre-API Documentation-Signature Tool, open the SignUtil page (use a valid access_key in the tool and set the IP whitelist for this access_key to 0.0.0.0. It is highly recommended to discard the access_key after debugging is complete).

19. Request method: GET

Request URL: /ping

Response Data:

- version: String - returned if all interfaces in this document can be requested properly

- timestamp: int64 - Unix timestamps

20. Request method: POST

Request URL: /api/v3/ind/createCollectingOrder

Request Type: Header: {'Content-Type': 'application/json;charset=utf-8'}

Request Header:

- access_key: from merchant back office (e.g., pFqV75X3)

- timestamp: Unix timestamp (13 digits, milliseconds) (e.g., 1679724896223)

- nonce: UUID V4 (e.g., 794c26b0-d33c-4394-b2bb-c485eca16d9e)

- sign: calculated signature (e.g., kAXyh+eerqrefyaF8dyFB0M4FVo=)

21. Request parameters:

- amount: the amount to be received, with no more than 2 decimal places (String) (e.g. 40.20) - Required

- channelType: Payment Type (String) (e.g. BANK, UPI, IMPS, BANK) - Required

- externalOrderId: Merchant Order Number (max 64 characters) (String) (e.g., 716134866255702461) - Required

- notifyUrl: notifyURL (String, URL) (e.g., http://192.168.1.135:30001) - optional

- remark: Remarks (max 255 characters) (String) (e.g., 123) - optional

- returnUrl: return address (String, URL) (e.g., http://192.168.1.135:30001) - optional

22. Response type: Header: {'Content-Type': 'application/json;charset=utf-8'}

Response Data:

- cashierUrl: String - Cashier Link

- orderId: String - system order ID

- externalOrderId: String - Merchant Order ID

- currency: String - currency code

- amount: String - Collection amount

- tradeNote: String - Note

23. Request method: POST

Request URL: /api/v3/ind/createTransferOrder

Request Type: Header: {'Content-Type': 'application/json;charset=utf-8'}

Request Header:

- access_key: from merchant back office (e.g., pFqV75X3)

- timestamp: Unix timestamp (13 digits, milliseconds) (e.g., 1679724896223)

- nonce: UUID V4 (e.g., 794c26b0-d33c-4394-b2bb-c485eca16d9e)

- sign: calculated signature (e.g., kAXyh+eerqrefyaF8dyFB0M4FVo=)

24. Request parameters:

- currencyAmount: payment amount with no more than 2 decimal places (String) (e.g. 40.20) - Required

- channelType: Payment Type (String) (e.g. BANK) - Required

- externalOrderId: Merchant Order Number (max 64 characters) (String) (e.g., 687279463984441035) - Required

- accountId: Bank Account Number (String) (e.g. 13178968584) - Required

- accountType: Bank Account Type (String) (e.g. INR) - Required

- ifSC: Bank Code (String) (e.g., YESB) - required as applicable

- bankName: bank name (String) (e.g. YesBank) - optional depending on the situation

- userInfoName: user info (String) (e.g., test) - optional depending on the situation

- remark: Remarks (max 255 characters) (String) (e.g., 123) - optional

- notifyUrl: notifyURL (String, URL) (e.g., http://192.168.1.135:30001) - optional

25. Response type: Header: {'Content-Type': 'application/json;charset=utf-8'}

Response Data:

- orderId: String - Order ID

- orderStatus: String - Order Status

- externalOrderId: String - Merchant Order ID

- currencyType: String - legal tender type

26. Request method: POST

Request URL: /api/v3/ind/query/collectingOrder

Request Type: Header: {'Content-Type': 'application/json;charset=utf-8'}

Request Header:

- access_key: from merchant back office (e.g., pFqV75X3)

- timestamp: Unix timestamp (13 digits, milliseconds) (e.g., 1679724896223)

- nonce: UUID V4 (e.g., 794c26b0-d33c-4394-b2bb-c485eca16d9e)

- sign: calculated signature (e.g., kAXyh+eerqrefyaF8dyFB0M4FVo=)

27. Request parameters:

- externalOrderId: Merchant Order Number (max 64 characters) (String) - Required

- orderId: System Order Number (String) - Required

28. Response type: Header: {'Content-Type': 'application/json;charset=utf-8'}

Response Data:

- orderId: String - Order ID

- cashierId: String - Cashier ID

- orderType: int64 - Order Type

1 - Collections

- orderResourceType: int64 - order business type

2 - Legal tender orders

- userId: String - User ID

- orderStatus: int64 - Order Status

1 - to be paid

2 - Payment successful

- orderTime: int64 - order initiation time

- channelOrderId: String - the channel order ID that the order is associated with

- externalOrderId: String - merchant order number

- orderAmount: String - Order Amount

- orderActualAmount: String - actual order amount

- orderFee: int64 - Order Fee

- orderPayTime: int64 - orderPayTime

- orderCompleteTime: int64 - order completion time

- currencyType: String - currency type

- payType: int64 - payment type

102: BANK

202: BANK

- tradeNote: String - Note

- notifyUrl: String - callback URL

- markStatus: int64 - markStatus

- errorMsg: String - error message

- errorMsgEn: String - English error message

- accountType: String - account type

- accountName: String - account name

- accountNo: String - account number

- orderTypeCode: String - order type code

- orderResourceTypeCode: String - order business type code

- orderStatusCode: String - Order Status Description

- payTypeCode: String - payment type code (refer to payType)

29. Request method: POST

Request URL: /api/v3/ind/query/transferOrder

Request Type: Header: {'Content-Type': 'application/json;charset=utf-8'}

Request Header:

- access_key: from merchant back office (e.g., pFqV75X3)

- timestamp: Unix timestamp (13 digits, milliseconds) (e.g., 1679724896223)

- nonce: UUID V4 (e.g., 794c26b0-d33c-4394-b2bb-c485eca16d9e)

- sign: calculated signature (e.g., kAXyh+eerqrefyaF8dyFB0M4FVo=)

30. Request parameters:

- externalOrderId: Merchant Order Number (max 64 characters) (String) - Required

- orderId: System Order Number (String) - Required

31. Response type: Header: {'Content-Type': 'application/json;charset=utf-8'}

Response Data:

- orderId: String - Order ID

- cashierId: String - Cashier ID

- orderType: int64 - Order Type

2 - Payment

- orderResourceType: int64 - order business type

2 - Legal tender orders

- userId: String - User ID

- orderStatus: int64 - Order Status

1 - Accepted

2 - Bank processing in progress

4 - Failure (not accepted by banks)

8 - Success

16 - Failure

- orderTime: int64 - order initiation time

- channelOrderId: String - the channel order ID that the order is associated with

- externalOrderId: String - merchant order number

- orderAmount: String - Order Amount

- orderActualAmount: String - actual order amount

- orderFee: int64 - Order Fee

- orderPayTime: int64 - orderPayTime

- currencyType: String - currency type

- payType: int64 - payment type

102: BANK

202: BANK

- tradeNote: String - Note

- notifyUrl: String - callback URL

- markStatus: int64 - markStatus

- errorMsg: String - error message

- errorMsgEn: String - English error message

- accountType: String - account type

- accountName: String - account name

- accountNo: String - account number

- orderTypeCode: String - order type code

- orderResourceTypeCode: String - order business type code

- orderStatusCode: String - Order Status Description

- payTypeCode: String - payment type code (refer to payType)

32. Request method: GET

Request URL: /api/v3/ind/query/balance

Request Type: Header: {'Content-Type': 'application/json;charset=utf-8'}

Request Header:

- access_key: from merchant back office (e.g., pFqV75X3)

- timestamp: Unix timestamp (13 digits, milliseconds) (e.g., 1679724896223)

- nonce: UUID V4 (e.g., 794c26b0-d33c-4394-b2bb-c485eca16d9e)

- sign: calculated signature (e.g., kAXyh+eerqrefyaF8dyFB0M4FVo=)

33. Response type: Header: {'Content-Type': 'application/json;charset=utf-8'}

Response Data:

- accountBalance: String - account available balance

- accountFreezeAmount: String - account freeze amount

- accountStatusId: int64 - account status ID

- accountWaitSettledAmount: String - Account Wait Settled Amount

- currencyType: String - legal tender type

- accountStatus: String - account status

34. Request method: POST

Request URL: /api/v3/ind/query/bank

Request Type: Header: {'Content-Type': 'application/json;charset=utf-8'}

Request Header:

- access_key: from merchant back office (e.g., pFqV75X3)

- timestamp: Unix timestamp (13 digits, milliseconds) (e.g., 1679724896223)

- nonce: UUID V4 (e.g., 794c26b0-d33c-4394-b2bb-c485eca16d9e)

- sign: calculated signature (e.g., kAXyh+eerqrefyaF8dyFB0M4FVo=)

35. Request parameters:

If you need to query all banks, pass the empty string. Example:

- bankName: Bank Name (String) - Required

36. Response type: Header: {'Content-Type': 'application/json;charset=utf-8'}

Response Data:

- bankName: String - bank name

- bankCode: String - bank code

- currencyType: String - currency type

- channelBankId: String - channel bank ID

- channelId: String - Channel ID

- BankName: AndhraBank, Bank of Baroda, BandhanBank, CentralBank of India, CanaraBank, DCBBank, FederalBank, HDFCBank, ICICIBank. IDFCFirst Bank, IndianBank, IndianOverseasBank, KarnatakaBank, KotakMahindra Bank, KarurVysyaBank, PunjabNationalBank, StateBank of India, StandardCharteredBank, SouthIndianBank, SyndicateBank, UnionBank of India, UCOBank, UPI, AxisBank, YesBank, BNIB, Canara Bank, DCB Bank, Federal Bank, HDFC Bank, Punjab National Bank, Indian Bank, ICICI Bank, Syndicate Bank, Karur Vysya Bank, Union Bank of India, Kotak Mahindra Bank, IDFC First Bank, Andhra Bank, Karnataka Bank, icici corporate bank, Axis Bank, UCO Bank, South Indian Bank, Yes Bank, Standard Chartered Bank, State Bank of India, Indian Overseas Bank, Bandhana Bank, Indian Bank, ICICI Bank, Syndicate Bank, Karur Vysya Bank, Union Bank of India Indian Overseas Bank, Bandhan Bank, Central Bank of India, Bank of Baroda, UPI

37. Validation of the description:

API requests transmitted over the Internet are highly susceptible to tampering. To ensure the integrity of callbacks, you can set the callback parameter Signature Authentication. To set this, log in to Cashier - Developer Centre - Callback Address - Add.

38.