会员购卡回调

接口介绍:

描述:此接口由商户提供,在收钱吧侧配置。当会员购卡完成后,收钱吧服务器调用此接口将会员当次购卡信息通知到商户服务器。

API endpoint: {品牌商户配置的购卡回调域名}

Verb: POST

Signature :需要签名,参考统一签名说明

请求参数:

参数 出现 类型 约束 描述
brand_code 1 String 字符串,最大 20 位 品牌编号,系统对接前由“收钱吧”提供
order_no 1 String 字符串,最大 36 位 收钱吧侧购卡订单号,此订单号也会出现在用户"我的订单"列表内
user_id 1 String 字符串,最大 64 位 用户在礼品卡微信小程序内的UnionId
user_mobile 0-1 String 该会员在小程序内授权过手机号时,则会返回该字段
country_code 0-1 String 字符串,最大32位 手机号区号,比如"86",该会员在小程序内授权过手机号时,则会返回该字段
cards 0-1 Array 数组 购买成功生成的卡的列表,仅购卡时出现
coupons 0-1 Array 数组 购买成功生成的券的列表,仅购券时出现
third_part_activity 0-1 Object 对象 第三方活动对象
biz_time 1 String 字符串,最大 20 位 购买成功的时间
total_amount 1 String 字符串,最大 11 位 购买的卡的总计面额,以分为单位
total_net_amount 1 String 字符串,最大 11 位 购买的卡的总计净额,以分为单位
pay_amount 1 String 字符串,最大 11 位 用户购买的卡付款的总金额,以分为单位
collect_amount 1 String 字符串,最大 11 位 用户购买的卡商户的总实收金额,以分为单位

cards:

参数 出现 类型 约束 描述
card_number 1 String 字符串,最大 36 位 卡号
card_name 1 String 字符串,最大 36 位 卡名
card_type 1 String 字符串,最大 4 位 标志卡的类型
1:礼品卡
card_spec_id 1 String 字符串 卡规则 id
card_surface_id 1 String 字符串 卡面 id
card_surface_name 0-1 String 字符串,最大 36 位 卡面名称
card_surface_url 0-1 String 字符串 卡面图片地址
card_denomination 1 String 字符串,最大 20 位 卡的面额,以分为单位
card_net_amount 1 String 字符串,最大 20 位 卡的净额,以分为单位
card_balance 1 String 字符串,最大 20 位 卡当前剩余的余额,以分为单位
card_net_balance 1 String 字符串,最大 20 位 卡当前剩余的净额,以分为单位
card_sales_biz_tag 0-1 String 字符串 销售业务标签

coupons:

参数 出现 类型 约束 描述
coupon_number 1 String 字符串,最大 36 位 券号
coupon_name 1 String 字符串,最大 36 位 券名
coupon_type 1 String 字符串,最大 4 位 1:单品券
coupon_surface_id 1 String 字符串 券面 id
coupon_surface_name 0-1 String 字符串,最大 36 位 券面名称
coupon_surface_url 0-1 String 字符串 券面图片地址
coupon_denomination 1 String 字符串,最大 20 位 面额,以分为单位
coupon_value 1 String 字符串,最大 20 位 余额,以分为单位
coupon_net_value 1 String 字符串,最大 20 位 净额,以分为单位
coupon_sku_spec_id 0-1 String 字符串,最大128 位 券兑换码
coupon_sku_spec_names 0-1 String 字符串,最大128 位 券兑换说明
card_sales_biz_tag 1 String 字符串 销售业务标签

third_part_activity:

参数 出现 类型 约束 描述
activity_sn 0-1 String 字符串 优先返回第三方系统活动标识,没有第三方系统活动标识返回礼品卡系统中的活动标识
client_member_id 0-1 String 字符串 商户端的用户 id
third_part_type 0-1 int 数字 第三方系统的类型
1 - 表示CRM系统

返回参数:

描述:商户收到回调后的响应,收钱吧判断回调成功的标志。

参数 必填 类型 约束 描述
response 1 String JSON 格式 收到通知的返回结果体
response.head 1 String JSON 格式 收到通知的返回结果体头部数据,本次响应的公共参数
response.body 1 String JSON 格式 收到通知的返回结果体的业务返回对象,不同结果有各自定义
signature 1 String 签名字符串 收到通知的返回体的加密签名,签名规则见“公共定义”-“签名”部分

response.head:

参数 必填 类型 约束 描述
version 1 String 字符串,最大 10 位 参考各自的 API 接口版本号,当前版本 1.0.0
sign_type 1 String 字符串 签名算法, ‘SHA256’即RSA 加密的 SHA256 算法
appid 1 String 数字,最大 32 位 由收钱吧提供,用于识别商户和应用系统
response_time 1 String 字符串,最大 64 位 带时区的请求时间,遵循ISO-8601 标准

response.body:

参数 必填 类型 约束 描述
result_code 1 String 数字,最大 3 位 请求处理结果,
200: 请求成功; 400: 客户端错误; 500: 服务端错误
error_code 0-1 String 字符串 请求处理错误码,请求处理失败才返回
error_message 0-1 String 字符串 请求处理错误信息描述,请求处理失败才返回

响应回调成功的数据格式示例:

{
    "response":{
        "head":{
            "version":"1.0.0",
            "sign_type":"SHA256",
            "appid":"28lp61847655",
            "response_time":"2019-08-01T12:00:00+08:00"
        },
        "body":{
            "result_code":"200"
        }
    },
    "signature":"签名值"
}

results matching ""

    No results matching ""