Skip to content
Developer Tools
Accelerate development using AI assistants and tools

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 CodeRegionPayment MethodPayment DetailsInteraction ModeResponse Example
DEGermanyKlarnaNoneChannel Linkhttps://pay.klarna.com/eu/xxxxx
SGSingaporePayNowNoneQRCode"qrCode": "00020101021226580009SG.PAYNOW010120213xxxxx"
IDIndonesiaOVOaccountNo, accountNoTypeChannel LinkUser receives SMS -> Open channel link -> Enter verification code -> Payment successful

2. API Introduction ​

2.1 API List ​

Interaction ProcessCall DirectionAPI TypeAPI PATH
Create PaymentMerchant -> PayerMaxBackend API/orderAndPay
Payment Result Async NotificationPayerMax -> MerchantBackend API/collectResultNotifyUrl
Query Payment TransactionMerchant -> PayerMaxBackend 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 ​

json
"headers": {
        "Accept": "application/json",
        "sign": "Refer to signature rules: https://docs-v2.payermax.comen/202506-version/developer/config-settings.html",//必须
        "Content-Type": "application/json"
}

3. Start Integration ​

Merchant server initiates an HTTP POST request via the /orderAndPay API to create a payment.

/orderAndPay request example:

json
{
  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.

json
{
        "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:

json
{
  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.

json
{
        "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"
        }
}

Was this page helpful?

Thank you for your help in improving PayerMax Product Docs!

Released under the MIT License.