Direct API
- Endpoint:
POST /aggregate-pay/api/gateway/orderAndPay/delSuffixStart1(Auth-capture) - Tags: Collection Service/Auth Capture
Description
Merchants want to integrate the payment flow on their cashier page, PayerMax provides Direct API access. For the Direct API interface, merchants need to have PCI-DSS certification if they process card number information by themselves.
Parameters
| Field | In | Type | Required | Constraints | Description |
|---|---|---|---|---|---|
Content-Type | header | string | Yes | ||
sign | header | string | Yes | 签名信息请参考技术文档 |
Parameter Examples
Content-Type:"application/json"sign:"FPFVT3o227JrFRbqu19boZCpVVTF9KznxyRawUmxpfXilHV/0yK46haPhAjNu1hPUMy7Vw/ILXhfzffNm4Fj0apWknlTY9OJxnSoQxS9BTFtc61tn5yV1q69x/kkBl82/qwg+XTJ4fOzy7Mar3VaC1E2PlDA6RkkKBUyNE6RYgsdB+Su7an4+4HVTNAnoe74WyvBgxTLMNg28igBTdqxaO3w/UBY6ObVp7vkqkQGdL1Y+HgmMYaAVwrM3+ALWGId0sJ+YqTY4WJ+0xCRGhaSnybiIjZsQEYyID68WNUfuavDLDsEhaMm/HfQvf5p0R1Ltovp3wwJnEbQcjY458iX5A=="
Request Body
Content-Type: application/json
| Field | Type | Required | Constraints | Description | Enum |
|---|---|---|---|---|---|
version | string | Yes | API version. Current value: 1.5 | ||
keyVersion | string | Yes | Signature Algorithm Version, Current value: 1 | ||
requestTime | string | Yes | Request time, compliant with rfc3339 specification, format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX The time must be within two minutes of the current time | ||
appId | string | Yes | Merchant AppId,The unique identifier assigned to the merchant app by PayerMax | ||
merchantNo | string | No | maxLength: 32 | Merchant Id, the unique identifier generated when the merchant signs the contract with PayerMax | |
data | object | Yes | Request data body. | ||
data.outTradeNo | string | Yes | maxLength: 64 | Merchant order id, which uniquely identifies a transaction of the merchant, cannot be repeated, and can only contain letters (Case sensitivity not supported), numbers, and underlines.For example, AAA and AAa are considered the same. | |
data.integrate | string | Yes | maxLength: 16 | The merchant collects the payer's payment information by itself and sends it to PayerMax for transaction processing. Incoming parameter: Direct_Payment | |
data.captureMode | string | No | The Capture Mode:MANUAL | ||
data.authorizationType | string | No | The Authorization type: FINAL_AUTH | ||
data.subject | string | Yes | maxLength: 256 | Order title or product information, which will be displayed on the user payment page, please avoid using pure numbers. Note: it cannot exceed 43 digits for Brazil Pix. | |
data.totalAmount | number | Yes | The order amount is passed in by the merchant. The decimal point supported by the currency of each country.See【Supported Country/Region and Currency】,Risk control limit list.See【Risk control limit list】 | ||
data.currency | string | Yes | maxLength: 3 | Currency code, capital letter see【Supported Country/Region and Currency】 | |
data.country | string | Yes | maxLength: 2 | Country code, capital letters,If the passed country code does not match the currency, the cashier will be displayed in the region corresponding to the currency code. If a payment method is specified, the country must be sent, see【Supported Country/Region and Currency】 | |
data.userId | string | Yes | maxLength: 64 | The user ID of the merchant, needs to ensure the uniqueness of each user ID. After the payment method is bound, the payment method will be recommended according to the userId. | |
data.expireTime | string | No | maxLength: 16 | Define the payment duration in seconds, If the order has not been completed within the duration, it will be closed. The range is 1800~86400. | |
data.paymentDetail | object | Yes | Payment method information 1. Specify a certain type of payment method, such as BANK_TRANSFER, CARRIER_BILLING 2. Specify designated paymentMethodType + targetOrg. | ||
data.paymentDetail.paymentMethodType | string | Yes | maxLength: 16 | payment method, mandatory, see【Direct API - Payment Method List】 | |
data.paymentDetail.targetOrg | string | No | maxLength: 32 | The target institution is mandatory except when the paymentMethodType is card. | |
data.paymentDetail.tokenForFutureUse | boolean | No | true means that the user has been authorized to bind payment information for subsequent use, the default is false | ||
data.paymentDetail.paymentTokenID | string | No | maxLength: 64 | PMMax token,pay after successful authorization | |
data.paymentDetail.payAccountInfo | array[object] | No | Target institutions under some payment methods need to upload the user’s payment account information in the target institution. Please refer to the list of account types supported for uploading under【Direct API - Payment Method List】 | ||
data.paymentDetail.payAccountInfo[].accountNo | string | No | maxLength: 32 | The payment account registered by the user in the target institution under this payment method. | |
data.paymentDetail.payAccountInfo[].accountNoType | string | No | maxLength: 255 | account type:EMAIL,PHONE,ACCOUNT. | |
data.paymentDetail.cardInfo | object | No | Card information. | ||
data.paymentDetail.cardInfo.cardIdentifierNo | string | No | maxLength: 19 | card ID, card number. | |
data.paymentDetail.cardInfo.cardHolderFullName | string | No | maxLength: 64 | Cardholder’s Name. | |
data.paymentDetail.cardInfo.cardExpirationMonth | string | No | maxLength: 2 | Card Expiration Date - month, two digits. | |
data.paymentDetail.cardInfo.cardExpirationYear | string | No | maxLength: 2 | Card Expiration Date - year, only the last two years are taken. | |
data.paymentDetail.cardInfo.cvv | string | No | maxLength: 4 | Card cvv, three digits for Visa and Master, four digits for AMEX. | |
data.paymentDetail.cardInfo.stored | string | No | Indicates whether the card payment transaction has been saved. Saved card: Y Not saved card: Leave blank or other value | ||
data.paymentDetail.cardInfo.dynamic3DS | string | No | maxLength: 64 | dynamic 3ds (case insensitive) do3DS: Perform 3D Secure for this order. no3DS: Do not perform 3D Secure for this order. ext3DS: Use external 3DS results, suitable for merchants who have integrated 3DS services. The info3DSecure object is required when using this value. If no value is passed or other values are passed in, PayerMax will determine whether to initiate 3ds | |
data.paymentDetail.buyerInfo | object | Yes | buyer information. | ||
data.paymentDetail.buyerInfo.firstName | string | No | maxLength: 64 | first name of the user. | |
data.paymentDetail.buyerInfo.middleName | string | No | maxLength: 64 | middle name of the user. | |
data.paymentDetail.buyerInfo.lastName | string | No | maxLength: 64 | last name of the user. | |
data.paymentDetail.buyerInfo.email | string | No | maxLength: 255 | user email | |
data.paymentDetail.buyerInfo.phoneNo | string | No | maxLength: 32 | phone number of the user. | |
data.paymentDetail.buyerInfo.phoneNoRegion | string | No | maxLength: 16 | phone no region. | |
data.paymentDetail.buyerInfo.idType | string | No | maxLength: 32 | Id type. | |
data.paymentDetail.buyerInfo.idNo | string | No | maxLength: 64 | Id NO. | |
data.paymentDetail.buyerInfo.taxType | string | No | maxLength: 32 | For tax types, please refer to 【Personal Identification】 | |
data.paymentDetail.buyerInfo.taxNo | string | No | maxLength: 64 | For tax number, please refer to 【Personal Identification】 | |
data.paymentDetail.buyerInfo.address | string | No | maxLength: 1024 | user’s address. | |
data.paymentDetail.buyerInfo.city | string | No | maxLength: 64 | user’s city. | |
data.paymentDetail.buyerInfo.region | string | No | maxLength: 64 | user’s region. | |
data.paymentDetail.buyerInfo.zipCode | string | No | maxLength: 32 | post code. | |
data.paymentDetail.buyerInfo.clientIp | string | Yes | The user's IP address. Must be in standard IPv4 or IPv6 format. | ||
data.paymentDetail.buyerInfo.userAgent | string | Yes | User browser information. | ||
data.paymentDetail.info3DSecure | object | No | When merchants use ext3DS, the external 3DS information sent.Note: You must contact technical support in advance to activate related functions | ||
data.paymentDetail.info3DSecure.threeDSVersion | string | No | 3ds version number | ||
data.paymentDetail.info3DSecure.eci | string | No | eci value | ||
data.paymentDetail.info3DSecure.cavv | string | No | cavv value | ||
data.paymentDetail.info3DSecure.dsTransactionId | string | No | dsTransactionId value | ||
data.paymentDetail.info3DSecure.xid | string | No | xid value | ||
data.paymentDetail.merchantInitiated | boolean | No | Indicates whether it is a MIT transaction. If not passed, it defaults to false. | ||
data.paymentDetail.mitType | string | No | mit type | SCHEDULED, UNSCHEDULED | |
data.goodsDetails | array[object] | No | The goods that the user buys. A list can be submitted. Note:E-commerce industy needs to send.If the object is passed in, the inner required fields must be passed in | ||
data.goodsDetails[].goodsId | string | Yes | maxLength: 64 | goods ID. | |
data.goodsDetails[].goodsName | string | Yes | maxLength: 128 | goods name. | |
data.goodsDetails[].quantity | string | Yes | maxLength: 16 | goods amount. | |
data.goodsDetails[].price | string | Yes | maxLength: 20 | Price set by the merchant system. | |
data.goodsDetails[].goodsCurrency | string | No | maxLength: 3 | goods currency, capital letters,see【Supported Country/Region and Currency】 | |
data.goodsDetails[].showUrl | string | No | maxLength: 128 | goods URL. | |
data.goodsDetails[].goodsCategory | string | No | maxLength: 128 | goods Category. | |
data.subMerchant | object | No | Submerchant Information, Platform merchants need to submit sub-merchant information. | ||
data.subMerchant.subMerchantNo | string | No | maxLength: 64 | Submerchant ID. | |
data.shippingInfo | object | No | shipping info. Note:E-commerce industy needs to send.If the object is passed in, the inner required fields must be passed in | ||
data.shippingInfo.firstName | string | Yes | maxLength: 64 | shipping first name. | |
data.shippingInfo.middleName | string | No | maxLength: 64 | shipping middle name. | |
data.shippingInfo.lastName | string | Yes | maxLength: 64 | shipping last name. | |
data.shippingInfo.phoneNo | string | Yes | maxLength: 32 | shipping phone no. | |
data.shippingInfo.email | string | Yes | maxLength: 255 | shipping email address. | |
data.shippingInfo.address1 | string | Yes | maxLength: 1024 | shipping address 1. | |
data.shippingInfo.address2 | string | No | maxLength: 1024 | shipping address 2. | |
data.shippingInfo.address3 | string | No | maxLength: 1024 | shipping address 3. | |
data.shippingInfo.city | string | Yes | maxLength: 64 | city of the shipping address | |
data.shippingInfo.region | string | No | maxLength: 64 | region of the shipping address. | |
data.shippingInfo.state | string | No | maxLength: 32 | State of the shipping address Required for shipping to Canada, US, UK, Australia. | |
data.shippingInfo.country | string | Yes | maxLength: 2 | country of the shipping address. | |
data.shippingInfo.zipCode | string | Yes | maxLength: 32 | zipcode of the shipping address. | |
data.billingInfo | object | No | Billing Information.Note: If the object is passed in, the inner required fields must be passed in | ||
data.billingInfo.firstName | string | No | maxLength: 64 | biller name. | |
data.billingInfo.middleName | string | No | maxLength: 64 | biller middle name. | |
data.billingInfo.lastName | string | No | maxLength: 64 | biller last name. | |
data.billingInfo.phoneNo | string | No | maxLength: 32 | biller phone no. | |
data.billingInfo.email | string | Yes | maxLength: 255 | biller email address. | |
data.billingInfo.address1 | string | Yes | maxLength: 1024 | Billing Address 1. | |
data.billingInfo.address2 | string | No | maxLength: 1024 | Billing Address 2. | |
data.billingInfo.address3 | string | No | maxLength: 1024 | Billing Address 3. | |
data.billingInfo.city | string | Yes | maxLength: 64 | City of billing address. | |
data.billingInfo.country | string | Yes | maxLength: 2 | Country of billing address. | |
data.billingInfo.region | string | No | maxLength: 64 | Region of billing address. | |
data.billingInfo.state | string | No | maxLength: 32 | State of billing address Shipping is required in Canada, USA, UK, Australia. | |
data.billingInfo.zipCode | string | No | maxLength: 16 | Billing Address Zip Code. | |
data.envInfo | object | No | environmental information | ||
data.envInfo.deviceId | string | No | Merchant device unique identifier | ||
data.envInfo.deviceLanguage | string | No | Device default language | ||
data.envInfo.screenHeight | string | No | device height | ||
data.envInfo.screenWidth | string | No | device width | ||
data.language | string | No | maxLength: 16 | Cashier page language.【Supported Country/Region and Currency】 The priority is: the language last used by the user > the language of the user's browser > the country language of the user's IP > the language of the merchant's order > Default EN | |
data.riskParams | object | No | Risk control business data,see:【Risk Information】. This part of information is usually used as supplementary information for customized risk control. If customized risk control is not enabled, it can be left blank. | ||
data.terminalType | string | Yes | maxLength: 3 | Device terminal, WEB, WAP, APP. | |
data.osType | string | No | Device operating system, when the device terminal is Wap and App, the device operating system can be ANDROID or IOS. | ||
data.reference | string | No | maxLength: 512 | Merchant custom additional data, which can support merchant customization and return in the response. | |
data.frontCallbackUrl | string | Yes | maxLength: 1024 | The redirect URL specified by the merchant, the user will be redirected to this address after completing the payment, starting with http/https or the scheme address of the merchant’s application. FrontCallbackUrl is mandated for API-only payment to support callback transactions that need to redirect to external links. | |
data.notifyUrl | string | No | maxLength: 256 | Server-side callback notification URL, starting with http/https The merchant notification address can be configured through the MerchantDashboard platform. If the transaction is uploaded, the transaction shall prevail.Note: If the merchant platform does not configure a notifyUrl and the transaction does not have a sending notifyUrl, callback notification cannot be made. | |
data.subscriptionPlan | object | No | subscription plan info | ||
data.subscriptionPlan.subscriptionNo | string | Yes | maxLength: 64, minLength: 1 | The subscription order number generated after creating a subscription plan through PayerMax, it is necessary when activating the subscription plan. |
Example: 1
json
{
"version": "1.5",
"keyVersion": "1",
"requestTime": "2022-02-25T09:23:06.473+00:00",
"appId": "6666c8b036a24579974497c2f9800001",
"merchantNo": "020213834421284",
"data": {
"outTradeNo": "Test1645780876511",
"subject": "this is subject",
"totalAmount": 1,
"captureMode": "MANUAL",
"authorizationType": "FINAL_AUTH",
"currency": "AED",
"country": "AE",
"userId": "userId001",
"integrate": "Direct_Payment",
"paymentDetail": {
"paymentMethodType": "CARD",
"cardInfo": {
"cardIdentifierNo": "4001563861135570",
"cardHolderFullName": "James Smith",
"cardExpirationMonth": "05",
"cardExpirationYear": "25",
"cvv": "123"
},
"buyerInfo": {
"firstName": "James",
"lastName": "Smith",
"phoneNo": "903124360628",
"email": "james@google.com",
"clientIp": "124.156.108.193",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36"
}
},
"goodsDetails": [
{
"goodsId": "D002",
"goodsName": "Key buckle",
"quantity": "2",
"price": "0.5",
"goodsCurrency": "AED",
"showUrl": "http://xxx.com",
"goodsCategory": "goods"
}
],
"envInfo": {
"deviceId": "eYOIkvFpZzztg00Yu6USdprBQZCWxDhiUAHCiK&K/cH9mT6wMaMOzAKe",
"deviceLanguage": "zh_CN",
"screenHeight": 768,
"screenWidth": 1024
},
"shippingInfo": {
"firstName": "James",
"lastName": "Smith",
"phoneNo": "903124360628",
"email": "James@google.com",
"address1": "GOLGELI SOKAK NO.34, 06700",
"city": "GAZIOSMANPASA/ANKAR",
"country": "TR",
"zipCode": "06700"
},
"billingInfo": {
"firstName": "James",
"lastName": "Smith",
"phoneNo": "903124360628",
"email": "James@google.com",
"address1": "GOLGELI SOKAK NO.34, 06700",
"city": "GAZIOSMANPASA/ANKAR",
"country": "TR",
"zipCode": "06700"
},
"language": "en",
"reference": "020213827524152",
"frontCallbackURL": "https://www.payermax.com",
"notifyUrl": "https://www.payermax.com"
}
}Example: 2
Card Pay
json
{
"requestTime": "2025-06-26T20:11:22.895+08:00",
"keyVersion": "1",
"data": {
"country": "SA",
"frontCallbackUrl": "http://www.frontCallbackUrl.example.com",
"subject": "MacPro14 and Mouse",
"userId": "orderAndPayUserIdF4aiPqY3VG",
"integrate": "Direct_Payment",
"terminalType": "WEB",
"totalAmount": "100",
"paymentDetail": {
"cardInfo": {
"cvv": "123",
"cardIdentifierNo": "4444333322221111",
"cardExpirationMonth": "03",
"cardExpirationYear": "30",
"cardHolderFullName": "James Smith"
},
"buyerInfo": {
"userAgent": "userAgent",
"clientIp": "182.11.22.22"
},
"paymentMethodType": "CARD"
},
"outTradeNo": "orderAndPayOutTradeNo1750939882895u76ofjW6PQ",
"notifyUrl": "http://www.notifyUrl.example.com",
"currency": "SAR"
},
"appId": "d27183b7f2ea4822aa722d9efa8e7a8b",
"version": "1.5",
"merchantNo": "SDP01010115045982"
}Example: 3
googlePay
json
{
"requestTime": "2025-06-26T20:11:21.891+08:00",
"keyVersion": "1",
"data": {
"country": "SA",
"frontCallbackUrl": "http://www.frontCallbackUrl.example.com",
"subject": "MacPro14 and Mouse",
"userId": "orderAndPayUserId5Sc3VW3Xlv",
"integrate": "Direct_Payment",
"terminalType": "WEB",
"totalAmount": "100",
"paymentDetail": {
"googlePayDetails": {
"expirationYear": "2026",
"expirationMonth": "01",
"pan": "4336680020191751",
"authMethod": "CRYPTOGRAM_3DS",
"eciIndicator": "02",
"cryptogram": "AAAAAA..."
},
"buyerInfo": {
"userAgent": "userAgent",
"clientIp": "182.11.22.22"
},
"paymentMethodType": "GOOGLEPAY"
},
"outTradeNo": "orderAndPayOutTradeNo1750939881891mqkJIYHAD8",
"notifyUrl": "http://www.notifyUrl.example.com",
"currency": "SAR"
},
"appId": "d27183b7f2ea4822aa722d9efa8e7a8b",
"version": "1.5",
"merchantNo": "SDP01010115045982"
}Example: 4
applePay
json
{
"requestTime": "2025-06-26T20:11:19.422+08:00",
"keyVersion": "1",
"data": {
"country": "SA",
"frontCallbackUrl": "http://www.frontCallbackUrl.example.com",
"subject": "MacPro14 and Mouse",
"userId": "orderAndPayUserIdoFRPz2kYvr",
"integrate": "Direct_Payment",
"terminalType": "WEB",
"totalAmount": "100",
"paymentDetail": {
"applePayPaymentData": {
"deviceManufacturerIdentifier": "040010030273",
"applicationPrimaryAccountNumber": "4761209400215743",
"transactionAmount": "100",
"paymentData": {
"onlinePaymentCryptogram": "AqhVFUwAAuM69WEZxe+OMAACAAA=",
"eciIndicator": "7"
},
"paymentDataType": "3DSecure",
"currencyCode": "344",
"applicationExpirationDate": "231231"
},
"buyerInfo": {
"userAgent": "userAgent",
"clientIp": "182.11.22.22"
},
"paymentMethodType": "APPLEPAY"
},
"outTradeNo": "orderAndPayOutTradeNo1750939879422YKdAj2nTzV",
"notifyUrl": "http://www.notifyUrl.example.com",
"currency": "SAR"
},
"appId": "d27183b7f2ea4822aa722d9efa8e7a8b",
"version": "1.5",
"merchantNo": "SDP01010115045982"
}Example: 5
token-first
json
{
"requestTime": "2025-06-26T20:11:35.336+08:00",
"keyVersion": "1",
"data": {
"country": "SA",
"frontCallbackUrl": "http://www.frontCallbackUrl.example.com",
"subject": "MacPro14 and Mouse",
"userId": "TokenPay_USERIDCDd6W14OLi",
"integrate": "Direct_Payment",
"terminalType": "WEB",
"totalAmount": "100",
"paymentDetail": {
"cardInfo": {
"cvv": "123",
"cardIdentifierNo": "4444333322221111",
"cardExpirationMonth": "03",
"cardExpirationYear": "30",
"cardHolderFullName": "James Smith"
},
"tokenForFutureUse": true,
"buyerInfo": {
"userAgent": "userAgent",
"clientIp": "182.11.22.22"
},
"paymentMethodType": "CARD"
},
"outTradeNo": "orderAndPayOutTradeNo1750939895336PuVDesFayU",
"notifyUrl": "http://www.notifyUrl.example.com",
"currency": "SAR"
},
"appId": "d27183b7f2ea4822aa722d9efa8e7a8b",
"version": "1.5",
"merchantNo": "SDP01010115045982"
}Example: 6
token-follow up
json
{
"requestTime": "2025-06-26T20:11:36.206+08:00",
"keyVersion": "1",
"data": {
"country": "SA",
"frontCallbackUrl": "http://www.frontCallbackUrl.example.com",
"subject": "MacPro14 and Mouse",
"userId": "TokenPay_USERIDCDd6W14OLi",
"integrate": "Direct_Payment",
"terminalType": "WEB",
"totalAmount": "100",
"paymentDetail": {
"tokenForFutureUse": false,
"buyerInfo": {
"userAgent": "userAgent",
"clientIp": "182.11.22.22"
},
"paymentTokenID": "PMTOKEN20250626121135955468420000003",
"paymentMethodType": "CARD"
},
"outTradeNo": "TokenPay_outTradeNo1Yfx63ylWs",
"notifyUrl": "http://www.notifyUrl.example.com",
"currency": "SAR"
},
"appId": "d27183b7f2ea4822aa722d9efa8e7a8b",
"version": "1.5",
"merchantNo": "SDP01010115045982"
}Example: 7
apm-redirect
json
{
"requestTime": "2025-06-26T20:11:18.336+08:00",
"keyVersion": "1",
"data": {
"country": "DE",
"frontCallbackUrl": "http://www.frontCallbackUrl.example.com",
"subject": "MacPro14 and Mouse",
"userId": "orderAndPayUserIdiwJYCnF0m7",
"integrate": "Direct_Payment",
"terminalType": "WEB",
"totalAmount": "100",
"paymentDetail": {
"targetOrg": "KLARNA",
"buyerInfo": {
"userAgent": "userAgent",
"clientIp": "182.11.22.22"
},
"paymentMethodType": "PAY_LATER"
},
"outTradeNo": "orderAndPayOutTradeNo1750939878336UokUa96TMY",
"notifyUrl": "http://www.notifyUrl.example.com",
"currency": "EUR"
},
"appId": "d27183b7f2ea4822aa722d9efa8e7a8b",
"version": "1.5",
"merchantNo": "SDP01010115045982"
}Example: 8
token-direct
json
{
"requestTime": "2025-06-26T20:11:17.568+08:00",
"keyVersion": "1",
"data": {
"country": "ID",
"frontCallbackUrl": "http://www.frontCallbackUrl.example.com",
"subject": "MacPro14 and Mouse",
"userId": "orderAndPayUserIdzwE3HzfblB",
"integrate": "Direct_Payment",
"terminalType": "WEB",
"totalAmount": "100000",
"paymentDetail": {
"targetOrg": "BCA",
"buyerInfo": {
"userAgent": "userAgent",
"clientIp": "182.11.22.22"
},
"paymentMethodType": "BANK_TRANSFER"
},
"outTradeNo": "orderAndPayOutTradeNo1750939877568AcCRKeNm72",
"notifyUrl": "http://www.notifyUrl.example.com",
"currency": "IDR"
},
"appId": "d27183b7f2ea4822aa722d9efa8e7a8b",
"version": "1.5",
"merchantNo": "SDP01010115045982"
}Example: 9
apm-qrcode
json
{
"requestTime": "2025-06-26T20:11:16.895+08:00",
"keyVersion": "1",
"data": {
"country": "ID",
"frontCallbackUrl": "http://www.frontCallbackUrl.example.com",
"subject": "MacPro14 and Mouse",
"userId": "orderAndPayUserIdWIzHxQEHtR",
"integrate": "Direct_Payment",
"terminalType": "WEB",
"totalAmount": "100000",
"paymentDetail": {
"targetOrg": "GOPAY",
"buyerInfo": {
"userAgent": "userAgent",
"clientIp": "182.11.22.22"
},
"paymentMethodType": "WALLET"
},
"outTradeNo": "orderAndPayOutTradeNo1750939876895m7AiFoV1nt",
"notifyUrl": "http://www.notifyUrl.example.com",
"currency": "IDR"
},
"appId": "d27183b7f2ea4822aa722d9efa8e7a8b",
"version": "1.5",
"merchantNo": "SDP01010115045982"
}Example: 10
apm-cpf
json
{
"requestTime": "2025-06-26T20:11:16.008+08:00",
"keyVersion": "1",
"data": {
"country": "BR",
"frontCallbackUrl": "http://www.frontCallbackUrl.example.com",
"subject": "MacPro14 and Mouse",
"userId": "orderAndPayUserIdUDqUvvX50y",
"integrate": "Direct_Payment",
"terminalType": "WEB",
"totalAmount": "100",
"paymentDetail": {
"targetOrg": "MERCADOPAGO",
"buyerInfo": {
"clientIp": "182.11.22.22",
"userAgent": "userAgent",
"taxNo": "17943231554",
"taxType": "CPF"
},
"paymentMethodType": "WALLET"
},
"outTradeNo": "orderAndPayOutTradeNo1750939876008MIdEpXyvN4",
"notifyUrl": "http://www.notifyUrl.example.com",
"currency": "BRL"
},
"appId": "d27183b7f2ea4822aa722d9efa8e7a8b",
"version": "1.5",
"merchantNo": "SDP01010115045982"
}Responses
200
| Field | Type | Required | Constraints | Description | Enum |
|---|---|---|---|---|---|
code | string | Yes | Return code, ‘APPLY_SUCCESS’ means success.It only represents the success of the interface request, not the order status. | ||
msg | string | Yes | Return message, ‘Success.’.It only represents the success of the interface request, not the order status. | ||
data | object | No | Return data body. | ||
data.outTradeNo | string | Yes | maxLength: 64 | Merchant order id. order id. | |
data.tradeToken | string | Yes | maxLength: 64 | PayerMax order id. | |
data.status | string | Yes | maxLength: 32 | transaction status. | |
data.redirectUrl | string | No | maxLength: 1024 | redirect link; Some payment methods need to jump to the outside to complete the payment. |
Response Example: 1
成功示例
json
{
"code": "APPLY_SUCCESS",
"msg": " Success.",
"data": {
"outTradeNo": "Test1645780876511",
"tradeToken": "T2024062702289232000001",
"status": "SUCCESS"
}
}Response Example: 2
apm-redirect-response
json
{
"msg": "Success.",
"code": "APPLY_SUCCESS",
"data": {
"redirectUrl": "https://cashier-n-uat.payermax.com/v2/index.html#/mocks?simulatorType=payment&pmaxUrlMock=1&referenceNo=UPC594700175093987893951000031&merchantId=SDP01010115045982&merchantAppId=d27183b7f2ea4822aa722d9efa8e7a8b&tradeToken=T2025062612594747000086&payRequestNo=20250626121118EP2094594711153204T05&token=8cfe3859f5f04c5783481a26089c6416",
"outTradeNo": "orderAndPayOutTradeNo1750939878336UokUa96TMY",
"tradeToken": "T2025062612594747000086",
"status": "PENDING"
}
}Response Example: 3
apm-direct-response
json
{
"msg": "Success.",
"code": "APPLY_SUCCESS",
"data": {
"vaCode": "TEST***001",
"outTradeNo": "orderAndPayOutTradeNo1751265358900gHyeC8LHpb",
"tradeToken": "T2025063006003647012140",
"status": "PENDING"
}
}Response Example: 4
apm-qrcode-response
json
{
"msg": "Success.",
"code": "APPLY_SUCCESS",
"data": {
"redirectUrl": "https://gopay.co.id/app/merchanttransfer?tref=A120240108055206Yf6o5risurID&amount=15000&activity=GP:RR&callback_url=https%3A%2F%2Fchannel.payermax.com%2Fin-pay-channel%2Fc%2FoutService%2FfrontCallbackV1%2FmidTrans%2FPPC788800170469312633195812771%2Fredirect%3Forder_id%3DPPC788800170469312633195812771",
"qrCodeUrl": "https://api.midtrans.com/v2/gopay/b54f6b26-c3b8-4756-acb8-4c53097ab8ca/qr-code",
"outTradeNo": "orderAndPayOutTradeNo17512653582106DuKJbyYzW",
"tradeToken": "T2025063006734147012136",
"status": "PENDING"
}
}Enum Reference
data.paymentDetail.mitType
SCHEDULEDUNSCHEDULED
