Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save PrintNow/1287903ea49c8fbf4f9c1ea78e15b1bc to your computer and use it in GitHub Desktop.
Save PrintNow/1287903ea49c8fbf4f9c1ea78e15b1bc to your computer and use it in GitHub Desktop.
使用 Shopify Admin API (GraphQL) 获取订阅信息
{
webPixel {
id
settings
}
currentAppInstallation {
id
activeSubscriptions {
id
status
name
createdAt
currentPeriodEnd
trialDays
test
lineItems {
id
plan {
pricingDetails {
__typename
... on AppRecurringPricing {
interval
price {
amount
}
discount {
durationLimitInIntervals
priceAfterDiscount {
amount
currencyCode
}
value {
... on AppSubscriptionDiscountAmount {
amount {
amount
currencyCode
}
}
... on AppSubscriptionDiscountPercentage {
percentage
}
}
remainingDurationInIntervals
}
}
... on AppUsagePricing {
balanceUsed {
amount
}
cappedAmount {
amount
}
interval
}
}
}
}
}
}
currentAppInstallation {
accessScopes {
handle
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment