文档
测试

1.2.手机付款充值

POST
chargeWebpay

接口描述

消费卡充值,使用手机支持充值,支持赠送金额,也可以绑定手机号码

请求参数

参数名
类型
描述
必填
token
String
登录TOKEN
必填
appid
String
商户appid
必填
card_no
String
会员卡序列号或动态会员码
必填
phone_number
String
手机号码
可选
pay_amount
Double
充值金额,即本金金额
必填
gift_amount
Double
赠送金额
可选
auth_code
String
微信支付或支付宝付款码
必填

响应参数

参数名
类型
描述
必填
code
int
错误码,成功返回 200,失败返回其它
必填
message
String
错误描述
必填
data
Object
对象,业务数据
必填
customer
Object
对象,会员对象,以下是部分重要的会员对象字段
必填
customer_id
Long
会员卡 ID
必填
customer_name
String
会员名
必填
cuttomer_code
String
会员编号,即卡版印刷编号
必填
customer_sn
String
会员卡号(芯片序列号),即刷卡读取出来的字符串
必填
phone_number
String
手机号
必填
enabled
int
会员卡状态:1使用中,0挂失状,-1已注销
必填
balance
Double
会员卡余额,余额=本金余额+补贴/赠送余额
必填
cash
Double
本金余额
必填
subsidy
Double
补贴/赠送余额
必填
result_code
String
结果码,业务成功返回 success
必填
result_msg
String
业务失败信息
必填

说明 / 示例

### 返回示例 #### 成功返回 JSON ``` { "code": 200, "message": "success", "data": { "result_msg": "付款码支付成功", "result_code": "SUCCESS", "customer": { "shared": 1, "balance": 9736.01, "subsidy": 1000.0, "phone_number": "13899996666", "customer_name": "", "customer_id": 1581, "customer_sn": "0849800579", "create_date": "2021-05-24 11:26:04", "customer_code": "", "cash": 8736.01, "update_date": "2021-05-25 12:01:37", "enabled": 1 } } } ``` #### 失败返回 ``` "code": 1502, "message": "business.error.netShopId.isnotExist", "data": "" } ``` ==business.error.netShopId.isnotExist== 商户appid不存在 ``` "code": 4005, "message": "business.error.customer.notFound", "data": "" } ``` ==business.error.customer.notFound== 会员不存在或已注销,一般是会员序列号错误 #### 业务失败返回 ``` { "code": 200, "message": "success", "data": { "result_msg": "101 每个二维码仅限使用一次,请刷新再试", "result_code": "AUTH_CODE_INVALID" } } ```