Skip to content

积分变更推送

推送参数

其他默认推送参数文档,参考消息推送-使用说明。
当用户积分发生增加、扣减、退款、过期、清零等变化时,平台会向商家配置的消息推送地址发送事件通知。
参数必选类型描述
msg_typestring消息类型:event-事件
eventstring事件类型:pointsChange-积分变更推送
dataobject消息内容

data 参数结构

参数必选类型描述
uidint商户 ID
wechat_user_space_idint用户 ID
typeint积分变动类型
task_typeint任务子类型,非任务场景为 0
points_valueint本次变动积分值,正数表示增加,负数表示扣减
current_pointsint变动后的积分余额
remarksstring备注信息,无则为空串
add_timeint积分变更时间,Unix 时间戳,单位秒
third_wechat_infoarray客户公众号下用户信息
third_user_infoobject客户系统下用户信息

third_wechat_info 参数结构

参数必选类型描述
authorizer_appidstring客户公众号appid
openidstring客户openid
unionidstring客户unionid

third_user_info 参数结构

参数必选类型描述
third_uuidstring客户系统用户ID
third_attachstring客户系统用户附属信息。json字符串

type 枚举说明

取值描述
1任务增加
2购买消费
3扣减
4增加
5退款
6过期
7抵现
8抵现退款
13观看奖励

task_type 枚举说明

取值描述
0手动或非任务场景
1邀请
2订阅
3购买
4评论
5打赏
6礼物
7观看时长
8签到
9观看奖励

推送示例

示例

json
{
  "key": "示例key",
  "timestamp": 1741595400000,
  "sign": "md5sign",
  "msg_id": "2177E51538CC0078F0AXXX",
  "msg_type": "event",
  "event": "pointsChange",
  "push_msg_url": "https://example.com/push/pointsChange",
  "uid": 123456,
  "data": {
    "uid": 123456,
    "wechat_user_space_id": 2040188,
    "type": 1,
    "task_type": 4,
    "points_value": 10,
    "current_points": 210,
    "remarks": "评论奖励",
    "add_time": 1741449600,
    "third_wechat_info": [
      {
        "authorizer_appid": "wx1234567890abcdef",
        "openid": "oKFTf0TEfzfg1234567890",
        "unionid": "o8-ysv1234567890abcdef"
      }
    ],
    "third_user_info": {
      "third_uuid": "user-123456",
      "third_attach": "{\"site\":\"KD13\"}"
    }
  }
}