Skip to content

Cashier Payment

  • Endpoint: POST /aggregate-pay/api/gateway/orderAndPay(Auth-capture)
  • Tags: Collection Service/Auth Capture

Description

Parameters

FieldInTypeRequiredConstraintsDescription
Content-TypeheaderstringYes
signheaderstringYes签名信息请参考技术文档

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

FieldTypeRequiredConstraintsDescriptionEnum
versionstringYesAPI version. Current value: 1.5
keyVersionstringYesSignature Algorithm Version, Current value: 1
requestTimestringYesRequest 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
appIdstringYesMerchant AppId,The unique identifier assigned to the merchant app by PayerMax
merchantNostringNomaxLength: 32Merchant Id, the unique identifier generated when the merchant signs the contract with PayerMax
dataobjectYesRequest data body.
data.outTradeNostringYesmaxLength: 64Merchant 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.integratestringYesmaxLength: 16Use 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.captureModestringYesThe Capture Mode:MANUAL
data.authorizationTypestringNoThe Authorization type: FINAL_AUTH
data.subjectstringYesmaxLength: 256Order 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.totalAmountnumberYesThe 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.currencystringYesmaxLength: 3Currency code, capital letter see【Supported Country/Region and Currency
data.countrystringNomaxLength: 2Country 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.userIdstringYesmaxLength: 64The user ID of the merchant, . After the payment method is bound, the payment method will be recommended according to the userId.
data.languagestringNomaxLength: 16Cashier 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.referralCodestringNomaxLength: 32Used for more accurate payment method recommendations, such as device ID, device fingerprint, etc.
data.referencestringNomaxLength: 512Customized data for merchant, will be returned in Callback Notification and Inquiry.
data.frontCallbackUrlstringYesmaxLength: 1024The 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.notifyUrlstringNomaxLength: 256The 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.expireTimestringNomaxLength: 16Define 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.paymentDetailobjectNoDetailed 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.paymentTokenIDstringNomaxLength: 64When paying with card token, this field is required.
data.paymentDetail.paymentMethodTypestringNomaxLength: 16Payment method, when it is empty, pull all available payment methods, see【Cashier Payment - Payment Method List
data.paymentDetail.targetOrgstringNomaxLength: 16The target organization, if specified, the paymentMethodType must also be specified.see【Cashier Payment - Payment Method List】for details.
data.paymentDetail.allowedCardOrgarray[string]NoCard sets that can be used at designated cash registers
data.paymentDetail.tokenForFutureUsebooleanNoTrue indicates that the user has authorized the binding of payment information for subsequent use, and the default value is false.
data.paymentDetail.merchantInitiatedbooleanNoIndicates whether it is an MIT transaction, defaults to false if not specified.
data.paymentDetail.mitTypestringNomerchant initiated transcation type.Enum values: SCHEDULED, UNSCHEDULED.SCHEDULED, UNSCHEDULED
data.paymentDetail.payAccountInfoarray[object]NoPayment 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[].accountNostringNomaxLength: 32The 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[].accountNoTypestringNomaxLength: 255Account type:EMAIL,PHONE,ACCOUNT.EMAIL, PHONE, ACCOUNT
data.envInfoobjectNoenvironmental information
data.envInfo.deviceIdstringNoMerchant device unique identifier
data.envInfo.deviceLanguagestringNoDevice default language
data.envInfo.screenHeightstringNodevice height
data.envInfo.screenWidthstringNodevice width
data.subMerchantobjectNoSubmerchant Information, Platform merchants need to submit sub-merchant information.
data.subMerchant.subMerchantNostringNomaxLength: 64Submerchant ID.
data.goodsDetailsarray[object]NoThe goods that the user buys. A list can be submitted.
data.goodsDetails[].goodsIdstringYesmaxLength: 64goods ID.
data.goodsDetails[].goodsNamestringYesmaxLength: 128goods name.
data.goodsDetails[].quantitystringYesmaxLength: 16goods amount.
data.goodsDetails[].pricestringYesmaxLength: 20Price set by the merchant system.
data.goodsDetails[].goodsCurrencystringNomaxLength: 3goods currency, capital letters,see【Supported Country/Region and Currency
data.goodsDetails[].showUrlstringNomaxLength: 128goods URL.
data.goodsDetails[].goodsCategorystringNogoods Category.
data.shippingInfoobjectNoshipping info.
data.shippingInfo.firstNamestringYesmaxLength: 64shipping first name.
data.shippingInfo.middleNamestringNomaxLength: 64shipping middle name.
data.shippingInfo.lastNamestringYesmaxLength: 64shipping last name.
data.shippingInfo.phoneNostringYesmaxLength: 32shipping phone no.
data.shippingInfo.emailstringYesmaxLength: 255shipping email address.
data.shippingInfo.address1stringYesmaxLength: 1024shipping address 1.
data.shippingInfo.address2stringNomaxLength: 1024shipping address 2.
data.shippingInfo.citystringYesmaxLength: 64city of the shipping address.
data.shippingInfo.regionstringNomaxLength: 64region of the shipping address.
data.shippingInfo.statestringNomaxLength: 32State of the shipping address Required for shipping to Canada, US, UK, Australia.
data.shippingInfo.countrystringYesmaxLength: 2country of the shipping address.
data.shippingInfo.zipCodestringYesmaxLength: 32zipcode of the shipping address.
data.billingInfoobjectNoBilling Information.
data.billingInfo.firstNamestringNomaxLength: 64biller name.
data.billingInfo.middleNamestringNomaxLength: 64biller middle name.
data.billingInfo.lastNamestringNomaxLength: 64biller last name.
data.billingInfo.phoneNostringNomaxLength: 32biller phone no.
data.billingInfo.emailstringYesmaxLength: 255biller email address.
data.billingInfo.address1stringYesmaxLength: 1024Billing Address 1.
data.billingInfo.address2stringNomaxLength: 1024Billing Address 2.
data.billingInfo.citystringYesmaxLength: 64City of billing address.
data.billingInfo.regionstringNomaxLength: 64Region of billing address.
data.billingInfo.statestringNomaxLength: 32State of billing address Shipping is required in Canada, USA, UK, Australia.
data.billingInfo.countrystringYesmaxLength: 2Country of billing address.
data.billingInfo.zipCodestringNomaxLength: 16Billing Address Zip Code.
data.riskParamsobjectNoRisk 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.subscriptionPlanobjectNosubscription plan info
data.subscriptionPlan.subscriptionNostringYesmaxLength: 64, minLength: 1The 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

FieldTypeRequiredConstraintsDescriptionEnum
codestringYesReturn code, ‘APPLY_SUCCESS’ means success.It only represents the success of the interface request, not the order status.
msgstringYesReturn message, ‘Success.’.It only represents the success of the interface request, not the order status.
dataobjectYesReturn data body.
data.redirectUrlstringYesmaxLength: 1024Redirect URL.
data.outTradeNostringYesmaxLength: 64Merchant order id.
data.tradeTokenstringYesmaxLength: 64PayerMax order id.
data.statusstringYesmaxLength: 32Transaction 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

  • SCHEDULED
  • UNSCHEDULED

data.paymentDetail.payAccountInfo[].accountNoType

  • EMAIL
  • PHONE
  • ACCOUNT

Was this page helpful?

Thank you for your help in improving PayerMax Product Docs!

Released under the MIT License.