How can I check the current app subscription status (e.g., renewed, active, or deactivated) using the GraphQL Admin API?

How can I check the current app subscription status (e.g., renewed, active, or deactivated) using the GraphQL Admin API?i am using this query query getSubscriptionDetails($subscriptionId: ID!) {
node(id: $subscriptionId) {
ā€¦ on AppSubscription {
id
name
status
trialDays
currentPeriodEnd
createdAt
lineItems {
id
plan {
pricingDetails {
ā€¦ on AppRecurringPricing {
price {
amount
currencyCode
}
interval
discount {
priceAfterDiscount{amount currencyCode}
durationLimitInIntervals
remainingDurationInIntervals
value{
ā€¦ on AppSubscriptionDiscountPercentage{percentage}
}
}
}
}
}
}
}
}
}

so that is correct or any other api

You can use status field in your query. See the enums below:

If you need transactions etc. for reporting purposes then you can leverage Partner GraphQL API as well.

1 Like