商家订阅应用套餐
事件分组 | 事件标识 |
---|---|
appsubscription | appsubscription/create |
当商家订阅应用内的商品时,平台会将相关订阅信息推送给开发者
请求头
- X-Shopline-Topic string required事件操作标识Example:
orders/edited
- X-Shopline-Hmac-Sha256 string required签名Example:
XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM=
- X-Shopline-Shop-Domain string required店铺域名Example:
shophub.myshopline.com
- X-Shopline-Shop-Id string required店铺idExample:
1610418123456
- X-Shopline-Merchant-Id string required商户IDExample:
2000001234
- X-Shopline-API-Version string required版本号Example:
v20210901
- X-Shopline-Webhook-Id string required消息IDExample:
b54557e48a5fbf7d70bcd043
请求体
- appkey string应用唯一标识。Example:
56978e0b3f33365396d7786a62ed0a03727e3212
- handle string店铺域名中的第一个单词,也是店铺的唯一标识,比如:www.discount.myshopline.com;"discount"即为handleExample:
discount
- secondChannelId string二级渠道ID,通常用于线下门店购买服务Example:
4567223323
- subId string创建订阅时生成的对应订单号Example:
6578332207010012345
subPackageobject
订阅记录对象autoRenewStatus boolean当前订阅记录是否开启了自动续费Example:true
endAt long订阅的失效时间精确到秒。失效时间通常设定为生效时间加上一个周期时长后的整点。featureKeyList array套餐包含的功能点Example:{ demo:feature }
gracePeriod long宽限期数值,即在到期日之后仍然可以正常使用应用功能的时长。- 注意:宽限期为按照自然时间计算;比如套餐在22:33:33 到期后,设置1天宽限期,则应用套餐在第二天的 22:33:33 彻底失效
Example:2
gracePeriodUnit string宽恕期的单位,- SECOND:秒,应用套餐和增值服务使用这个单位
- DAY:天,一次性付费商品使用这个单位
Example:SECOND
isEnterpriseGift boolean当前订阅记录是否属于打包售卖时的附赠部分- true:是
- false:否
Example:true
period integer周期的数值Example:1
periodType string周期单位,枚举值:- DAY:周期单位为天
- YEAR:周期单位为年
Example:DAY
serviceKeyListobject[]
服务能力的列表,目前只有‘一次性付费套餐’有这个对象availableQty long服务剩余可用的数值Example:20
indefinite boolean是否无限期的商品- true:无限期商品 -false:非无限期商品
Example:true
serviceKey string服务能力的唯一标识Example:email_100
totalQty long服务包含的总数值Example:100
spuKey string在创建套餐时录入的套餐唯一标识Example:email
startAt long套餐的订阅生效时间,精确到秒trial boolean这个订阅记录是否为试用- True:试用
- False:非试用
Example:true
- subTime long支付成功的时间戳Example:
1706810461000
响应
收到 SHOPLINE 发送的 Webhook 通知后,你需要按照如下 SHOPLINE 要求的格式进行响应。
HTTP/1.1 200 OK
关于如何订阅 Webhooks 及更多 Webhook 响应规则说明,请参考 Webhook 概述。
这篇文章对你有帮助吗?