Cashier Payment
- Endpoint:
POST /aggregate-pay/api/gateway/orderAndPay(Auth-capture) - Tags: Collection Service/Auth Capture
Description
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 | Use PayerMax_Hosted_Payment_Page to collect and process the payment information of the payer,which needs to be imported in the standard cashier payment mode. Incoming parameter: Hosted_Checkout | |
data.captureMode | string | Yes | 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 | No | maxLength: 2 | Country code, in uppercase letters. If the "paymentMethodType" parameter is specified, the country code must be provided and must match the country associated with the "paymentMethodType" . See【Supported Country/Region and Currency】for details. The selection strategy for the countries and regions available for the cashier is: sending the country code region > user's historical use of country code region > user's IP location country code region.(Available countries and regions: The intersection of the country corresponding to the transaction currency and the contracting country) | |
data.userId | string | Yes | maxLength: 64 | The user ID of the merchant, . After the payment method is bound, the payment method will be recommended according to the userId. | |
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.referralCode | string | No | maxLength: 32 | Used for more accurate payment method recommendations, such as device ID, device fingerprint, etc. | |
data.reference | string | No | maxLength: 512 | Customized data for merchant, will be returned in Callback Notification and Inquiry. | |
data.frontCallbackUrl | string | Yes | maxLength: 1024 | The callback URL specified by the merchant, it is the address where the user will be redirected after completing the payment. It should start with http/https or the scheme address of the merchant's application. See【Back to Previous Page】for details. | |
data.notifyUrl | string | No | maxLength: 256 | The URL to receive the backend notification, starting with HTTP/HTTPS. The notifyUrl can be configured through Merchant Dashboard or during transaction,see【Configure the Callback Notification Address】. The transaction notifyURL should be considered first.If the interface is not passed, it will take the one configured on the merchant management platform. | |
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 | No | Detailed information of payment (optional). 1. Specify the "paymentMethodType", and the cashier will display all "targetOrg" that support that payment method type. 2. Specify both"paymentMethodType" and "targetOrg". | ||
data.paymentDetail.paymentTokenID | string | No | maxLength: 64 | When paying with card token, this field is required. | |
data.paymentDetail.paymentMethodType | string | No | maxLength: 16 | Payment method, when it is empty, pull all available payment methods, see【Cashier Payment - Payment Method List】 | |
data.paymentDetail.targetOrg | string | No | maxLength: 16 | The target organization, if specified, the paymentMethodType must also be specified.see【Cashier Payment - Payment Method List】for details. | |
data.paymentDetail.allowedCardOrg | array[string] | No | Card sets that can be used at designated cash registers | ||
data.paymentDetail.tokenForFutureUse | boolean | No | True indicates that the user has authorized the binding of payment information for subsequent use, and the default value is false. | ||
data.paymentDetail.merchantInitiated | boolean | No | Indicates whether it is an MIT transaction, defaults to false if not specified. | ||
data.paymentDetail.mitType | string | No | merchant initiated transcation type.Enum values: SCHEDULED, UNSCHEDULED. | SCHEDULED, UNSCHEDULED | |
data.paymentDetail.payAccountInfo | array[object] | No | Payment account info.Support collect payer’s account info on merchant side when specifying the payment method and target organization.See the Submission of Payment Account Supported column under【Cashier Payment - 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, see the introduction of each payment method for details. | |
data.paymentDetail.payAccountInfo[].accountNoType | string | No | maxLength: 255 | Account type:EMAIL,PHONE,ACCOUNT. | EMAIL, PHONE, ACCOUNT |
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.subMerchant | object | No | Submerchant Information, Platform merchants need to submit sub-merchant information. | ||
data.subMerchant.subMerchantNo | string | No | maxLength: 64 | Submerchant ID. | |
data.goodsDetails | array[object] | No | The goods that the user buys. A list can be submitted. | ||
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 | goods Category. | ||
data.shippingInfo | object | No | shipping info. | ||
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.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. | ||
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.city | string | Yes | maxLength: 64 | City 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.country | string | Yes | maxLength: 2 | Country of billing address. | |
data.billingInfo.zipCode | string | No | maxLength: 16 | Billing Address Zip Code. | |
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.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
All
json
{
"version": "1.5",
"keyVersion": "1",
"requestTime": "2022-01-17T09:05:52.194+00:00",
"appId": "3b242b56a8b64274bcc37dac281120e3",
"merchantNo": "020213827212251",
"data": {
"outTradeNo": "P1642410352195",
"subject": "MacPro14 and Mouse",
"captureMode": "MANUAL",
"authorizationType": "FINAL_AUTH",
"totalAmount": 10000,
"currency": "IDR",
"country": "ID",
"userId": "U10001",
"language": "en",
"reference": "020213827524152",
"frontCallbackURL": "https://www.payermax.com",
"notifyUrl": "https://www.payermax.com",
"integrate": "Hosted_Checkout",
"expireTime": "1800",
"paymentDetail": {
"paymentMethodType": "",
"targetOrg": "",
"payAccountInfo": [
{
"accountNo": "fasdf@fasd.com",
"accountNoType": "EMAIL"
},
{
"accountNo": "0999998781111111",
"accountNoType": "PHONE"
},
{
"accountNo": "FASDFDF",
"accountNoType": "ACCOUNT"
}
]
},
"goodsDetails": [
{
"goodsId": "D002",
"goodsName": "韩版修身牛仔裤男",
"quantity": "2",
"price": "500",
"goodsCurrency": "IDR",
"showUrl": "http://xxxx.com",
"goodsCategory": "goods"
}
],
"envInfo": {
"deviceId": "eYOIkvFpZzztg00Yu6USdprBQZCWxDhiUAHCiK&K/cH9mT6wMaMOzAKe",
"deviceLanguage": "zh_CN",
"screenHeight": 768,
"screenWidth": 1024
},
"shippingInfo": {
"firstName": "zhang",
"middleName": "shang",
"lastName": "feng",
"phoneNo": "13009090980",
"email": "rensh_sh@ushareit.com",
"address1": "二仙桥",
"address2": "成华大道",
"city": "成都市",
"region": "武侯区",
"state": "州",
"country": "ID",
"zipCode": "000000"
},
"riskParams": {
"registerName": "lily",
"regTime": "2023-07-01 12:08:34",
"liveCountry": "VN",
"payerAccount": "987654XXX",
"payerName": "lily",
"taxId": "1234567890"
}
}
}Example: 2
Full checkout
json
{
"requestTime": "2025-06-26T20:11:30.528+08:00",
"keyVersion": "1",
"data": {
"country": "DE",
"frontCallbackUrl": "http://www.frontCallbackUrl.example.com",
"subject": "MacPro14 and Mouse",
"userId": "orderAndPayUserId5WPGcZilgw",
"integrate": "Hosted_Checkout",
"totalAmount": "100",
"outTradeNo": "orderAndPayOutTradeNo1750939890528nSYEkJJibb",
"notifyUrl": "http://www.notifyUrl.example.com",
"currency": "EUR"
},
"appId": "d27183b7f2ea4822aa722d9efa8e7a8b",
"version": "1.5",
"merchantNo": "SDP01010115045982"
}Example: 3
Designated payment method
json
{
"requestTime": "2025-06-26T20:11:28.677+08:00",
"keyVersion": "1",
"data": {
"country": "DE",
"frontCallbackUrl": "http://www.frontCallbackUrl.example.com",
"subject": "MacPro14 and Mouse",
"userId": "orderAndPayUserIdmbfs36NuP4",
"integrate": "Hosted_Checkout",
"totalAmount": "100",
"paymentDetail": {
"paymentMethodType": "PAY_LATER"
},
"outTradeNo": "orderAndPayOutTradeNo1750939888677H6qrN2dcNb",
"notifyUrl": "http://www.notifyUrl.example.com",
"currency": "EUR"
},
"appId": "d27183b7f2ea4822aa722d9efa8e7a8b",
"version": "1.5",
"merchantNo": "SDP01010115045982"
}Example: 4
Designated target institution
json
{
"requestTime": "2025-06-26T20:11:26.911+08:00",
"keyVersion": "1",
"data": {
"country": "DE",
"frontCallbackUrl": "http://www.frontCallbackUrl.example.com",
"subject": "MacPro14 and Mouse",
"userId": "orderAndPayUserId9KvboN9MjK",
"integrate": "Hosted_Checkout",
"totalAmount": "100",
"paymentDetail": {
"targetOrg": "KLARNA",
"paymentMethodType": "PAY_LATER"
},
"outTradeNo": "orderAndPayOutTradeNo1750939886911ALoVwQnZVz",
"notifyUrl": "http://www.notifyUrl.example.com",
"currency": "EUR"
},
"appId": "d27183b7f2ea4822aa722d9efa8e7a8b",
"version": "1.5",
"merchantNo": "SDP01010115045982"
}Example: 5
Designated card group
json
{
"requestTime": "2025-06-26T20:11:25.294+08:00",
"keyVersion": "1",
"data": {
"country": "SA",
"frontCallbackUrl": "http://www.frontCallbackUrl.example.com",
"subject": "MacPro14 and Mouse",
"userId": "orderAndPayUserIdxCfwTf7Sng",
"integrate": "Hosted_Checkout",
"totalAmount": "100",
"paymentDetail": {
"paymentMethodType": "CARD",
"allowedCardOrg": [
"VISA"
]
},
"outTradeNo": "orderAndPayOutTradeNo1750939885294iO0CZJ1WaM",
"notifyUrl": "http://www.notifyUrl.example.com",
"currency": "SAR"
},
"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 | Yes | Return data body. | ||
data.redirectUrl | string | Yes | maxLength: 1024 | Redirect URL. | |
data.outTradeNo | string | Yes | maxLength: 64 | Merchant order id. | |
data.tradeToken | string | Yes | maxLength: 64 | PayerMax order id. | |
data.status | string | Yes | maxLength: 32 | Transaction Status. See 【Transaction Status】for details. |
Response Example: 1
成功示例
json
{
"code": "APPLY_SUCCESS",
"msg": "",
"data": {
"redirectUrl": "https://cashier-n.payermax.com/index.html#/cashier/home?merchantId=020213827212251&merchantAppId=3b242b56a8b64274bcc37dac281120e3&country=ID&tradeToken=TOKEN20220117091121294138752&language=en&token=IHjqkZ8%2F%2FFcnfDPxWTvJFOrulUAKfXFUkxHJSiTdlnjnX1G6AOuTiSl6%2BN05EzxTaJkcSsSyGh5a1q%2FACwWN0sDD%2FgwY5YdWu3ghDcH2wqm%2BJIcEh0qZqo%2BQFnXp65bvkLZnY7VO7HwZGzyrpMBlPhfRCQxwBbc6lJcSYuPf%2Fe8%3D&amount=10000¤cy=IDR&frontCallbackUrl=https%3A%2F%2Fwww.payermax.com",
"outTradeNo": "P1642410680681",
"tradeToken": "T2024062702289232000001",
"status": "PENDING"
}
}Response Example: 2
异常示例
json
{
"data": {
"redirectUrl": "http://jtce.nz/fideg",
"outTradeNo": "Lorem ut in culpa dolor",
"tradeToken": "eu cupidatat magna proident",
"status": "enim quis eiusmod occaecat"
},
"code": "14",
"msg": "amet in elit"
}Response Example: 3
异常示例2
json
{
"data": {
"redirectUrl": "http://jnsmsvoxlg.hn/whfocvhoq",
"outTradeNo": "tempor dolore in cillum voluptate",
"tradeToken": "elit velit",
"status": "aliquip in ut"
},
"code": "10",
"msg": "ut reprehenderit Ut"
}Enum Reference
data.paymentDetail.mitType
SCHEDULEDUNSCHEDULED
data.paymentDetail.payAccountInfo[].accountNoType
EMAILPHONEACCOUNT
