Direct API - APM
Under the direct API integration mode, merchants need to independently build relevant payment pages, such as checkout pages and payment result pages. Therefore, this mode requires merchants to invest more R&D costs. Most APMs integrated via direct API achieve the same effect as the specified payment method mode: they return a channel page where users complete the payment. For a small number of payment methods, merchants need to collect payment details independently and pass them to PayerMax; meanwhile, merchants are also required to hold PCI certification.
1. Supported Payment Methods
Payment methods that support direct API can be viewed in the payment method list. Below are examples of integration types for several common APM payment methods:
| Region Code | Region | Payment Method | Payment Details | Interaction Mode | Response Example |
| DE | Germany | Klarna | None | Channel Link | https://pay.klarna.com/eu/xxxxx |
| SG | Singapore | PayNow | None | QRCode | "qrCode": "00020101021226580009SG.PAYNOW010120213xxxxx" |
| ID | Indonesia | OVO | accountNo, accountNoType | Channel Link | User receives SMS -> Open channel link -> Enter verification code -> Payment successful |
2. API Introduction
2.1 API List
| Interaction Process | Call Direction | API Type | API PATH |
| Create Payment | Merchant -> PayerMax | Backend API | /orderAndPay |
| Payment Result Async Notification | PayerMax -> Merchant | Backend API | /collectResultNotifyUrl |
| Query Payment Transaction | Merchant -> PayerMax | Backend API | /orderQuery |
2.1.1 Environment Information
Test Environment:https://
pay-gate-uat.payermax.com/aggregate-pay/api/gateway/<API PATH>Integrated Environment:https://
pay-gate.payermax.com/aggregate-pay/api/gateway/<API PATH>
2.1.2 Request Header
"headers": {
"Accept": "application/json",
"sign": "Refer to signature rules: https://docs-v2.payermax.com/doc-center/developer/config-settings.html",//必须
"Content-Type": "application/json"
}3. Start Integration
Method 1: Return Channel Link
Merchant server initiates an HTTP POST request via the /orderAndPay API to create a payment.
/orderAndPay request example:
{
requestTime: '2026-02-27T10:27:58.936+08:00',
keyVersion: '1',
data: {
totalAmount: '1',
country: 'DE',
currency: 'EUR',
expireTime: '3600',
paymentDetail: {
paymentMethodType: 'PAY_LATER',
targetOrg: 'KLARNA',
buyerInfo: {
'clientIp': '146.75.136.237',
'userAgent': 'Chrome',
'email':'payermaxtest@gmail.com'
}
},
frontCallbackUrl: 'https://',
subject: 'River Game HK Limited',
outTradeNo: 'jemy1772159278936',
notifyUrl: 'https://',
userId: 'jemy123123',
integrate: 'Direct_Payment',
terminalType: 'WEB'
},
merchantNo: '010113827355079',
appId: '04d20279df374af8871d1da97c673894',
version: '1.5'
}Response: Directly return the channel payment page; the front-end opens the page for users to complete payment.
{
"msg": "Success.",
"code": "APPLY_SUCCESS",
"data": {
"redirectUrl": "https://pay.klarna.com/eu/hpp/payments/2e2p3LJ",
"outTradeNo": "jemy1772159278936",
"tradeToken": "T2026022702039087822428",
"status": "PENDING"
}
}Method 2: Return QRCode
Merchant server initiates an HTTP POST request via the /orderAndPay API to create a payment.
/orderAndPay request example:
{
requestTime: '2026-02-27T10:55:36.747+08:00',
keyVersion: '1',
data: {
totalAmount: '1',
country: 'SG',
currency: 'SGD',
expireTime: '3600',
paymentDetail: {
paymentMethodType: 'REALTIME_PAYMENT',
targetOrg: 'PAYNOW',
buyerInfo: {
'clientIp': '146.75.136.237',
'userAgent': 'Chrome',
'email':'payermaxtest@gmail.com'
}
},
frontCallbackUrl: 'https://',
subject: 'River Game HK Limited',
outTradeNo: 'jemy1772160936746',
notifyUrl: 'https://',
userId: 'jemy123123',
integrate: 'Direct_Payment',
terminalType: 'WEB'
},
merchantNo: '010113827355079',
appId: '04d20279df374af8871d1da97c673894',
version: '1.5'
}Response: Decode the returned qrCode and display it on the front-end page; users scan the QR code to complete payment.
{
"msg": "Success.",
"code": "APPLY_SUCCESS",
"data": {
"contentExpireTime": "2026-02-27T03:50:38.218Z",
"qrCode": "00020101021226580009SG.PAYNOW010120213202038734WIPY0301004142026022711503852040000530370254041.005802SG5925SMART MEDIA4U TECHNOLOGY 6009Singapore62200116PPC33920008096756304401D",
"outTradeNo": "jemy1772160936746",
"tradeToken": "T2026022702339289832484",
"status": "PENDING"
}
}