接口描述
扫码押金冻结当前仅支持支付宝。
项 | 值 |
url | https://pay.qcloud.com/cpay/scancode_freeze |
输入参数
参数名 | 必填 | 类型 | 说明 |
request_content | 是 | String | 请求内容,该 string 可以转为 json 结构,json 格式见本节 RequestContent。 |
authen_info | 是 | AuthenInfo | 认证信息,详见接口调用说明。 |
RequestContent 结构
一级参数名 | 二级参数名 | 三级参数名 | 必填 | 类型 | 说明 |
out_freeze_no | - | 是 | String(32) | 冻结押金授权单号。 | |
| freeze_fee | - | 是 | Number(32) | 冻结金额,单位:分。 |
| fee_type | - | 是 | String | 冻结货币类型。 |
| time_expire | - | 否 | Number(64) | 订单过期时间。 |
| body | - | 是 | String(128) | 商品或订单简要描述。 |
| detail | - | 否 | String | 商品详细列表,由 json 转化而来,json 结构见公共结构 Detail。 |
| remark | - | 否 | String | 支付备注信息。 |
| wxpay_freeze_content_ext | attach | 否 | String(127) | 附加数据,记录子商户自定义数据。 |
| | goods_tag | 否 | String(32) | 商品标记,代金券或立减优惠功能的参数。 |
| | limit_pay | 否 | String(32) | 定支付方式,目前只能是 no_credit,指定不能使用信用卡支付。 |
| alipay_freeze_content_ext | enable_pay_channels | 否 | String | 商户指定支付渠道。 |
pay_mch_key | pay_platform | - | 是 | Number(32) | 第三方支付类型。 |
| sub_pay_platform | - | 否 | Number(32) | 第三方支付子类型。 |
| out_mch_id | - | 是 | String(32) | 服务商对外账号。 |
| out_sub_mch_id | - | 是 | String(32) | 子商户对外账号。 |
| out_shop_id | - | 是 | String(32) | 门店对外账号。 |
| wxpay_pay_mch_key_ext[1] | app_id | 否 | String(32) | 微信分配给服务商的公众账号 ID。 |
| | sub_app_id | 否 | String(32) | 微信分配给子商户的公众账号 ID。 |
| alipay_pay_mch_key_ext[1] | user_id | 否 | String(32) | 用户支付宝 user_id。 |
order_client | device_id | - | 是 | String(64) | 子商户自定义,终端设备号。 |
| staff_id | - | 否 | String(64) | 子商户自定义,店员 ID。 |
| terminal_type | - | 是 | Number(32) | 终端类型,1:Windows,2:Andriod,3:iOS,4:Linux,100:其他。 |
| sdk_version | - | 是 | String(10) | 云支付 SDK 版本号。 |
| spbill_create_ip | - | 是 | String(16) | 调用云支付 API 的机器 IP。 |
nonce_str | - | - | 是 | String(32) | 随机字符串。 |
注意
wxpay_freeze_content_ext 与 alipay_freeze_content_ext 只能填写一个。
wxpay_pay_mch_key_ext 与 alipay_pay_mch_key_ext 只能填写一个。
输出参数
参数名 | 必填 | 类型 | 说明 |
response_content | 是 | ResponseContent | 请求内容,详见本节 ResponseContent。 |
authen_info | 否 | AuthenInfo | 认证信息,详见接口调用说明。 |
ResponseContent 结构
参数名 | 必填 | 类型 | 说明 |
status | 是 | Status | 错误码,详见 Status。0:成功;非0:失败。 |
description | 否 | String(255) | 错误描述。 |
log_id | 是 | Number(32) | 消息 ID。 |
internal_status | 是 | Number(32) | 调试使用,调用者可以不予理会。 |
scan_code_freeze | 否 | ScanCodeFreezeResponse | authen_info 存在时必填。详见 ScanCodeFreezeResponse。 |
ScanCodeFreezeResponse 结构
参数名 | 必填 | 类型 | 说明 |
code_url | 是 | String | 二维码 url。 |
nonce_str | 是 | String(32) | 随机字符串。 |
示例
输入参数示例:
{"authen_info": {"a": {"authen_type": 1,"authen_code": "83F7325E12B8CC780EC907230C7CBC7EDC592C907434C3DA83DB9AE3822EAB0C"}},"request_content": "{"pay_mch_key": {"pay_platform": 2,"sub_pay_platform": 200,"out_shop_id": "sz011biKxOguirmBqiFR","out_sub_mch_id": "sz01KzuCUOmw8yjtPite","out_mch_id": "sz01lXKA6DKGjNzr2l4B"},"nonce_str": "E94C00688C3F429CA2B0B396BF823548","freeze_content": {"body": "body","out_freeze_no": "sz010002cz11566388969","freeze_fee": 10,"fee_type": "CNY"},"order_client": {"staff_id": "1206","machine_no": "00-05-9a-3c-7a-00","terminal_type": 1,"sdk_version": "1.0","device_id": "824","spbill_create_ip": "90.0.00.0"}}"}
输出参数示例:
{"response_content": "{"status": 0,"description": "\\u64CD\\u4F5C\\u6210\\u529F\\u3002","log_id": 3073620540,"internal_status": 0,"scan_code_freeze": {"code_url": "https:\\\\/\\\\/mobilecodec.alipay.com\\\\/show.htm?code=aax05690yvunvarg8pacbc2","nonce_str": "lFLLlzq3n8qvvYBcuxKqFRLo54gsQlY2"}}","authen_info": {"a": {"authen_type": 1,"authen_code": "2686CE142CAA36EF8E5EDAD0E672745B15701A617C4BBF2D69823A721A94C72D"}}}