Skip to content

API Checkout - V1.2

Merchants can place orders by directly calling PayerMax server. Through this service, merchants can integrate various online payment methods such as debit cards, credit cards, and electronic wallets in India, Indonesia, and the Philippines. Easily have the ability to collect money from the Indian business.

1.Integration Steps

1.1 Call API and request to place an order

1.2 Open the H5 checkout page for users to pay according to the URL returned by PayerMax

1.3 Receive asynchronous callback notifications, process orders based on payment results

Diagram of Payments and Payment Results Asynchronous Notification

2.Payment parameters descriptions

Request and Response data format: application/json

2.1 Requested parameters:

PayerMax Payment Service Environment Address

ParametersTypeRequired or notMax. lengthDescriptionSample value
merchantIdStringYes30Merchant ID assigned by PayerMaxSP12345678
bizTypeStringYes30Business code, “paymentTransQry” needs to be entered here for this API.createTransOrder
versionStringYes5API version. Current value: 2.12.1
signStringYes64For the MD5 character string signature, see DD6F959727F2724B7FFFE16G8FF036F1
orderIdStringYes64Merchant order id, only includes a-z, A-Z, 0-9, _. Different for each payment order1535876516149
custIdStringYes64User ID provided by merchantZNW3e
subjectStringYes256Subject of order, which will be shown on cashier system. Suggest to assign goods title.3510 Gigs
countryCodeStringYes10For Country Code, capital letters, see IN
currencyStringYes8For Currency Code, capital letters, see
Must be consistent with countryCode, such as: Indian 'IN' corresponds to Indian Rupee 'INR'
INR
totalAmountStringYes64Order amount150.00
frontCallBackUrlStringYes256Front-end redirect URL. The user will be redirected to this address after completing the payment, starting with http/https. https://www.test.com/redirect/developer.html
usePayResultTypeStringYes8Define whether to show PayerMax result page. 0 = no; 1 = yes. Value ‘1’ by default. 1
transExpireTimeStringNo10Define the payment duration in seconds, which is only available in India. If the order has not been completed within the duration, it will be closed. Range up to 72 hours. The default duration is 30 minutes(1800 seconds). 1800
emailStringNo32Email
mobileNoStringNo15User’s phone no. This value will be acquired for convenient selection when user’s phone no. is required for any payment channel.
languageStringNo8Language settings, used to specify the display language of the cashier desk, English by default. Lowercase letters,see en
callbackUrlStringNo256Server-side call-back notification URLhttps://****.com/payermax/rechargeNotify

Requested parameters:

json
{
  "merchantId": "SP12345678",
  "bizType": "createTransOrder",
  "version": "2.1",
  "sign": "DD6F959727F2724B7FFFKI84DFF036F1",
  "orderId": "1535433446149",
  "custId": "ZNW3e",
  "subject": "3510 Gigs",
  "countryCode": "IN",
  "currency": "INR",
  "totalAmount": "150.00",
  "frontCallBackUrl": "https://****.com/redirect/developer.html",
  "usePayResultType": "1",
  "transExpireTime": "1800",
  "email": "",
  "mobileNo": "",
  "language": "en",
  "callbackUrl": "https://****.com/payermax/rechargeNotify"
}

2.2 Response parameters:

ParametersTypeRequiredMax.lengthDescriptionSample value
bizCodeStringYes10Response code0000
dataObjectYesResponse body,refer to the below【data parameters】
messageStringNo256Response description, interface error prompt

data parameters:

ParametersTypeRequiredMax.lengthDescriptionSample value
tradeNoStringYes64payermax Platform Order IDTRADE20190815020832111557141
orderIdStringYes64Merchant Order ID1535433533149
requestUrlStringYes1024Jump to the result address.This address is valid for 15 minutes, after which the link failshttps://****.com/redirect/developer.html
statusNumberYes2The order status:0-Pending,1-Success,2-Failed; This parameter shows the current order status. The existing order status will be returned when the request is repeated. 0
signStringYes64For the MD5 character string signature, DB73C116DE2F220A68BB96542885E171

Requested responses:

json
{
  "data": {
    "tradeNo": "TRADE201908150332111447141",
    "orderId": "153543346149",
    "requestUrl": "http://cashier-dev.payermax.com/index.html#/paySDKH5/cashierH5?merchantId=SP4189603&token=HrUbWDQkd7jcFp68AW2N7DOOHjb%2F9kh7RkljKNaLR7sgSfxVG5TvBbW89RNX%2ByQIU8P9auBWBCskuJJQxtO9HNZ%2BwhMG8lYR7l12k3%2FLaP%2BxhLEBDOjICucJS1bASn0V&tradeNo=TRADE20190815020832111447141&identifyId=8641043&language=en&usePayResultType=1&frontCallBackUrl=https%3A%2F%2Fxxx.com%2Fredirect%2Fdeveloper.html",
    "status": 0,
    "sign": "DB73C116DE2F220A68BB94322885E171"
  },
  "bizCode": "0000"
}

Response parameter processing example

js
//Response success
if(bizCode == "0000"){
    if(status == 0){
        //Jump to requestUrl
    }else if(status == 1){
        //Success
    }else{
        //Failure
    }
}

Released under the MIT License.