App plan activated
| Event Group | Event Identification |
|---|---|
| appsubscription | appsubscription/create |
Occurs whenever an app plan is activated. Trigger scenarios include:
- New app plan subscription successful
- App plan renewal after expiration when a new billing cycle begins
Request Headers
- X-Shopline-Topic string requiredThe unique identifier for the event.Example:
orders/edited - X-Shopline-Hmac-Sha256 string requiredThe signature of the request. Upon receiving the request, you must verify the signature to confirm the authenticity and integrity of the data.Example:
XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM= - X-Shopline-Shop-Domain string requiredThe store domain.Example:
example.myshopline.com - X-Shopline-Shop-Id string requiredThe store ID.Example:
1610418123456 - X-Shopline-Merchant-Id string requiredThe merchant ID.Example:
2000001234 - X-Shopline-API-Version string requiredThe API version.Example:
v20250601 - X-Shopline-Webhook-Id string requiredThe ID of this Webhook event.Example:
b54557e48a5fbf7d70bcd043
Request Body
- appkey stringThe globally unique identifier for the app.Example:
56978e0b3f33365396d7786a62ed0a03727e3212 - handle stringThe store's unique identifier in SHOPLINE, corresponding to the
{handle}part of the domain name{handle}.myshopline.com.Example:discount - secondChannelId stringThe secondary channel identifier for specific sales channels like offline POS stores.
Applicable scenarios:- When plans are sold per store location: identifies the specific store
- When plans are sold for the entire store: this parameter is empty
Example:4567223323 - subId stringThe original order number for the expired subscription.Example:
6578332207010012345 subPackageobject
Subscription plan details.autoRenewStatus booleanIndicates whether the store has enabled auto-renewal for this app.true: Auto-renewal enabledfalse: Auto-renewal disabled
endAt longThe expiration time of the subscription, formatted as a 13-digit millisecond timestamp.Example:1757239200000featureKeyList arrayFeature keys included in the plan. If not set during app configuration, it will returnnull.Example:["\"KeyName1\":\"demo1\",\"KeyName2\":\"demo2\",\"KeyName3\":\"demo3\",\"KeyName4\":\"demo4\""]gracePeriod longThe number of units defined bygracePeriodUnit. This parameter, used withgracePeriodUnit, calculates the total effective grace period after a subscription expires.CautionThe grace period follows calendar time. For example, if a plan expires at 22:00:00, a 1-day grace period will cause the app to expire at 22:00:00 the next day.Example:2gracePeriodUnit stringUnit of the grace period. Used together withgracePeriodto indicate the duration of the grace period for the current subscription plan. Valid values are:SECOND: Seconds. Used for app plans and value-added services.DAY: Days. Used for one-time purchase products.
isEnterpriseGift booleanIndicates whether the current subscription is part of an Enterprise plan gift. This field can be ignored if the app is not participating in the Enterprise plan gift program.Valid values:true: The subscription is part of the Enterprise plan gift.false: The subscription is not part of the Enterprise plan gift.
Default value:false.period integerThe number of units defiled byperiodType. This parameter, used withperiodType, calculates the billing cycle duration.Example:1periodType stringThe unit for the billing cycle. Valid values:DAY: DaysMONTH: MonthsYEAR: Years
serviceKeyListobject[]
Services included in the plan, with remaining quantities and validity periods.availableQty longThe remaining available service quantity.Example:20indefinite booleanIndicates whether the current plan is a perpetual service.true: Unlimited validity.false: Limited validity.
serviceKey stringThe unique identifier for the service capability.Example:email_100totalQty longThe total service quantity.Example:100spuKey stringThe unique identifier for the plan, defined when the plan is created.Example:emailstartAt longThe effective time of the subscription, formatted as a 13-digit millisecond timestamp.Example:1756977716000trial booleanIndicates whether the current subscription is a trial plan.true: Trial planfalse: Standard plan
- subTime longThe payment success time in the format of a 13-digit milliseconds timestamp.Example:
1706810461000
Status Codes
After receiving a webhook notification from SHOPLINE, you must respond with the following format:
HTTP/1.1 200 OKFor more information about how to subscribe to webhooks and webhook response rules, refer to Webhook overview.
Was this article helpful to you?