Event GroupEvent Identification
appsubscriptionappsubscription/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 required
    Event operation identification
    Example: orders/edited
  • X-Shopline-Hmac-Sha256 string required
    Signature
    Example: XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM=
  • X-Shopline-Shop-Domain string required
    Shop domain
    Example: shophub.myshopline.com
  • X-Shopline-Shop-Id string required
    Shop ID
    Example: 1610418123456
  • X-Shopline-Merchant-Id string required
    Merchant ID
    Example: 2000001234
  • X-Shopline-API-Version string required
    Version
    Example: v20210901
  • X-Shopline-Webhook-Id string required
    Message ID
    Example: b54557e48a5fbf7d70bcd043
Request Body
  • appkey string
    Unique Identifier of the Application.
    Example: 56978e0b3f33365396d7786a62ed0a03727e3212
  • handle string
    The 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 string
    Secondary Channel ID, usually used for purchasing services at offline stores
    Example: 4567223323
  • subId string
    Created the order number generated during the subscription
    Example: 6578332207010012345
  • subPackageobject
    Subscription record object
  • autoRenewStatus boolean
    Whether the current subscription record has automatic renewal enabled
    Example: true
  • endAt long
    The 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 array
    Package includes points of functionality
    Example: { demo:feature }
  • gracePeriod long
    Grace 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 string
    Units 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 boolean
    Is the current subscription record part of a bundled sale?
    • true: Yes
    • false: No
    Example: true
  • period integer
    Values of cycles
    Example: 1
  • periodType string
    Cycle 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 long
    The remaining available value of the service
    Example: 20
  • indefinite boolean
    Is the product perpetual?
    • true: Perpetual product
    • false: Non-perpetual product
    Example: true
  • serviceKey string
    Unique identifier of service capability
    Example: email_100
  • totalQty long
    The total value of the service
    Example: 100
  • spuKey string
    Unique Identifier of the Package Entered During Package Creation
    Example: email
  • startAt long
    The subscription effective time of the package, accurate to seconds
  • trial boolean
    Is this subscription record a trial
    • True: Trial
    • False: Not a trial
    Example: true
  • subTime long
    Payment successful time stamp
    Example: 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?