下单
接口描述:
参数payType(支付方式),非必填
1、传入时,则明确根据传入的支付方式下单。
2、不传或传空时,pathway(途径)参数为必传,如果不传或传空,则须传入qrCord字段,请以返回参数数据中的payType(支付方式)为准。仅限于指定场景。
payload(负载的其它业务数据),非必填
1、由所有支付方式都需要传入的基础参数和当前支付方式的附加参数组成,如当前支付方式无附加参数可只传入基础参数
2、基础参数以及附加参数中为true的参数非特殊情况必须传入
接口地址:/{context}/pay/business/bill
请求方式:POST
consumes:["application/json"]
produces:["*/*"]
请求示例:
{
"amount": 0,
"batch": "",
"callerSN": "",
"currency": "",
"notes": "",
"payType": "",
"pathway": "",
"payload": {
"key": "value"
},
"qrCord": "",
"timeout": 130
}
请求参数
参数名称 | 参数说明 | in | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
amount | 交易金额,医保支付时,该字段是现金支付部分,单位:元 | body | true | number | |
batch | 批次号或账期 | body | false | string | |
callerSN | 调用方流水号,如:HIS 流水号 | body | false | string | |
currency | 交易货币,默认 CNY:人民币 | body | false | string | |
notes | 交易标题、描述或说明,参见:商品说明 | body | true | string | |
pathway | 途径,参见: 途径代码 | body | false | string | |
payType | 支付方式,参见: 支付方式代码 | body | false | string | |
payload | 负载的其它业务数据, JSON 格式 | body | false | object | |
qrCord | 付款码,付款方式为付款码时,必传 | body | false | string | |
timeout | 请求超时时间,单位:秒,默认:130 | body | false | integer(int32) |
所有支付方式: payload 基础参数(非特殊情况true为必传)
参数名称 | 参数说明 | in | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
cardNo | 就诊卡号/住院号/证件号 | body | true | string | |
name | 姓名 | body | true | string | |
businessType | 业务类型,参见业务类型代码 | body | true | string | |
channel | 渠道,参见渠道 | body | true | string | |
organId | 所属机构 | body | false | integer(int32) | |
cbkUrl | 回调地址,由调用方提供,回调规范详情见回调 | body | false | string |
邮储开放式缴费平台,payType=0412,payload 附加参数
参数名称 | 参数说明 | in | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
accessMethod | 接入方式,0:专线接入;1:互联网接入,默认:1 | body | false | string | |
backUrl | 返回按钮跳转 URL | body | true | string |
邮储开放式缴费平台,payType=0415,payload 附加参数
参数名称 | 参数说明 | in | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
txnType | 交易类型,1:移动端;2:PC 端,默认为:1 | body | false | string | |
openId | 用户 ID | body | true | string | |
backUrl | 收银台支付完成返回商户跳转地址 | body | true | string |
中信银联聚合支付,payType=1013,payload 附加参数
参数名称 | 参数说明 | in | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
openId | 用户 ID | body | true | string |
中信 mis 支付,payType=1104,payload 附加参数
参数名称 | 参数说明 | in | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
terminalSN | POS 终端号 | body | true | string |
支付宝 医保电子凭证 支付,payType=0311,payload 附加参数
参数名称 | 参数说明 | in | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
openId | 用户 ID | body | true | string | |
feeSumamt | 费用总额 | body | true | number | |
psnAcctPay | 个人账户支出 | body | true | number | |
fundPay | 医保基金支付 | body | true | number | |
deposit | 住院押金 | body | false | number | 根据下单传入计算,最大值不超过自费现金需要支付金额 |
medica l_card _inst_id |
医保电子凭证 机构号 |
body | true | string | 获取线上医保 业务授权接口 返回medical CardInstId参数。NATHSA |
medica l_card _id |
医保电子凭证 授权码 |
body | true | string | 获取线上医保 业务授权接口 返回medical CardId参数。 6638aabe-7b4d-4d10-bdf0-b44804da3dab |
sys_ser vice_pr ovider_id |
系统商编号, 该参数作为系 统商返佣数据 提取的依据, 请填写系统商 签约协议 的PID |
body | false | string | |
serial _no |
序列号 | body | true | string | 移动支付中心 订单号 payOrdId |
bill_no | 流水号 | body | true | string | 移动支付中心 订单号 payOrdId |
indust ry |
行业标识 | body | true | string | 医院:HOSPITAL |
org_no | 医药机构编号 | body | true | string | H12345678901 |
org_na me |
医药机构名称 | body | true | string | 第一医院 |
pay_au th_no |
移动支付中心 返回授权编号 |
body | true | string | 获取线上医保 业务授权接口 返回payAuthNo参数 |
chinfo | 渠道标识 | body | true | string | 默认为gjydzf |
scene | 使用场景 | body | true | string | TREATMENT |
insura nce_pa y_scene |
医保结算场景 :OUTPATIENT -门诊;INPATIENT -住院;APPOINT MENT -挂号;DRUG STORE -药店 |
body | true | string | OUTPATIENT |
paymen t_city _code |
医保结算地城 市编码(国标) ,可填写医院所 在地城市编码。 |
body | true | string | 330100 |
insuran ce_sub sidy_mode |
医保补充计算 方式:involve -包含 except-去除 (有补充金额时 必填) |
body | false | string | except |
insuran ce_sub sidy_amount |
医保补充计算 金额(单位: 元) (有补充金额时 必填) |
body | false | string | 23.00 |
insuran ce_sub sidy_type |
医保补充计算 说明:FREIGHT-运费 ,PRECARD -预付费卡 ,MARKET -运营活动 ,OTHER-OTHER (有补充金额时 必填) |
body | false | string | FREIGHT |
农行一码多扫线下扫码下单 支付,payType=0903,payload 附加参数
参数名称 | 参数说明 | in | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
TerminalNo | 扫码支付终端号 | body | true | string |
响应示例:
{
"currency": "CNY",
"amount": 0,
"refund": 0,
"canceled": 0,
"sn": "",
"originalSN": "",
"bankSN": "",
"callerSN": "",
"terminalSN": "",
"payType": "",
"notes": "",
"qrCord": "",
"payTime": "",
"expiryTime": "",
"createTime": "",
"batch": "",
"type": "",
"id": 0,
"remark": "",
"payload": "",
"state": "",
"message": "",
"userId": 0,
"userName": "",
"organId": 0,
"organName": ""
}
响应参数:
参数名称 | 参数说明 | 类型 | schema |
---|---|---|---|
currency | 货币 | string | |
amount | 金额,单位:元 | number | |
refund | 退费金额,单位:元 | number | |
canceled | 撤单金额,单位:元 | number | |
sn | 流水号 | string | |
originalSN | 原单流水号,退费时记录原支付流水号 | string | |
bankSN | 支付渠道流水号,如:各个银行流水号或业务主键 | string | |
callerSN | 调用方流水号,如:HIS 流水号 | string | |
terminalSN | 终端流水号,如:POS 机流水号/凭证号(建行 OCX 返回) | string | |
payType | 支付方式,参见:约定字典 | string | |
notes | 交易标题、描述或说明 | string | |
qrCord | 支付码 | string | |
payTime | 支付时间 | string(date-time) | string(date-time) |
expiryTime | 失效时间 | string(date-time) | string(date-time) |
createTime | 创建时间 | string(date-time) | string(date-time) |
batch | 批次/账期 | string | |
type | 订单类型,0:支付;1:退费;2:撤单 | string | |
id | 标识,修改时必须 | integer(int32) | integer(int32) |
remark | 备注/描述 | string | |
payload | 负载的其它业务数据, JSON 格式 | string | |
state | 支付状态,1:初始化、2:交易中、3:成功、4:失败 | string | |
message | 消息 | string | |
userId | 用户ID | number | |
userName | 用户名称 | string | |
organId | 机构ID | number | |
organName | 机构名称 | string |
响应状态:
状态码 | 说明 | schema |
---|---|---|
200 | OK | |
201 | Created | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |