Merchant subscription app package
Event Group | Event Identification |
---|---|
appsubscription | appsubscription/create |
When the merchant subscribe to the Product in the application , the platform will push relevant subscription information to developers
Request Headers
- X-Shopline-Topic string requiredEvent operation identificationExample:
orders/edited
- X-Shopline-Hmac-Sha256 string requiredSignatureExample:
XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM=
- X-Shopline-Shop-Domain string requiredShop domainExample:
shophub.myshopline.com
- X-Shopline-Shop-Id string requiredShop IDExample:
1610418123456
- X-Shopline-Merchant-Id string requiredMerchant IDExample:
2000001234
- X-Shopline-API-Version string requiredVersionExample:
v20210901
- X-Shopline-Webhook-Id string requiredMessage IDExample:
b54557e48a5fbf7d70bcd043
Request Body
- appkey stringUnique Identifier of the Application.Example:
56978e0b3f33365396d7786a62ed0a03727e3212
- handle stringThe first word in the shop's domain name, which is also the shop's unique identifier. For example, in www.discount.myshopline.com, "discount" is the handle.Example:
discount
- secondChannelId stringSecondary Channel ID, usually used for purchasing services at offline storesExample:
4567223323
- subId stringCreated the order number generated during the subscriptionExample:
6578332207010012345
subPackageobject
Subscription record objectautoRenewStatus booleanWhether the current subscription record has automatic renewal enabledExample:true
endAt longThe subscription expiration time is accurate to the second. The expiration time is usually set to the exact hour after adding one cycle duration to the effective time.featureKeyList arrayPackage includes points of functionalityExample:{ demo:feature }
gracePeriod longGrace Period Value: The duration for which application functionalities can still be used after the expiration date.- Note: The grace period is calculated in real time. For example, if the plan expires at 22:33:33 and a grace period of 1 day is set, the application plan will become completely invalid at 22:33:33 on the following day.
Example:2
gracePeriodUnit stringUnits of the Grace Period:- SECOND: Seconds, used for application plans and value-added services.
- DAY: Days, used for one-time purchase items.
Example:SECOND
isEnterpriseGift booleanIs the current subscription record part of a bundled sale?- true: Yes
- false: No
Example:true
period integerValues of cyclesExample:1
periodType stringCycle Unit, with enumerated values:- DAY: Cycle unit is day
- YEAR: Cycle unit is year
Example:DAY
serviceKeyListobject[]
A list of service capabilities. Currently only the ‘one-time payment package’ has this object.availableQty longThe remaining available value of the serviceExample:20
indefinite booleanIs the product perpetual?- true: Perpetual product
- false: Non-perpetual product
Example:true
serviceKey stringUnique identifier of service capabilityExample:email_100
totalQty longThe total value of the serviceExample:100
spuKey stringUnique Identifier of the Package Entered During Package CreationExample:email
startAt longThe subscription effective time of the package, accurate to secondstrial booleanIs this subscription record a trial- True: Trial
- False: Not a trial
Example:true
- subTime longPayment successful time stampExample:
1706810461000
Response
After receiving a webhook notification from SHOPLINE, you must respond with the following format:
HTTP/1.1 200 OK
For more information about how to subscribe to webhooks and webhook response rules, refer to Webhook overview.
Was this article helpful to you?