README

Merchant API Documentation

1. Login to the Merchant Dashboard

  • Contact the operations team to obtain your merchant dashboard link, login username, and password.

  • Ask the customer service to whitelist your login IPs.

  • After logging in, you have to change password and Google Authenticator Key first.

  • Then click the "API Settings" button at the top right.

2. Configure AccessKey and Auth IP Whitelist

  • Click Regenerate AccessKey, copy and save it in a secret place.

  • Ask the customer service to whitelist your Auth IPs (the server which you would raise the API requests).

  • Enter the Google Authenticator verification code.

  • Click Submit to apply the changes.

3. API Request Instructions

V2

  • When making requests, set the following in the Header:

Content-Type: application/json
Authorization: {MerchantID}
  • Example:

4. Callback Instructions

  • Only successful or failed orders will trigger a callback.

  • The callback URL can be specified individually when placing an order. If not specified, the system will use the default callback URL configured in the merchant dashboard.

  • Callback source IP: 65.20.91.228

  • Callback succeed when the endpoint responses with http code 200, other than that is failed.

  • Failed callbacks will automatically retry 3 times.

  • Callback method: POST

  • Callback content: AES-encrypted JSON string

Example: Callback Payload

Decrypted data:

5. AES Encryption Specification

  • Mode: ECB

  • Padding: PKCS7

  • Key Length: 256 bits

  • Key: Same as AccessKey

  • Character Encoding: UTF-8

  • Output Format: Base64

🔑 Example

  • Plaintext: Test

  • Key: ecb797f9e9feab0a92ab283978d33711

  • Encrypted Result: M2SwiX1fxQ5aJ34scDi0zA==

👉 Online testing tool: AES Encryption Toolarrow-up-right

6. API Endpoints and Environment

Test Environment Endpoint: https://api-beta.bharatpay.cc

Production Environment Endpoint: https://api.bharatpay.cc

⚠️ Before going live, please contact the operations team to obtain the production environment merchant dashboard link, and complete the following steps:

  • Reapply for and configure your AccessKey.

  • Fill your Auth IP whitelist.

Once all configurations are complete and tested successfully, you may switch to the production environment for live operations.

Last updated