文档中心 > API类目 > 本地生活API

alibaba.alsc.crm.recharge.charge.update (储值充值)

顾客储值账户充值

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_recharge_open_req RechargeOpenReq 必须 入参
  • └ biz_date
  • Date
  • 可选
  • 2019-01-01 13:12:12
  • 时间,选填,不填就以平台为准
  • └ card_id
  • String
  • 必须
  • 76123786153828
  • 卡Id,礼品卡或会员卡Id
  • └ charge_type
  • String
  • 必须
  • CHARGE
  • 充值类型,必填
  • └ gift_value
  • Number
  • 可选
  • 30
  • 赠储值
  • └ brand_id
  • String
  • 可选
  • 12335234234
  • SaaS品牌ID(不能和outbrandid同时为空)
  • └ operator_id
  • String
  • 必须
  • 78263467236482
  • 操作人ID(SaaS Id)
  • └ shop_id
  • String
  • 可选
  • 542423412
  • SaaS门店ID(不能和outshopid同时为空)
  • └ outer_order_id
  • String
  • 必须
  • 7162356125361426516
  • 外部交易单号id(外部调用方保证在isv内部是唯一,可以是paymentItemId)
  • └ pre_value
  • Number
  • 可选
  • 100
  • 预储
  • └ real_value
  • Number
  • 可选
  • 200
  • 实储值
  • └ remark
  • String
  • 可选
  • 备注
  • 备注
  • └ request_id
  • String
  • 必须
  • 12387s76sd6cs8dc
  • 幂等号
  • └ trigger_gift
  • Boolean
  • 必须
  • false
  • 是否触发储值赠送,必填 1. true:触发赠送,realValue必填 2. false:不触发赠送,realValue和giftValue必填
  • └ out_pay_id
  • String
  • 可选
  • 12312312
  • 外部支付单id
  • └ out_shop_id
  • String
  • 可选
  • 12312312
  • 外部门店id(不能和shopid同时为空)
  • └ out_brand_id
  • String
  • 可选
  • 1231231
  • 外部品牌ID(不能和brandid同时为空)
  • └ biz_channel
  • String
  • 必须
  • CS
  • CS是辰森,KRY是客如云
  • └ ext_info
  • String
  • 可选
  • {"payModeId":"WX", "payModeName":"微信"}
  • 支付方式需要按照标准格式传入

响应参数

名称 类型 示例值 描述
result CommonResult 接口结果
  • └ biz_success
  • Boolean
  • false
  • 成功状态
  • result
  • RechargeAccountFlowDetailOpenInfo
  • a
  • 业务数据
  • └ account_id
  • String
  • 87862376487263876235
  • 储值账户id
  • affected_property_list
  • RechargeAccountPropertyOpenInfo []
  • null
  • 操作储值资产信息列表
  • └ type
  • String
  • REAL
  • 账户类型
  • └ value
  • Number
  • 2000
  • 账户值
  • after_property_list
  • RechargeAccountPropertyOpenInfo []
  • null
  • 操作后储值资产信息列表
  • └ type
  • String
  • GIFT
  • 账户类型
  • └ value
  • Number
  • 200
  • 账户值
  • before_property_list
  • RechargeAccountPropertyOpenInfo []
  • null
  • 操作前储值资产信息列表
  • └ type
  • String
  • TOTAL
  • 账户类型
  • └ value
  • Number
  • 2200
  • 账户值
  • └ brand_id
  • String
  • 172635
  • 品牌Id
  • └ current_value
  • Number
  • 2000
  • 交易后剩余总金额
  • ext_info
  • Extinfo
  • null
  • 扩展信息
  • └ empty
  • Boolean
  • false
  • 1
  • └ flow_id
  • String
  • 48362591
  • 储值账户流水id
  • └ flow_type
  • String
  • CHARGE
  • 储值相关的交易类型
  • └ operator
  • String
  • 12723521
  • 操作人ID
  • └ operator_name
  • String
  • 小明
  • 操作人
  • └ order_src
  • Number
  • 2
  • 外部订单来源
  • └ order_time
  • Date
  • 2019-07-11 13:13:13
  • 交易时间
  • └ order_value
  • Number
  • 2000
  • 交易总金额,增加为正数,减少为负数
  • └ outer_order_id
  • String
  • 81723567349127
  • 外部交易单号id
  • └ remark
  • String
  • 见好就收多久
  • 备注
  • └ shop_id
  • String
  • 70029372
  • 交易门店ID
  • └ shop_name
  • String
  • 花生小吃
  • 交易门店名称
  • └ result_code
  • String
  • 200
  • 结果码
  • └ result_desc
  • String
  • 成功
  • 结果描述
  • └ result_view
  • String
  • ""
  • 错误结果显示

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlscCrmRechargeChargeUpdateRequest req = new AlibabaAlscCrmRechargeChargeUpdateRequest();
AlibabaAlscCrmRechargeChargeUpdateRequest.RechargeOpenReq obj1 = new AlibabaAlscCrmRechargeChargeUpdateRequest.RechargeOpenReq();
obj1.setBizDate(StringUtils.parseDateTime("2019-01-01 13:12:12"));
obj1.setCardId("76123786153828");
obj1.setChargeType("CHARGE");
obj1.setGiftValue(30L);
obj1.setBrandId("12335234234");
obj1.setOperatorId("78263467236482");
obj1.setShopId("542423412");
obj1.setOuterOrderId("7162356125361426516");
obj1.setPreValue(100L);
obj1.setRealValue(200L);
obj1.setRemark("备注");
obj1.setRequestId("12387s76sd6cs8dc");
obj1.setTriggerGift(false);
obj1.setOutPayId("12312312");
obj1.setOutShopId("12312312");
obj1.setOutBrandId("1231231");
obj1.setBizChannel("CS");
obj1.setExtInfo("{\"payModeId\":\"WX\", \"payModeName\":\"微信\"}");
req.setParamRechargeOpenReq(obj1);
AlibabaAlscCrmRechargeChargeUpdateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alsc_crm_recharge_charge_update_response>
    <result>
        <biz_success>false</biz_success>
        <result>
            <account_id>87862376487263876235</account_id>
            <affected_property_list>
                <recharge_account_property_open_info>
                    <type>REAL</type>
                    <value>2000</value>
                </recharge_account_property_open_info>
            </affected_property_list>
            <after_property_list>
                <recharge_account_property_open_info>
                    <type>GIFT</type>
                    <value>200</value>
                </recharge_account_property_open_info>
            </after_property_list>
            <before_property_list>
                <recharge_account_property_open_info>
                    <type>TOTAL</type>
                    <value>2200</value>
                </recharge_account_property_open_info>
            </before_property_list>
            <brand_id>172635</brand_id>
            <current_value>2000</current_value>
            <ext_info>
                <empty>false</empty>
            </ext_info>
            <flow_id>48362591</flow_id>
            <flow_type>CHARGE</flow_type>
            <operator>12723521</operator>
            <operator_name>小明</operator_name>
            <order_src>2</order_src>
            <order_time>2019-07-11 13:13:13</order_time>
            <order_value>2000</order_value>
            <outer_order_id>81723567349127</outer_order_id>
            <remark>见好就收多久</remark>
            <shop_id>70029372</shop_id>
            <shop_name>花生小吃</shop_name>
        </result>
        <result_code>200</result_code>
        <result_desc>成功</result_desc>
        <result_view>&quot;&quot;</result_view>
    </result>
</alibaba_alsc_crm_recharge_charge_update_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部