NATIVE请求下单
NATIVE支付是指商户系统按微信支付协议生成支付二维码,用户再用微信“扫一扫”完成支付的模式。
应用场景
NATIVE支付适用于PC网站、实体店单品或订单、媒体广告支付等场景
NATIVE请求下单
POST /mch-api/v1/acq/wechat/create_payment
接口认证请参考 认证说明
- 请求示例
{
"payment_method": "NATIVE",
"merchant_order_id": "P147258",
"order_amount": "1.00",
"order_currency": "HKD",
"order_description": "ticket payment",
"notify_url": "https://www.baidu.com",
"expired_time": 300
}
- Request
| 参数 | 说明 | 类型 | 必填 | 示例 |
|---|---|---|---|---|
| payment_method | 支付方式 | string | Y | 枚举值 可填入 NATIVE |
| merchant_order_id | 商户订单号 | string(32) | Y | 用于唯一确定商户下单ID |
| order_amount | 订单金额 | string | Y | 传入金额 例如 "1.25" |
| order_currency | 订单币种 | string | Y | 订单标价 币种 |
| settle_currency | 结算币种 | string | Y | |
| order_description | 订单描述 | string | Y | 订单的描述信息 |
| notify_url | 支付结果回调通知 | string | N | |
| expired_time | 订单过期时间 | int | N | 单位为秒,默认为300 |
- 返回示例
{
"code": 0,
"data": {
"code_url": "weixin://wxpay/bizpayurl?pr=PR6u79czz",
"create_time": "2023-08-31T04:44:05.928696203+08:00",
"merchant_order_id": "C34428245018020000",
"order_amount": "1.00",
"order_currency": "HKD",
"order_id": "C34428245018020000",
"uid": 19291111
},
"message": "ok",
"rid": "d2b810e57d4e4f6aac8387742a6e6582"
}
- Response.Data
| 参数 | 说明 | 示例 |
|---|---|---|
| uid | 平台商户号 | 由平台统一生成分配 |
| order_id | 平台订单号 | |
| merchant_order_id | 商户订单ID | |
| code_url | 返回的code_url | 通过该传生成二维码后扫描支付 |
| order_amount | 订单金额 | |
| order_currency | 订单币种 | |
| create_time | 订单创建时间 |