API Checkout - V1.0
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
Call API and request to place an order
Open the H5 checkout page for users to pay according to the URL returned by PayerMax
Receive asynchronous callback notifications, process orders based on payment results
2.Payment parameters descriptions
Request and Response data format: application/json
2.1 Requested parameters:
PayerMax Payment Service Environment Address
Parameters | Type | Required or not | Max. length | Description | Sample value |
merchantId | String | Yes | 30 | Merchant ID assigned by PayerMax | SP12345678 |
bizType | String | Yes | 30 | According to the authority of the contracted collection service, you can inquire about the business, and Indian cross-border "IN_CB ", other regions spread"CUSTOMIZE". | IN_CB |
version | String | Yes | 5 | API version. Current value: 2.3 | 2.3 |
sign | String | Yes | 64 | For the MD5 character string signature, see | DD6F959727F2724B7FFTY164DFF036F1 |
orderId | String | Yes | 64 | Merchant order id, only includes a-z, A-Z, 0-9, _. Different for each payment order | 1535433516669 |
userId | String | Yes | 64 | User ID provided by merchant | ZNW3e |
subject | String | Yes | 256 | Subject of order, which will be shown on cashier system. Suggest to assign goods title. | 3510 Gigs |
countryCode | String | No | 10 | For Country Code, capital letters, If the country code passed does not match the currency, the cash register will be displayed in the region corresponding to the currency,Refer to | IN |
currency | String | Yes | 3 | For Currency Code, capital letters, Refer to Must be consistent with countryCode, such as: Indian 'IN' corresponds to Indian Rupee 'INR' | INR |
totalAmount | String | Yes | 64 | Transaction amount from merchant, value range:[1,100000000],Up to 2 digits are supported after the decimal point. Note: the amount with decimal is not supported in Indonesia and Taiwan. | 150.00 |
frontCallBackUrl | String | Yes | 256 | Front-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 |
callbackUrl | String | No | 256 | Server-side call-back notification URL | https://****.com/payermax/rechargeNotify |
description | String | No | 256 | Order additional notes. | recharge 3510 Gigs |
+ paymentDetail | String | No | 256 | Define payment method information, content is JSON format character, | |
└ paymentType | String | No | 20 | paymentType code,refer to 【Collection method list of countries- paymentType Code】 After defining 'paymenttype', you can skip the payment method selection page and enter the information entry page of the specified payment method directly; If this parameter is not set, you can directly enter the front page of the cash register to display all payment methods | 00 |
└ accountNo | String | No | 64 | Payment account. For some wallets and UPI payments, you can pass in account information in order parameters to shorten the payment process of users. For details, refer to【Account Field Description】 | test@yesbank |
+ userDetail | String | No | 512 | User information, the content is a JSON format string, the specific content contains the following fields. Parameters see【 Rules for filling in userdetail】 | { "name": "CustName", "email": "com@iup", "phoneNumber": "50000000", "districtCode": "965" } |
└ name | String | No | 45 | The payer's name is 5-45 characters. If the payment channel requires the user to fill in the name, the value will be taken by default for the user's convenience | |
String | No | 32 | The payer's email address. If the payment channel requires the user to fill in the email address, this value will be taken by default for the user's convenience | xxx@gmail.com | |
└ phoneNumber | String | No | 15 | The payer's mobile number. If the payment channel requires the user to fill in the mobile number, this value will be taken by default for the user's convenience | 9101234123 |
└ districtCode | String | No | International area code of payer's mobile phone | ||
└ citizenIdNo | String | No | 10 | the payer’s identification number. | EBZPV8569H |
└ deviceId | String | No | Payer device identify | ||
└ ip | String | No | Payer device IP address | 127.0.0.1 | |
reference | String | No | 512 | Can be customized by merchants, feedback this field in the callback. | Item157 |
language | String | No | 8 | Language settings, lower case letters, are used to specify the display language of the cash register. If not, we will provide a suitable language to display the cash register according to the actual situation of users. See | en |
showResult | String | No | 8 | Define whether to show PayerMax result page. 0 = no; 1 = yes. Value ‘1’ by default. | 1 |
expireTime | String | No | 10 | Only available when bizType=CUSTOMIZE. Define 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 |
Requested parameters:
{
"merchantId": "SP12345678",
"bizType": "IN_CB",
"version": "2.3",
"sign": "DD6F959727F2724B7FFFE164DFF7756F1",
"orderId": "1535433513349",
"userId": "ZNW3e",
"subject": "3510 Gigs",
"countryCode": "IN",
"currency": "INR",
"totalAmount": "150.00",
"frontCallBackUrl": "https://****.com/redirect/developer.html",
"callbackUrl": "https://****.com/payermax/rechargeNotify",
"description": "recharge 3510 Gigs",
"paymentDetail": "{\"paymentType\":\"00\",\"accountNo\":\"test@yesbank\"}",
"userDetail": "{\"name\":\"James\",\"phoneNumber\":\"95562642\"}",
"reference": "Item157",
"language": "en",
"showResult": "1",
"expireTime": "1800"
}
2.2 Response parameters:
Parameters | Type | Required | Max.length | Description | Sample value |
bizCode | String | Yes | 10 | Response code | 0000 |
data | Object | Yes | Response body,It consists of **common parameters and specific parameters**,refer to the below【data parameters】 | ||
message | String | No | 256 | Response description, interface error prompt |
common parameters:
Parameters | Type | Required | Max.length | Description | Sample value |
tradeNo | String | Yes | 64 | payermax Platform Order ID | TRADE20190815020832881447141 |
orderId | String | Yes | 64 | Merchant Order ID | 15354453516149 |
requestUrl | String | Yes | 1024 | Jump to the result address.This address is valid for 15 minutes, after which the link fails | https://****.com/redirect/developer.html |
status | Number | Yes | 2 | The 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 |
sign | String | Yes | 64 | For the MD5 character string signature, | DB73C116DE2F220A68BB96542885E171 |
Requested responses:
{
"data": {
"tradeNo": "TRADE20190815055232111447141",
"orderId": "1535433533149",
"requestUrl": "http://cashier-dev.payermax.com/index.html#/paySDKH5/cashierH5?merchantId=SP4189603&token=HrUbWDQkd6jcFp68AW2N7DOOHjb%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": "DB73C116DE2F220A68BB96567885E171"
},
"bizCode": "0000"
}
Response parameter processing example
//Response success
if(bizCode == "0000"){
if(status == 0){
//Jump to requestUrl
} else if (status == 1){
//Success
} else {
//Failure
}
}
specific parameters: Specific parameters are returned in the specified scenario. Currently, they are only returned when the specified mode is Indonesian Carrier Billing. This operator parameter is suitable for merchants who need to package their own payment guidance screen. If the merchant has no such demand, the parameter can be ignored. Please refer to [Carrier Billing parameters] for details
2.3.Rules for filling in userdetail
Parameters | region | description | Sample value |
citizenIdNo | India | PAN card number of payer, 10 digits | EBZPV8569H |
Brazil | CPF card number of payer, 11 digits | 007.408.869-67 | |
Chile | Ci card number of payer, 8-9 digits | ||
Columbia | CC card number of payer, 6-10 digits | ||
Mexico | Curr card number of payer, 10-18 characters, including numbers or letters | ||
Peru | DNI card number of payer, 8-9 digits | ||
Paraguay | Ci card number of payer, 5-20 digits | ||
Uruguay | Ci card number of payer, 6-8 digits |
2.4 Product code
bizType | Service authority name |
CUSTOMIZE | Customized API |
IN_CB | India Cross-border payment |
3. AccountNo Field Description
Explanation the request parameter field [accountNo] of API order interface
The following payment methods, if the merchant passes in the corresponding accountNo, it will can skip the PayerMax register page and directly enter the corresponding payment page, shortening the user's operation path.
Area | Payment Type | Customized Type | Remark |
India | UPI | UPI collect | The 'accountNo' field needs to be passed into the user's UPI account |
Wallet | Paytm Wallet | The 'accountNo' field needs to be passed into the user's Paytm account | |
FreeCharge | The 'accountNo' field needs to be passed into the user's FreeCharge account |
4、Specific parameters - Carrier Billing parameters
When the value of the request parameter paymentType is Telkomsel , the operator parameters will be returned when the order is successful as follows:
Parameters | Type | Required | Max.length | Description | Sample value |
carrierBilling | Json | No | Carrier Billing parameters | ||
└ keyWord | String | No | 32 | keyword | REDS10K |
└ smsCode | String | No | 16 | SMS code | 39351 |
└ shortCode | String | No | 16 | addressee | 99899 |
└ phoneNumber | String | No | 32 | phone number | 081329041338 |
Response code example:
{
"bizCode": "0000",
"message": "success",
"data": {
"orderId": "20200724072000000009910",
"requestUrl": "https://cashier-alpha.shareitpay.in/index.html#/sms/instruction?merchantId=M36977092608&orderId=20200724072000000002410&countryCode=ID&language=en&tradeNo=TM000600202007290000001170430000&token=3T147T%2Fl0bGBb1g6IB33x9LwkCqUCH3nOWogtrxORXNsN71KJBHvMIWyf%2BG1el%2FS0TzHf73x9PORt3YN%2FghALnoaFc%2FzwUVn2Ok7q79oaVrSnNNCgAnZjB35CKgQaK%2Fo&identifyId=9738338&usePayResultType=0&frontCallBackUrl=http%3A%2F%2Fwww.baidu.com&payOrderNo=CP000600202007290000000550750000¤cy=IDR&preTaxAmount=5000.00&afterTaxAmount=5500.00&phoneNumber=081329041338&smsKeyword=REDS5K&smsCode=46421&smsShortCode=99899&smsType=0",
"tradeNo": "TM000600202007290005501170430000",
"status": 0,
"sign": "AB73C116DE2F130A67BB965428995E564",
"carrierBilling": "{\"phoneNumber\":\"0813290413638\",\"smsCode\":\"46421\",\"shortCode\":\"99899\",\"keyWord\":\"REDS5K\"}"
}
}
When the value of the request parameter paymentType is Tri, XL, Smartfren or Indosat, the operator parameters will be returned when the order is successful as follows:
Parameters | Type | Required | Max.length | Description | Sample value |
carrierBilling | Json | No | Carrier Billing parameters | ||
└ phoneNumber | String | No | 32 | phone number | 081329041333 |
Response code example:
{
"bizCode": "0000",
"message": "success",
"data": {
"orderId": "20200724072000000055414",
"requestUrl": "http://cashier-dev.shareitpay.in/index.html#/sms/instruction?merchantId=SP12345678&orderId=20200724072000000055414&countryCode=ID&language=en&tradeNo=TM014900202007296600004501170000&token=SdNY%7GzFsRKX91MTzQMCiB5Em0unfUXPy6oqmtgnTqtLRcItAzxoTccs%2BJD9CW57UhiIJAY2X8y3XVrTxJE%2FNhmBp1NtX4wZgsYlLnw%2BTG2Abrvb4xOLPu4tDSqhv7KC6&identifyId=9738338&usePayResultType=0&frontCallBackUrl=http%3A%2F%2Fwww.baidu.com&payOrderNo=CP014900202007290000005670090000¤cy=IDR&preTaxAmount=5000.00&afterTaxAmount=5688.00&phoneNumber=087803428358&smsKeyword=&smsCode=&smsShortCode=&smsType=1",
"tradeNo": "TM014900202007290000004661170000",
"status": 0,
"sign": "DB73C116DE2F220A67BB96542849E175",
"carrierBilling": "{\"phoneNumber\":\"087803447320\"}"
}
}