Skip to content

收银台-下单

  • Endpoint: POST /aggregate-pay/api/gateway/orderAndPay
  • Tags: 收单

Description

Parameters

FieldTypeRequiredDescription
Content-Type (header)stringYes
sign (header)stringYes签名信息请参考技术文档

Request Body

FieldTypeRequiredDescriptionEnum
versionstringYes接口版本 当前值为:1.5
keyVersionstringYes密钥版本 当前值为:1
requestTimestringYes请求时间,符合rfc3339规范,格式:yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时间需要在当前时间两分钟内
appIdstringYes商户应用Id,PayerMax分配给商户应用的唯一标识
merchantNostringNo商户号,商户与PayerMax业务签约时生成的唯一标识
dataobjectYes请求数据体
data.outTradeNostringYes商户订单号,唯一标识商户的一笔交易,不能重复,只能包含字母、数字、下划线且不支持大小写敏感。如:AAA和AAa被认为是相同的。
data.integratestringYes使用PayerMax_Hosted_Payment_Page进行付款方支付信息收集及处理,需传入参数:Hosted_Checkout
data.subjectstringYes订单标题或产品信息,会展示在用户支付页面,避免使用纯数字。注:巴西钱包Pix不能超过43位
data.totalAmountnumberYes标价金额,金额的单位为元。各个国家币种支持的小数位详见【交易支持国家/地区与币种】,风控限额详见【风控行业限额
data.currencystringYes标价币种,大写字母,参见【交易支持国家/地区与币种
data.countrystringNo国家代码,大写字母,参见【交易支持国家/地区与币种】。 如指定了paymentMethodType,则国家代码必须上送且和支付方式对应国家匹配。 收银台可用国家地区选择策略为:上送国家代码地区>用户历史使用国家代码地区>用户IP所在国家代码地区。(可用国家地区:交易币种对应的国家与签约国家取交集)
data.userIdstringYes商户内部的用户Id,需要保证每个ID唯一性。支付方式绑定后会根据userId进行支付方式推荐
data.languagestringNo收银台页面语言。【支持的国家与币种】 优先级:用户上次使用的语言 > 用户浏览器语言 > 用户ip国家语言 > 商户下单传的语言 > 默认EN
data.referralCodestringNo用于更精准的支付方式推荐,如设备ID、设备指纹等。
data.referencestringNo商户自定义附加数据,可支持商户自定义并在响应中返回
data.frontCallbackUrlstringYes商户指定的跳转URL,用户完成支付后会被跳转到该地址,以http/https开头或者商户应用的scheme地址。详见【结果页跳转说明
data.notifyUrlstringNo服务端回调通知URL,以http/https开头 可以通过MerchantDashboard平台配置商户通知地址,详情见【配置异步通知地址】,如果交易中上送,则以交易为准,即优先使用接口中传的url。注:如商户平台未配置通知地址,交易也没上送地址,则无法进行回调通知
data.expireTimestringNo指定关单时间(单位:秒)。 1)expireTime 传值时: - 当expireTime<=30min:则关单时间为30min - 当24hour>=expireTime>=30min:则关单时间为expireTime - 当expireTime>=24hour:则关单时间为24hour 2)expireTime 未传值时: - 取这笔订单发起过的支付方式关单时间的最大值。
data.mitManagementUrlstringNo订阅计划管理地址
data.subscriptionPlananyNo
data.paymentDetailobjectNo支付信息,非必填 。 1、可指定支付方式类型,收银台会拉起该支付方式类型支持的所有目标机构 。 2、可指定支付方式类型+目标机构。
data.paymentDetail.paymentTokenIDstringNotoken支付或商家代扣后续支付时,此字段为必填;
data.paymentDetail.paymentMethodTypestringNo支付方式类型,为空时,拉取所有可用支付方式,参见【收银台支付-支付方式列表
data.paymentDetail.targetOrgstringNo目标机构,可以为空,如果指定目标机构,则paymentMethodType也必须指定。参见【收银台支付-支付方式列表
data.paymentDetail.allowedCardOrgarray[string]No指定收银台可使用的卡组
data.paymentDetail.payAccountInfoarray[object]No支付账号,当指定支付方式和目标机构时,支持上送用户在该目标机构的支付账号信息。参见【收银台支付-支付方式列表】下的支持上送账号类型列
data.paymentDetail.payAccountInfo[].accountNostringNo用户在该支付方式下的目标机构注册的支付账号,详见每个支付方式介绍
data.paymentDetail.payAccountInfo[].accountNoTypestringNo账号类型:EMAIL,PHONE,ACCOUNTEMAIL, PHONE, ACCOUNT
data.paymentDetail.tokenForFutureUsebooleanNotrue代表用户已授权进行支付信息绑定,用于后续使用,默认为false。
data.paymentDetail.merchantInitiatedbooleanNo代表是否MIT交易,不传默认为false。
data.paymentDetail.mitTypestringNo代扣类型;枚举值:SCHEDULED、UNSCHEDULED
data.envInfoobjectNo设备信息
data.envInfo.deviceIdstringNo商户设备唯一标识
data.envInfo.deviceLanguagestringNo设备默认语言
data.envInfo.screenHeightstringNo设备高度
data.envInfo.screenWidthstringNo设备宽度
data.subMerchantobjectNo二级商户信息 平台类商户需要上送子商户信息
data.subMerchant.subMerchantNostringNo二级商户号
data.goodsDetailsarray[object]No商品信息,支持传多个。注:电商场景下需要上送。如果传入该对象,则内层必填字段必须传入
data.goodsDetails[].goodsIdstringYes商品ID
data.goodsDetails[].goodsNamestringYes商品名称
data.goodsDetails[].quantitystringYes商品数量
data.goodsDetails[].pricestringYes商品价格,商户系统的报价
data.goodsDetails[].goodsCurrencystringNo商品报价币种,大写字母,参见【交易支持国家/地区与币种
data.goodsDetails[].showUrlstringNo商品链接地址。注:电商场景下需要上送
data.goodsDetails[].goodsCategorystringNo商品类别。注:电商场景下需要上送
data.shippingInfoobjectNo邮寄信息 注:电商场景下需要上送。如果传入该对象,则内层必填字段必须传入
data.shippingInfo.firstNamestringYes收货人名
data.shippingInfo.middleNamestringNo收货人中间名
data.shippingInfo.lastNamestringYes收货人姓
data.shippingInfo.phoneNostringYes收货人手机号
data.shippingInfo.emailstringYes收货邮箱地址
data.shippingInfo.address1stringYes收货地址1
data.shippingInfo.address2stringNo收货地址2
data.shippingInfo.citystringYes收货地址所在城市
data.shippingInfo.regionstringNo收货地址所在区域
data.shippingInfo.statestringNo收货地址所在州 送货到加拿大,美国,英国,澳大利亚时必填
data.shippingInfo.countrystringYes收货地址所在国家
data.shippingInfo.zipCodestringYes收货地址邮编
data.billingInfoobjectNo信用卡账单信息。注:如果传入该对象,则内层必填字段必须传入
data.billingInfo.firstNamestringNo账单人名
data.billingInfo.middleNamestringNo账单人中间名
data.billingInfo.lastNamestringNo账单人姓
data.billingInfo.phoneNostringNo账单人手机号
data.billingInfo.emailstringYes账单邮箱地址
data.billingInfo.address1stringYes账单地址1
data.billingInfo.address2stringNo账单地址2
data.billingInfo.citystringYes账单地址所在城市
data.billingInfo.regionstringNo账单地址所在区域
data.billingInfo.statestringNo账单地址所在州 送货到加拿大,美国,英国,澳大利亚时需要上送
data.billingInfo.countrystringYes账单地址所在国家
data.billingInfo.zipCodestringNo账单地址邮编
data.riskParamsobjectNo详见风控业务数据【商户上送信息

Responses

200 — ## 错误码

分类结果码结果描述
SYSTEM_ERRORSystem is busy, please try again later.系统错误;请联系PayerMax
REQ_TIME_OVER_TIMErequestTime effective in two minutes请求时间与服务端偏差超过2分钟,请检查requestTime后重新发起
TOO_MANY_REQUESTExceed request limitation, please retry later触发接口并发限流,请稍后重试
SIGN_VERIFY_FAILEDThe signature verify failed.签名错误;请核实签名
MERCHANT_INVALIDThe merchant has been offline.无效商户
MERCHANT_APP_INVALIDSignature key is not configured.无效商户APP
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_INVALIDAmount is incorrect.无效的金额
COUNTRY_INVALIDNo country support, pls re-pay.无效的国家;可参考支持的国家和币种
CURRENCY_INVALIDcurrency is invalid,because currency is not defined.无效的币种;可参考支持的国家和币种
CONTRACT_INVALIDMerchant has no activated contract, please check the contract status.无效合约;请检查合约有效性
CONTRACT_INVALIDMerchant has not signed the contract in ${value}.指定的国家/地区未签约;请检查合约有效性
CONTRACT_INVALIDMerchant has not signed the ${paymentMethod} payment method.指定的支付方式未签约;请检查合约有效性
CONTRACT_INVALIDMerchant has not signed the ${targetOrg} target origination correspondingly, although you have signed the ${paymentMethod} payment method.指定的目标机构未签约;请检查合约有效性
CONTRACT_INVALIDMerchant has not signed the ${currency} currency correspondingly, although you have signed the ${paymentMethod} payment method.指定的支付方式有签约,但所指定的币种未签约;请检查合约有效性
CONTRACT_INVALIDMerchant has not signed the ${currency} currency correspondingly, although you have signed the ${paymentMethod} payment method and the ${targetOrg} target origination.指定的目标机构有签约,但所指定的币种未签约;请检查合约有效性
PAYMENT_METHOD_NOT_EXISTThe payment method does not exist.支付方式不存在;请更换其他支付方式
PAYMENT_METHOD_SUSPENDThe payment method already suspend, plz try other payment methods.支付方式暂不可用;请更换其他支付方式
AMOUNT_LIMIT_MINIMUMThe order amount is lower than the minimum limit of the payment method.最小金额限制
AMOUNT_LIMIT_MAXIMUMThe order amount exceeds the maximum limit of the payment method.最大金额限制
AMOUNT_LIMITThe amount doesn't match the payment method requirement.金额限制
ORDER_REPEATThe order number repeat.订单重复
ONBOARD_ERRORPlease complete the merchant onboarding, then refresh the page.商户未报备;请先完成报备
PARTICIPANT_INVALIDInvalid participant.无效分账参与方
PAYMENT_METHOD_NOT_EXISTBank temporarily not available, please retry later.银行暂时不可用,请稍后重试
PAYMENT_METHOD_SUSPENDThe payment method is in maintenance, please try again later.支付方式维护中,请稍后重试
FieldTypeRequiredDescription
codestringYes返回码,’APPLY_SUCCESS’代表成功。只代表接口请求成功,不代表订单状态。
msgstringYes返回描述,’Success.’ 。只代表接口请求成功,不代表订单状态。
dataobjectYes返回数据体
data.redirectUrlstringYes跳转地址
data.outTradeNostringYes商户订单号
data.tradeTokenstringYesPayerMax流水号
data.statusstringYes交易状态,详见【交易状态

Enum Reference

data.paymentDetail.payAccountInfo[].accountNoType

  • EMAIL
  • PHONE
  • ACCOUNT

此页面的内容有帮助吗?

感谢您帮助改进 PayerMax 产品文档!

Last updated:

Released under the MIT License.