Event GroupEvent Identification
appsubscriptionappsubscription/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 required
    The unique identifier for the event.
    Example: orders/edited
  • X-Shopline-Hmac-Sha256 string required
    The 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 required
    The store domain.
    Example: example.myshopline.com
  • X-Shopline-Shop-Id string required
    The store ID.
    Example: 1610418123456
  • X-Shopline-Merchant-Id string required
    The merchant ID.
    Example: 2000001234
  • X-Shopline-API-Version string required
    The API version.
    Example: v20250601
  • X-Shopline-Webhook-Id string required
    The ID of this Webhook event.
    Example: b54557e48a5fbf7d70bcd043
Request Body
  • appkey string
    The globally unique identifier for the app.
    Example: 56978e0b3f33365396d7786a62ed0a03727e3212
  • handle string
    The store's unique identifier in SHOPLINE, corresponding to the {handle} part of the domain name {handle}.myshopline.com.
    Example: discount
  • secondChannelId string
    The 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 string
    The original order number for the expired subscription.
    Example: 6578332207010012345
  • subPackageobject
    Subscription plan details.
  • autoRenewStatus boolean
    Indicates whether the store has enabled auto-renewal for this app.
    • true: Auto-renewal enabled
    • false: Auto-renewal disabled
  • endAt long
    The expiration time of the subscription, formatted as a 13-digit millisecond timestamp.
    Example: 1757239200000
  • featureKeyList array
    Feature keys included in the plan. If not set during app configuration, it will return null.
    Example: ["\"KeyName1\":\"demo1\",\"KeyName2\":\"demo2\",\"KeyName3\":\"demo3\",\"KeyName4\":\"demo4\""]
  • gracePeriod long
    The number of units defined by gracePeriodUnit. This parameter, used with gracePeriodUnit, calculates the total effective grace period after a subscription expires.
    Caution
    The 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: 2
  • gracePeriodUnit string
    Unit of the grace period. Used together with gracePeriod to 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 boolean
    Indicates 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 integer
    The number of units defiled by periodType. This parameter, used with periodType, calculates the billing cycle duration.
    Example: 1
  • periodType string
    The unit for the billing cycle. Valid values:
    • DAY: Days
    • MONTH: Months
    • YEAR: Years
  • serviceKeyListobject[]
    Services included in the plan, with remaining quantities and validity periods.
  • availableQty long
    The remaining available service quantity.
    Example: 20
  • indefinite boolean
    Indicates whether the current plan is a perpetual service.
    • true: Unlimited validity.
    • false: Limited validity.
  • serviceKey string
    The unique identifier for the service capability.
    Example: email_100
  • totalQty long
    The total service quantity.
    Example: 100
  • spuKey string
    The unique identifier for the plan, defined when the plan is created.
    Example: email
  • startAt long
    The effective time of the subscription, formatted as a 13-digit millisecond timestamp.
    Example: 1756977716000
  • trial boolean
    Indicates whether the current subscription is a trial plan.
    • true: Trial plan
    • false: Standard plan
  • subTime long
    The 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 OK
For more information about how to subscribe to webhooks and webhook response rules, refer to Webhook overview.
Was this article helpful to you?