Requires read_store_metrics access scope.
For more info, refer to:
GET https://{handle}.myshopline.com/admin/openapi/v20260301/store/subscription
handle : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is open001.myshopline.com , the store handle is open001 .
Get active store plans, including the current plan and the next period plan (if any).
  • Current plan: A store plan that is successfully activated and currently within its billing cycle.
  • Next plan: A store plan that has been successfully activated and is pending the start of its billing cycle.
Request Headers
  • Content-Type string required
    The field must be set to the fixed value application/json; charset=utf-8.
  • Authorization string required
    The access token for the API resource. Refer to App authorization to obtain the access token, and then pass the obtained token in the Bearer format.
    Example:
    Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
Request Body
  • include_trial boolean
    Whether the returned results should include trial-type plans. Plans have two types: trial plans and paid plans.
    • true: Returns both trial and paid plans.
    • false: Returns only paid plans, excluding trial plans.

    Default value: false
    Example: true
Status Codes
For the complete list of codes and messages, see Http status code.

Response Headers
  • traceId
    A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.
Response Body
  • dataobject[]
    A list of store plan details.
  • auto_recurring boolean
    Whether the plan subscription has auto-renewal enabled.
    • true: Auto-renewal is enabled for this plan subscription. The subscription will automatically renew upon expiration.
    • false: Auto-renewal is not enabled for this plan subscription.
    Example: true
  • billing_cycle string
    The billing cycle of the plan subscription.
    • 1year: Annual payment, the billing cycle is one year.
    • monthly: Monthly payment, the billing cycle is one month.
    Example: 1year
  • business_parameters map
    Additional information about the plan.
    Example: {"MCC_packageVersion":"pe","SLP":"Premium"}
  • cancelled_at long
    The cancellation time of the plan subscription, formatted as a 13-digit millisecond timestamp.
    DEPRECATED
    This parameter will be deprecated from version v20260301.
    Example: 1689504361000
  • created_at long
    The creation time of the plan subscription, formatted as a 13-digit millisecond timestamp.
    Example: 1689504361000
  • enable boolean
    Whether the plan subscription has been activated.
    • true: Activated, meaning the store bound to the plan subscription has completed setup.
    • false: Not activated, meaning the store bound to the plan subscription has not completed setup.
    Deprecated
    This parameter will be deprecated from version v20260301.
    Example: true
  • end_at long
    The end time of the plan subscription, formatted as a 13-digit millisecond timestamp. This includes any complimentary duration but excludes the grace period.
    Example: 1689504361000
  • extend_peroid integer
    The complimentary duration of the plan subscription (in seconds).
    Example: 6
  • grace_period integer
    The grace period of the plan subscription (in seconds). The grace period is the duration during which the plan remains usable after reaching the end time, before the store is suspended due to non-payment.
    Example: 7
  • grace_period_end_at long
    The end time of the grace period, formatted as a 13-digit millisecond timestamp.
    Example: 1692182769000
  • merchant_email string
    The merchant's email address.
    Example: open001@shopline.com
  • merchant_id long
    The unique identifier for the merchant's registered account.
    Example: 4200320559
  • next_recurring_at long
    The next renewal time of the plan subscription, formatted as a 13-digit millisecond timestamp.
    Deprecated
    This parameter will be deprecated from version v20260301.
    Example: 1692182769000
  • payment_method string
    The payment method for the plan subscription.
    • CreditCard: Credit card payment
    • UnionPayCard: China UnionPay payment
    • PayPal: PayPal payment
    • WeChat: WeChat Pay
    Deprecated
    This parameter will be deprecated from version v20260301.
    Example: CreditCard
  • product_line string
    The unique identifier for the store plan. Available plans may vary by region. Plans prefixed with global_ (e.g., global_standard) are applicable to merchants in Singapore, Malaysia, and Thailand, while plans prefixed with cn_ (e.g., cn_standard) are applicable to merchants in all other regions outside the aforementioned areas.
    • enterprise: Enterprise.
    • global_lite: Lite.
    • global_starter: Starter.
    • global_essential: Essential.
    • global_standard: Standard.
    • global_premium: Premium.
    • cn_lite: Lite.
    • cn_monthly_standard: Starter.
    • cn_basic: Essential.
    • cn_standard: Standard.
    • cn_plus: Premium.
    • retail: Retail.
    • devstore: Development Store Plan.
    • sandbox_enterprise: Sandbox Enterprise.
    Example: cn_monthly_standard
  • product_name map
    The name of the plan. Includes Simplified Chinese, English, Traditional Chinese, Malay, and Japanese.
    Example: {"en":"Starter","jp":"スターター","malay":"Versi pertama","zh-hans-cn":"入门版","zh-hant-tw":"入門版"}
  • remarks string
    Remarks provided when the plan was activated.
    DEPRECATED
    This parameter will be deprecated from version v20260301.
  • start_at long
    The start time of the plan subscription, formatted as a 13-digit millisecond timestamp.
    Example: 1689504369000
  • status string
    The status of the plan subscription.
    • active: Active. The plan subscription is currently in effect.
    • expired: Expired. The plan subscription has reached its end time but is still within the grace period.
    Example: active
  • store_handle string
    The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is open001.myshopline.com, the store handle is open001.
  • store_id long
    Store ID.
    Example: 1666942294702
  • sub_id string
    The plan subscription ID, which can be used as a unique key.
    Example: SUB6025977562148654208
  • type string
    The type of the plan subscription.
    • trial: Trial (current period). A trial-type plan.
    • paid: Paid (current period). A paid-type plan that has entered its billing cycle.
    • preorder: Paid (next period). A paid-type plan that has not yet entered its billing cycle.
    Example: trial
  • message string
    Response information.
    DEPRECATED
    This parameter will be deprecated from version v20260301.
    Example: success
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

header required

Body

required
{
  "include_trial": true
}

Language

curl --request GET \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301/store/subscription \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
Get active plans containing trial plans
Response
{
"code": "SUCCESS",
"data": [
{
"auto_recurring": true,
"billing_cycle": "monthly",
"business_parameters": {
"MCC_packageVersion": "pe",
"SLP": "Premium"
},
"cancelled_at": null,
"created_at": 1737096898846,
"enable": false,
"end_at": 1833688800000,
"extend_peroid": null,
"grace_period": 604800,
"grace_period_end_at": 1834293600000,
"merchant_email": "openapi_v2@shopline.com",
"merchant_id": 2000234880,
"next_recurring_at": 1833688800000,
"payment_method": null,
"product_line": "cn_plus",
"product_name": {
"en": "Premium",
"id": "Versi unggal",
"ja": "プレミアム",
"ms": "Versi terakhir",
"th": "เวอร์ชันสุดยอด",
"vi": "Phiên bản cao cấp nhất",
"zh-hans-cn": "旗舰版",
"zh-hant-tw": "旗艦版"
},
"remarks": "This is a test",
"start_at": 1831006800000,
"status": "active",
"store_handle": "openapiceshidianpu",
"store_id": 1672369729606,
"sub_id": "6824447848118755284",
"type": "preorder"
},
{
"auto_recurring": true,
"billing_cycle": "1year",
"business_parameters": {
"MCC_packageVersion": "pe",
"SLP": "Premium"
},
"cancelled_at": null,
"created_at": 1734664595491,
"enable": false,
"end_at": 1831006800000,
"extend_peroid": null,
"grace_period": 604800,
"grace_period_end_at": 1831611600000,
"merchant_email": "openapi_v2@shopline.com",
"merchant_id": 2000234880,
"next_recurring_at": 1831006800000,
"payment_method": null,
"product_line": "cn_plus",
"product_name": {
"en": "Premium",
"id": "Versi unggal",
"ja": "プレミアム",
"ms": "Versi terakhir",
"th": "เวอร์ชันสุดยอด",
"vi": "Phiên bản cao cấp nhất",
"zh-hans-cn": "旗舰版",
"zh-hant-tw": "旗艦版"
},
"remarks": null,
"start_at": 1736308800000,
"status": "active",
"store_handle": "openapiceshidianpu",
"store_id": 1672369729606,
"sub_id": "6783640569002072715",
"type": "paid"
}
],
"message": "success"
}
Was this article helpful to you?