纯API支付
- Endpoint:
POST /aggregate-pay/api/gateway/orderAndPay/delSuffixStart1 - Tags: 收单
Description
商户希望在自己的收银台上给用户展示支付方式并支付,PayerMax提供纯API(Direct API)的方式接入。 对于Direct API的接口,商户如果自行处理卡号信息,需要具备PCI-DSS认证资质。
注:商户如果换汇或营销的诉求,可联系PayerMax技术支持。
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 | maxLength: 8 | 接口版本 当前值为:1.5 | |
keyVersion | string | Yes | maxLength: 8 | 密钥版本 当前值为:1 | |
requestTime | string | Yes | maxLength: 32 | 请求时间,符合rfc3339规范,格式:yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时间需要在当前时间两分钟内 | |
appId | string | Yes | maxLength: 64 | 商户应用Id,PayerMax分配给商户应用的唯一标识 | |
merchantNo | string | No | maxLength: 32 | 商户号,商户与PayerMax业务签约时生成的唯一标识 | |
data | object | Yes | 请求数据体 | ||
data.outTradeNo | string | Yes | maxLength: 64 | 商户订单号,唯一标识商户的一笔交易,不能重复,只能包含字母、数字、下划线且不支持大小写敏感。如:AAA和AAa被认为是相同的。 | |
data.integrate | string | Yes | maxLength: 16 | 商户自行进行付款方支付信息的收集后,传送给PayerMax进行交易处理,需传入参数:Direct_Payment | |
data.subject | string | Yes | maxLength: 256 | 订单标题或产品信息,会展示在用户支付页面,避免使用纯数字。注:巴西钱包Pix不能超过43位 | |
data.totalAmount | number | Yes | 标价金额,金额的单位为元。各个国家币种支持的小数位详见【交易支持国家/地区与币种】,风控限额详见【风控行业限额】 | ||
data.currency | string | Yes | maxLength: 3 | 标价币种,大写字母,参见【交易支持国家/地区与币种】 | |
data.country | string | Yes | maxLength: 2 | 国家代码,大写字母,参见【交易支持国家/地区与币种】 | |
data.userId | string | Yes | maxLength: 64 | 商户内部的用户Id,需要保证每个ID唯一性。 | |
data.expireTime | string | No | 指定关单时间(单位:秒)。 1)expireTime 传值时: - 当expireTime<=30min:则关单时间为30min - 当24hour>=expireTime>=30min:则关单时间为expireTime - 当expireTime>=24hour:则关单时间为24hour 2)expireTime 未传值时: - 除纯API模式和前置组件的card/applepay/googlepay 关单时间为30min外,其他取这笔订单发起过的支付方式关单时间的最大值。 | ||
data.referralCode | string | No | maxLength: 32 | 用于更精准的支付方式推荐,如设备ID、设备指纹等。 | |
data.mitManagementUrl | string | No | 商户订阅管理页面地址 | ||
data.subscriptionPlan | object | No | 订阅计划信息 | ||
data.subscriptionPlan.subscriptionNo | string | No | maxLength: 64 | 订阅单号,PayerMax管理订阅计划时必传,商户管理订阅计划时不传 | |
data.subscriptionPlan.subject | string | No | 订阅主题,商户管理订阅计划时必传 | ||
data.subscriptionPlan.description | string | No | 订阅描述,商户管理订阅计划时必传 | ||
data.subscriptionPlan.totalPeriods | string | No | 总期数,商户管理订阅计划时必传 | ||
data.subscriptionPlan.firstPeriodStartDate ⚠️ | string | No | 首期扣款时间,商户管理订阅计划时必传 | ||
data.subscriptionPlan.periodRule | object | No | 订阅扣款规则,商户管理订阅计划时必传 | ||
data.subscriptionPlan.periodRule.periodUnit | string | Yes | 扣款周期:月(M),D(日),W(周),Y(年)扣款,商户管理订阅计划时必传 | ||
data.subscriptionPlan.periodRule.periodCount | string | Yes | 扣款频率,商户管理订阅计划时必传 | ||
data.subscriptionPlan.periodAmount | object | No | 扣款金额,商户管理订阅计划时必传 | ||
data.subscriptionPlan.periodAmount.amount | number | Yes | 扣款金额,商户管理订阅计划时必传 | ||
data.subscriptionPlan.periodAmount.currency | string | Yes | 扣款币种,商户管理订阅计划时必传 | ||
data.subscriptionPlan.trialPeriodConfig | object | No | 优惠期规则 | ||
data.subscriptionPlan.trialPeriodConfig.trialPeriodCount | string | Yes | 优惠期数 | ||
data.subscriptionPlan.trialPeriodConfig.trialPeriodAmount | object | Yes | 优惠期扣款金额 | ||
data.subscriptionPlan.trialPeriodConfig.trialPeriodAmount.amount | number | No | 优惠期扣款金额 | ||
data.subscriptionPlan.trialPeriodConfig.trialPeriodAmount.currency | string | No | 优惠期扣款币种 | ||
data.subscriptionPlan.trialConfig | object | No | 试用期参数 | ||
data.subscriptionPlan.trialConfig.trialAmount | object | Yes | 试用期金额信息 | ||
data.subscriptionPlan.trialConfig.trialAmount.amount | number | Yes | 试用期金额 | ||
data.subscriptionPlan.trialConfig.trialAmount.currency | string | Yes | 试用期币种 | ||
data.subscriptionPlan.trialConfig.trialDays | string | Yes | 试用天数 | ||
data.subscriptionPlan.prices | array[object] | Yes | 价格和坐席列表 | ||
data.subscriptionPlan.prices[].priceId | string | Yes | 价格ID | ||
data.subscriptionPlan.prices[].quantity | string | Yes | 坐席或数量 | ||
data.paymentDetail | object | Yes | 支付信息 | ||
data.paymentDetail.paymentMethodType | string | Yes | maxLength: 16 | 支付方式类型,参见【纯API支付-支付方式列表】支付方式必填 | |
data.paymentDetail.targetOrg | string | No | maxLength: 32 | 目标机构除paymentMethodType为CARD外均必填 | |
data.paymentDetail.payAccountInfo | array[object] | No | 支付账号,部分支付方式下的目标机构需要上送用户在该目标机构的支付账号信息。 参见【纯API支付-支付方式列表】 | ||
data.paymentDetail.payAccountInfo[].accountNo | string | No | maxLength: 32 | 用户在该支付方式下的目标机构注册的支付账号 | |
data.paymentDetail.payAccountInfo[].accountNoType | string | No | maxLength: 255 | 账号类型:EMAIL,PHONE,ACCOUNT | |
data.paymentDetail.cardInfo | object | No | 卡信息 | ||
data.paymentDetail.cardInfo.cardIdentifierNo | string | No | maxLength: 19 | 卡号 | |
data.paymentDetail.cardInfo.cardHolderFullName | string | No | maxLength: 64 | 持卡人姓名 | |
data.paymentDetail.cardInfo.cardExpirationMonth | string | No | maxLength: 2 | 卡有效期-月,两位月份 | |
data.paymentDetail.cardInfo.cardExpirationYear | string | No | maxLength: 2 | 卡有效期-年,只取后两位年份 | |
data.paymentDetail.cardInfo.cvv | string | No | maxLength: 4 | 卡cvv,Visa和MasterCard为3位数字,AEMX为4位数字 | |
data.paymentDetail.cardInfo.stored | string | No | maxLength: 1 | 代表该笔卡支付交易是否已存卡。 已存卡:Y 未存卡:不填或者其他值 | |
data.paymentDetail.cardInfo.dynamic3DS | string | No | maxLength: 64 | 动态3ds(参数不区分大小写) do3DS:为此订单执行3DS Secure no3DS:不为此订单执行3DS Secure ext3DS:使用外部3DS结果,适用于已经对接了其他3DS服务的商户,指定该值时,则必须同时传入info3DSecure对象 未传或传入其他值,由PayerMax判断是否发起3ds | |
data.paymentDetail.buyerInfo | object | Yes | 用户基本信息 | ||
data.paymentDetail.buyerInfo.firstName | string | No | maxLength: 64 | 用户名 注:巴西HIPERCAR、ELO卡支付时必传 | |
data.paymentDetail.buyerInfo.middleName | string | No | maxLength: 64 | 用户中间名 | |
data.paymentDetail.buyerInfo.email | string | No | maxLength: 255 | 用户邮箱 注:巴西HIPERCAR、ELO卡支付时必传 | |
data.paymentDetail.buyerInfo.lastName | string | No | maxLength: 64 | 用户姓 注:巴西HIPERCAR、ELO卡支付时必传 | |
data.paymentDetail.buyerInfo.phoneNo | string | No | maxLength: 32 | 用户手机号 注:土耳其卡支付时必传 | |
data.paymentDetail.buyerInfo.phoneNoRegion | string | No | maxLength: 16 | 手机号区号 注:土耳其卡支付时必传 | |
data.paymentDetail.buyerInfo.idType | string | No | maxLength: 32 | 证件类型 | |
data.paymentDetail.buyerInfo.idNo | string | No | maxLength: 64 | 证件号 | |
data.paymentDetail.buyerInfo.taxType | string | No | maxLength: 32 | 税类型,参见【各国税类型和税号规则】 注:巴西国家该字段必须传入CPF | |
data.paymentDetail.buyerInfo.taxNo | string | No | maxLength: 64 | 税号,参见【各国税类型和税号规则】 注:巴西国家该字段必填,为巴西身份证号 | |
data.paymentDetail.buyerInfo.address | string | No | maxLength: 1024 | 用户地址 | |
data.paymentDetail.buyerInfo.city | string | No | maxLength: 64 | 用户所在城市 | |
data.paymentDetail.buyerInfo.region | string | No | maxLength: 64 | 用户所在区域 | |
data.paymentDetail.buyerInfo.zipCode | string | No | maxLength: 32 | 邮编 | |
data.paymentDetail.buyerInfo.clientIp | string | Yes | 用户IP地址,须为标准IPv4或IPv6格式。 | ||
data.paymentDetail.buyerInfo.userAgent | string | Yes | 用户浏览器信息 | ||
data.paymentDetail.paymentTokenID | string | No | maxLength: 64 | PMMax token,授权成功后支付 | |
data.paymentDetail.tokenForFutureUse | boolean | No | true代表用户已授权进行支付信息绑定,用于后续使用,默认为false | ||
data.paymentDetail.merchantInitiated | boolean | No | 代表是否为MIT交易,不传默认为false | ||
data.paymentDetail.mitType | string | No | 代扣类型。 | SCHEDULED, UNSCHEDULED | |
data.paymentDetail.info3DSecure | object | No | 商户使用ext3DS时,上送的外部3DS的信息。注:须提前联系技术支持开通相关功能 | ||
data.paymentDetail.info3DSecure.threeDSVersion | string | No | 3ds版本号 | ||
data.paymentDetail.info3DSecure.eci | string | No | eci值 | ||
data.paymentDetail.info3DSecure.cavv | string | No | cavv值 | ||
data.paymentDetail.info3DSecure.dsTransactionId | string | No | dsTransactionId值 | ||
data.paymentDetail.info3DSecure.xid | string | No | xid值 | ||
data.paymentDetail.applePayPaymentData | object | No | ApplePay解密信息。当paymentMethodType为APPLE PAY时需要传入 | ||
data.paymentDetail.applePayPaymentData.applicationExpirationDate | string | No | 支付卡的有效期 | ||
data.paymentDetail.applePayPaymentData.applicationPrimaryAccountNumber | string | No | 设备专属卡号(Device Primary Account Number,DPAN) | ||
data.paymentDetail.applePayPaymentData.currencyCode | string | No | 交易货币代码 | ||
data.paymentDetail.applePayPaymentData.deviceManufacturerIdentifier | string | No | 设备唯一标识符 | ||
data.paymentDetail.applePayPaymentData.paymentData | object | No | 加密支付数据 | ||
data.paymentDetail.applePayPaymentData.paymentData.eciIndicator | string | No | 表示交易的安全级别 | ||
data.paymentDetail.applePayPaymentData.paymentData.onlinePaymentCryptogram | string | No | 动态加密凭证 | ||
data.paymentDetail.applePayPaymentData.paymentDataType | string | No | 支付数据类型 | ||
data.paymentDetail.applePayPaymentData.transactionAmount | string | No | 交易金额 | ||
data.paymentDetail.applePayPaymentData.network | string | Yes | 卡组 | ||
data.paymentDetail.applePayPaymentData.type | string | Yes | 卡类型 | ||
data.paymentDetail.applePayPaymentData.displayName | string | No | 卡片显示名称 | ||
data.paymentDetail.googlePayDetails | object | No | GooglePay解密信息。当paymentMethodType为GOOGLEPAY时需要传入 | ||
data.paymentDetail.googlePayDetails.authMethod | string | No | 认证方式 | ||
data.paymentDetail.googlePayDetails.pan | string | No | 主账号(卡号) | ||
data.paymentDetail.googlePayDetails.expirationMonth | string | No | 卡片有效期月份 | ||
data.paymentDetail.googlePayDetails.expirationYear | string | No | 卡片有效期年份 | ||
data.paymentDetail.googlePayDetails.description | string | No | 卡片描述 | ||
data.paymentDetail.googlePayDetails.cardNetwork | string | Yes | 卡组 | ||
data.paymentDetail.googlePayDetails.cardHolderFullName | string | No | 持卡人姓名 | ||
data.goodsDetails | array[object] | No | 商品信息,支持传多个。注:电商场景下需要上送。如果传入该对象,则内层必填字段必须传入 | ||
data.goodsDetails[].goodsId | string | Yes | maxLength: 64 | 商品ID | |
data.goodsDetails[].goodsName | string | Yes | maxLength: 128 | 商品名称 | |
data.goodsDetails[].quantity | string | Yes | maxLength: 16 | 商品数量 | |
data.goodsDetails[].price | string | Yes | maxLength: 20 | 商品价格,商户系统的报价 | |
data.goodsDetails[].goodsCurrency | string | No | maxLength: 3 | 商品报价币种,大写字母,参见【交易支持国家/地区与币种】 | |
data.goodsDetails[].showUrl | string | No | maxLength: 128 | 商品链接地址。注:电商场景下需要上送。 | |
data.goodsDetails[].goodsCategory | string | No | maxLength: 128 | 商品类别。注:电商场景下需要上送。 | |
data.subMerchant | object | No | 二级商户信息 平台类商户需要上送子商户信息 | ||
data.subMerchant.subMerchantNo | string | No | maxLength: 64 | 二级商户号 | |
data.shippingInfo | object | No | 邮寄信息。注:电商场景下需要上送。如果传入该对象,则内层必填字段必须传入 | ||
data.shippingInfo.firstName | string | Yes | maxLength: 64 | 收货人名 | |
data.shippingInfo.middleName | string | No | maxLength: 64 | 收货人中间名 | |
data.shippingInfo.lastName | string | Yes | maxLength: 64 | 收货人姓 | |
data.shippingInfo.phoneNo | string | Yes | maxLength: 32 | 收货人手机号 | |
data.shippingInfo.email | string | Yes | maxLength: 255 | 收货邮箱地址 | |
data.shippingInfo.address1 | string | Yes | maxLength: 1024 | 收货地址1 | |
data.shippingInfo.city | string | Yes | maxLength: 64 | 收货地址所在城市 | |
data.shippingInfo.region | string | No | maxLength: 64 | 收货地址所在区域 | |
data.shippingInfo.state | string | No | maxLength: 32 | 收货地址所在州 送货到加拿大,美国,英国,澳大利亚时必填 | |
data.shippingInfo.country | string | Yes | maxLength: 2 | 收货地址所在国家 | |
data.shippingInfo.zipCode | string | Yes | maxLength: 32 | 收货地址邮编 | |
data.shippingInfo.address2 | string | No | maxLength: 1024 | 收货地址2 | |
data.shippingInfo.address3 | string | No | maxLength: 1024 | 收货地址3 | |
data.billingInfo | object | No | 信用卡账单地址信息。注:如果传入该对象,则内层必填字段必须传入 | ||
data.billingInfo.firstName | string | No | maxLength: 64 | 账单人名 | |
data.billingInfo.middleName | string | No | maxLength: 64 | 账单人中间名 | |
data.billingInfo.lastName | string | No | maxLength: 64 | 账单人姓 | |
data.billingInfo.phoneNo | string | No | maxLength: 32 | 账单人手机号 | |
data.billingInfo.email | string | Yes | maxLength: 255 | 账单邮箱地址 | |
data.billingInfo.address1 | string | Yes | maxLength: 1024 | 账单地址1 | |
data.billingInfo.city | string | Yes | maxLength: 64 | 账单地址所在城市 | |
data.billingInfo.country | string | Yes | maxLength: 2 | 账单地址所在国家 | |
data.billingInfo.region | string | No | maxLength: 64 | 账单地址所在区域 | |
data.billingInfo.state | string | No | maxLength: 32 | 账单地址所在州 送货到加拿大,美国,英国,澳大利亚时需要上送 | |
data.billingInfo.zipCode | string | No | maxLength: 16 | 账单地址邮编 | |
data.billingInfo.address2 | string | No | maxLength: 1024 | 账单地址2 | |
data.billingInfo.address3 | string | No | maxLength: 1024 | 账单地址3 | |
data.billingInfo.phoneNoRegion | string | No | maxLength: 16 | 账单人手机号区号 | |
data.envInfo | object | No | 设备信息 | ||
data.envInfo.deviceId | string | No | 商户设备唯一标识 | ||
data.envInfo.deviceLanguage | string | No | 设备默认语言 | ||
data.envInfo.screenHeight | string | No | 设备高度 | ||
data.envInfo.screenWidth | string | No | 设备宽度 | ||
data.language | string | No | maxLength: 16 | 收银台页面语言。【支持的国家与币种】 优先级:用户上次使用的语言 > 用户浏览器语言 > 用户ip国家语言 > 商户下单传的语言 > 默认EN | |
data.riskParams | object | No | 详见风控业务数据:【商户上送信息】,该部分信息通常作为定制风控的补充信息,如未开通定制风控可不填。 | ||
data.terminalType | string | Yes | maxLength: 3 | 设备终端,WEB,WAP,APP | |
data.osType | string | No | 设备操作系统,当设备终端为Wap和App时,设备操作系统可以为ANDROID或IOS | ||
data.reference | string | No | maxLength: 512 | 商户自定义附加数据,可支持商户自定义并在响应中返回 | |
data.frontCallbackUrl | string | No | maxLength: 1024 | 商户指定的跳转URL,用户完成支付后会被跳转到该地址,以http/https开头或者商户应用的scheme地址,纯API支付下frontCallbackUrl是必填的,用于支持需要跳转外部的异步交易 | |
data.notifyUrl | string | No | maxLength: 256 | 服务端回调通知URL,以http/https开头 可以通过MerchantDashboard平台配置商户通知地址,详情见【配置异步通知地址】,如果交易中上送,则以交易为准,即优先使用接口中传的url。注:如商户平台未配置通知地址,交易也没上送地址,则无法进行回调通知 |
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": 4,
"currency": "AED",
"country": "AE",
"userId": "userId001",
"integrate": "Direct_Payment",
"expireTime": "1800",
"subscriptionPlan": {
"subject": "subject",
"description": "PMMAX周期首期扣款。",
"totalPeriods": 12,
"periodRule": {
"periodUnit": "M",
"periodCount": 1
},
"periodAmount": {
"amount": 20,
"currency": "AED"
},
"trialPeriodConfig": {
"trialPeriodCount": 1,
"trialPeriodAmount": {
"amount": 10,
"currency": "AED"
}
},
"trialConfig": {
"trialAmount": {
"amount": 4,
"currency": "AED"
},
"trialDays": 7
}
},
"mitManagementUrl": "http://your.subscription.com",
"paymentDetail": {
"paymentMethodType": "CARD",
"cardInfo": {
"cardIdentifierNo": "4001563861135570",
"cardHolderFullName": "James Smith",
"cardExpirationMonth": "05",
"cardExpirationYear": "25",
"cvv": "123"
},
"buyerInfo": {
"firstName": "James",
"lastName": "Smith",
"phoneNo": "903124360628",
"email": "james@example.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://www.example.com",
"goodsCategory": "电脑"
}
],
"shippingInfo": {
"firstName": "James",
"lastName": "Smith",
"phoneNo": "903124360628",
"email": "James@example.com",
"address1": "GOLGELI SOKAK NO.34, 06700",
"city": "GAZIOSMANPASA/ANKAR",
"country": "TR",
"zipCode": "06700"
},
"billingInfo": {
"firstName": "James",
"lastName": "Smith",
"phoneNo": "903124360628",
"email": "James@example.com",
"address1": "GOLGELI SOKAK NO.34, 06700",
"city": "GAZIOSMANPASA/ANKAR",
"country": "TR",
"zipCode": "06700"
},
"riskParams": {
"registerName": "lily",
"regTime": "2023-07-01 12:08:34",
"liveCountry": "VN",
"payerAccount": "987654XXX",
"payerName": "lily",
"taxId": "1234567890"
},
"language": "en",
"reference": "020213827524152",
"terminalType": "WAP",
"frontCallbackUrl": "https://www.frontCallbackUrl.example.com",
"notifyUrl": "https://www.notifyUrl.example.com"
}
}Example: 2
卡支付
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": "122.11.22.22"
},
"paymentMethodType": "CARD"
},
"outTradeNo": "orderAndPayOutTradeNo1750939882895u76ofjW6PQ",
"notifyUrl": "http://www.notifyUrl.example.com",
"currency": "SAR"
},
"appId": "d27183b7f2ea4822aa722d9efa8e7a8b",
"version": "1.4",
"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": "122.11.22.22"
},
"paymentMethodType": "GOOGLEPAY"
},
"outTradeNo": "orderAndPayOutTradeNo1750939881891mqkJIYHAD8",
"notifyUrl": "http://www.notifyUrl.example.com",
"currency": "SAR"
},
"appId": "d27183b7f2ea4822aa722d9efa8e7a8b",
"version": "1.4",
"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.4",
"merchantNo": "SDP01010115045982"
}Example: 5
token支付-首次
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": "4550362675315105",
"cardExpirationMonth": "12",
"cardExpirationYear": "33",
"cardHolderFullName": "cardHolderName"
},
"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.4",
"merchantNo": "SDP01010115045982"
}Example: 6
token支付-后续
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.4",
"merchantNo": "SDP01010115045982"
}Example: 7
apm-跳转类
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.4",
"merchantNo": "SDP01010115045982"
}Example: 8
apm-直连
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.4",
"merchantNo": "SDP01010115045982"
}Example: 9
apm-二维码
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.4",
"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.4",
"merchantNo": "SDP01010115045982"
}Responses
200
错误码
| 分类 | 结果码 | 结果描述 |
|---|---|---|
| SYSTEM_ERROR | System is busy, please try again later. | 系统错误;请联系PayerMax |
| REQ_TIME_OVER_TIME | requestTime effective in two minutes | 请求时间与服务端偏差超过2分钟,请检查requestTime后重新发起 |
| TOO_MANY_REQUEST | Exceed request limitation, please retry later | 触发接口并发限流,请稍后重试 |
| SIGN_VERIFY_FAILED | The signature verify failed. | 签名错误;请核实签名 |
| MERCHANT_INVALID | The merchant has been offline. | 无效商户 |
| MERCHANT_APP_INVALID | Signature key is not configured. | 无效商户APP |
| REQUEST_TIMEOUT | Request timeout or didn't get result, If you have finished to pay, pls wait for the result. | 请求超时;请联系PayerMax |
| UNEXPECTED_ERROR | No further information for the error, plz try it later. | 未知错误;请联系PayerMax |
| PARAMS_INVALID | ${field} length must be between ${min} and ${max},but your input value length is ${length}.Make sure all requests length is correct. | 无效参数-入参字段长度不符合要求;请参考官网字段描述 |
| PARAMS_INVALID | ${field} must be ${type} , but your input is ${valueType}.Make sure all requests type is correct. | 无效参数-入参字段类型不正确;请参考官网字段描述 |
| PARAMS_INVALID | ${field} is invalid,because ${field} is null. | 无效参数-入参字段不能为空;请参考官网字段描述 |
| AMOUNT_INVALID | Amount is incorrect. | 无效的金额 |
| COUNTRY_INVALID | No country support, pls re-pay. | 无效的国家;可参考支持的国家和币种 |
| CURRENCY_INVALID | currency is invalid,because currency is not defined. | 无效的币种;可参考支持的国家和币种 |
| CONTRACT_INVALID | Merchant has no activated contract, please check the contract status. | 无效合约;请检查合约有效性 |
| CONTRACT_INVALID | Merchant has not signed the contract in ${value}. | 指定的国家/地区未签约;请检查合约有效性 |
| CONTRACT_INVALID | Merchant has not signed the ${paymentMethod} payment method. | 指定的支付方式未签约;请检查合约有效性 |
| CONTRACT_INVALID | Merchant has not signed the ${targetOrg} target origination correspondingly, although you have signed the ${paymentMethod} payment method. | 指定的目标机构未签约;请检查合约有效性 |
| CONTRACT_INVALID | Merchant has not signed the ${currency} currency correspondingly, although you have signed the ${paymentMethod} payment method. | 指定的支付方式有签约,但所指定的币种未签约;请检查合约有效性 |
| CONTRACT_INVALID | Merchant has not signed the ${currency} currency correspondingly, although you have signed the ${paymentMethod} payment method and the ${targetOrg} target origination. | 指定的目标机构有签约,但所指定的币种未签约;请检查合约有效性 |
| PAYMENT_METHOD_NOT_EXIST | The payment method does not exist. | 支付方式不存在;请更换其他支付方式 |
| PAYMENT_METHOD_SUSPEND | The payment method already suspend, plz try other payment methods. | 支付方式暂不可用;请更换其他支付方式 |
| AMOUNT_LIMIT_MINIMUM | The order amount is lower than the minimum limit of the payment method. | 最小金额限制 |
| AMOUNT_LIMIT_MAXIMUM | The order amount exceeds the maximum limit of the payment method. | 最大金额限制 |
| AMOUNT_LIMIT | The amount doesn't match the payment method requirement. | 金额限制 |
| ORDER_REPEAT | The order number repeat. | 订单重复 |
| ONBOARD_ERROR | Please complete the merchant onboarding, then refresh the page. | 商户未报备;请先完成报备 |
| PAYMENT_PROCESSING | The payment is processing, pls check the result. | 支付处理中;请稍后重试 |
| PARTICIPANT_INVALID | Invalid participant. | 无效分账参与方 |
| BALANCE_INSUFFICIENT | Insufficient balance to pay, please confirm payment account available balance. | 余额不足 |
| OTP_VERIFY_LIMIT | OTP verification exceeds limit. | OTP验证超过限制 |
| OTP_VERIFY_FAILED | OTP verification failed. | OTP验证失败 |
| OVER_VERIFY_LIMIT | Exceeded the number of verifications. | 超过验证次数 |
| BARCODE_REFRESH_LIMIT | Over barcode refresh times. | Barcode刷新限制 |
| BARCODE_REFRESH_FAILED | Barcode refresh failed. | Barcode刷新失败 |
| CARD_INVALID | Make sure the card number is correct. | 无效卡号 |
| CARD_EXPIRE_DATE_INVALID | Invalid card number validity period | 无效卡号有效期 |
| CARD_HOLDER_NAME_INVALID | Invalid cardholder name | 无效持卡人姓名 |
| CVV_INVALID | Cvv is incorrect, pls check. | 无效CVV |
| UNSUPPORT_CARD | This card don't support, please change another card. | 卡不支持 |
| ACCOUNT_INVALID | Your account is invalid or not active, please confirm and re-enter. | 无效账号 |
| PHONE_NUM_INVALID | The phone number is invalid, pls check and re-enter. | 无效的电话号码 |
| UPI_INVALID | UPI is incorrect. | 无效UPI |
| PIN_VERIFY_LIMIT | Pin verification exceeds limit | Pin验证超过限制 |
| PIN_INVALID | Pin is invalid | Pin无效 |
| BANKCODE_INVALID | Invalid bank card number. | 无效银行卡号 |
| ID_NUM_INVALID | Invalid ID number | 无效的证件号 |
| EMAIL_INVALID | Your email is invalid, or your account is not active, please confirm and re-enter. | 无效的Email |
| DOCUMENT_INVALID | Invalid document. | 无效的文档 |
| TCK_INVALID | TC Kimlik No. is incorrect. | 无效的TC Kimlik No. |
| DATE_INVALID | The data format is error, please check. | 无效的日期 |
| PAYEE_NAME_INVALID | Your name is invalid, or does not match, please confirm and re-enter. | 无效的付款人姓名 |
| REMARK_INVALID | Invalid remark | 无效的remark |
| CNIC_INVALID | The CNIC is incorrect, pls confirm and re-enter. | 无效的CNIC |
| ACCOUNT_BLOCKED | Payer account/card blocked or frozen. Pls confirm payment account/card status. | 账号被锁定/冻结 |
| PAYMENT_CANCELED | payment canceled. | 用户在第三方支付取消 |
| PAYMENT_TOKEN_ID_INVALID | PaymentTokenID is invalid. Please confirm if it has been authorized and bound | paymentTokenId不合法,请检查输入是否正确,或已经解绑 |
| MER_CONFIG_ERROR | Merchant config error. Please contact us to check your dynamic3DS configuration. | 商户未开通动态3d功能 |
| ACCOUNT_VALIDATION_INVALID | Please complete the account verification firstly. | 账户未完成验证,请先完成账户验证 |
| PAYMENT_PROCESSING_BANKTRANSFER | The previous payment is still processing, please make sure that you have made the bank transfer. Otherwise, please wait for 10 minutes to initiate a new request. | 上一笔支付处理中,请确认已完成银行转账,否则请等待10分钟后重试 |
| REQUEST_PARAM_INVALID | [amount.value] must be greater than zero | 请求参数无效,金额必须大于零 |
| INSUF_BAL_FALLBACK | Your account balance is insufficient to cover the amount. Please check your account balance. | 账户余额不足,请检查账户余额 |
| ONLY_ONE_AUTH_CHANNEL_ALLOWED | only one authorization channel is allowed | 仅允许一个授权渠道 |
| ISSUER_PAYMENT_REJECTED | Transaction failed at issuer end due to risk control. Please try using a different card or contact your issuer for more detail. | 交易被发卡行风控拒绝,请更换银行卡或联系发卡行 |
| AMOUNT_LIMIT | The amount exceeds user amount limit. | 用户金额限制 |
| AMOUNT_LIMIT | The amount exceeds the limit for per transaction limit. | 单笔交易金额限制 |
| AMOUNT_LIMIT | The amount exceeds the limit for the day. | 日交易金额限制 |
| CARD_INVALID | Expired card. | 卡已过期 |
| CARD_INVALID | Card scheme is not supported. | 卡组织不支持 |
| CARD_INVALID | Only support the card which issue by local bank, pls change local card. | 仅支持本地银行卡 |
| OTP_VERIFY_FAILED | OTP verify failed. | OTP验证失败 |
| PAYMENT_METHOD_NOT_EXIST | Bank temporarily not available, please retry later. | 银行暂时不可用,请稍后重试 |
| PAYMENT_METHOD_SUSPEND | The payment method is in maintenance, please try again later. | 支付方式维护中,请稍后重试 |
| PAYMENT_FAILED | Transaction declined. | 交易被拒绝 |
| PAYMENT_FAILED | There is no channel to support the payment. | 无可用支付渠道 |
| PAYMENT_FAILED | Payment was not completed on time. | 支付超时未完成 |
| PAYMENT_FAILED | Provider failed to process. | 支付失败 |
| AUTHENTICATE_FAILED | Your payment was declined due to authentication failure. Please try using a different card or contact your issuer for more detail. | 授权失败 |
| AUTH_EXPIRED | The authorization has expired, pls rebind. | 授权过期 |
| AUTH_FAILED | Authorization failed. | 授权失败或不存在 |
| RISK_FAILED | This transaction was automatically blocked due to identified risk. | 该交易因存在确认性风险被拦截 |
| RISK_FAILED | The payment has reached the security limit. Please advise the user to try another payment method or attempt the transaction again later. | 用户支付已达到安全限额/限次,建议用户尝试其他支付方式 |
| RISK_FAILED | The payment has exhibited suspicious activity. We suggest that the user use a local card or disable their VPN before trying again. | 检测到支付行为异常,建议用户使用本地银行卡或关闭VPN后重试 |
| RISK_FAILED | The payment was declined due to unusual activity from the user. We recommend changing to a different payment method and attempting the transaction again. | 由于交易风险较高,支付已被拒绝,建议用户更换其他支付方式 |
| ISSUER_PAYMENT_REJECTED | Device IP restriction,please make sure your VPN is turned off when making the payment for security reason. | 设备IP受限,请关闭VPN后重试 |
| PAYMENT_REJECTED | Transaction failed at processor end due to risk control.Please try using a different payment method/card. | nan |
| RISK_BLACK_LIST_FAILED | The payment was declined due to high risk with the payment. | 此笔交易命中商户自身侧黑名单,黑名单详情可登录MMC查询 |
| ISSUER_PAYMENT_REJECTED | Transaction failed at issuer end due to risk control. Please contact your payment method issuer for more detail. | 交易被发卡行拒绝,详情请用户咨询发卡行确认 |
| Field | Type | Required | Constraints | Description | Enum |
|---|---|---|---|---|---|
code | string | Yes | 返回码,’APPLY_SUCCESS’代表成功。只代表接口请求成功,不代表订单状态。 | ||
msg | string | Yes | 返回描述,’Success.’。只代表接口请求成功,不代表订单状态。 | ||
data | object | No | 返回数据体 | ||
data.outTradeNo | string | Yes | maxLength: 64 | 商户订单号 | |
data.tradeToken | string | Yes | maxLength: 64 | PayerMax流水号 | |
data.status | string | Yes | maxLength: 32 | 交易状态,详见【交易状态】 | |
data.redirectUrl | string | No | maxLength: 1024 | 跳转地址 部分支付方式需要跳转外部完成支付 |
Response Example: 1
成功示例
json
{
"code": "APPLY_SUCCESS",
"msg": " Success.",
"data": {
"outTradeNo": "Test1645780876511",
"tradeToken": "T2024062702289232000001",
"status": "SUCCESS"
}
}Response Example: 2
apm-跳转类响应
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-直连响应
json
{
"msg": "Success.",
"code": "APPLY_SUCCESS",
"data": {
"vaCode": "TEST***001",
"outTradeNo": "orderAndPayOutTradeNo1751265358900gHyeC8LHpb",
"tradeToken": "T2025063006003647012140",
"status": "PENDING"
}
}Response Example: 4
apm-二维码类响应
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
