接口文档 / 收费接口
收费单退款(支持部分退)
只退指定商品chargeForms 中只传需要退的商品,needRefundFee 和 refundFee 传这些商品的金额总和。
退到不同支付方式
例如全退 100 元,但要退到两个支付方式:
1. 第一次退费时传所有需退商品,传 needRefundFee=100、refundFee=50,退到支付方式 A。此时商品已全部退完,但仍有 50 元未退。
2. 第二次退费不再传商品,传 needRefundFee=0、refundFee=50,退到支付方式 B。
请求参数
| 名称 | 说明 | 类型 |
|---|---|---|
| Path 参数 | ||
chargeSheetId必填 | string | |
| Body 参数 | ||
operatorId必填 | string | |
needRefundFee可选 | number | |
refundFee可选 | number | |
payMode可选 | integer | |
chargeForms可选 | array<object> | |
请求示例
{
"operatorId": "00000000000000000000000000000000",
"needRefundFee": 0,
"refundFee": 0,
"payMode": 1,
"chargeForms": [
{
"id": "00000000000000000000000000000000",
"chargeFormItems": [
{
"id": "00000000000000000000000000000000",
"unitCount": 1,
"doseCount": 1
}
]
}
]
}响应参数
| 名称 | 说明 | 类型 |
|---|---|---|
| Body 参数 | ||
data可选 | object | |
id必填 | string | |
status必填 | integer | |
statusName必填 | string | |
refundFee必填 | number | |
refundedFee必填 | number | |
error可选可为空 | object | |
响应示例
{
"data": {
"id": "string",
"status": 2,
"statusName": "已收费",
"refundFee": 10,
"refundedFee": 20
},
"error": null
}业务失败包装示意
{
"data": null,
"error": {
"code": 11003,
"message": "不支持的授权类型{grantType}"
}
}