A place to discuss charging merchants for your apps and services using the billing API.
use appUsageRecordCreate can create a AppUsageRecord.
but how to get the record list?
Solved! Go to the solution
This is an accepted solution.
Hey @xBei-Qiu ,
You can retrieve that through the appInstallation and active subscription.
The specific connection here: https://shopify.dev/docs/api/admin-graphql/2023-10/objects/AppSubscriptionLineItem#connection-usager...
Hope that helps,
- Kyle G.
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
Hey @xBei-Qiu ,
You can retrieve that through the appInstallation and active subscription.
The specific connection here: https://shopify.dev/docs/api/admin-graphql/2023-10/objects/AppSubscriptionLineItem#connection-usager...
Hope that helps,
- Kyle G.
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
it work.
thanks.
query {
appInstallation(id: "gid://shopify/AppInstallation/123456") {
app {
id
}
subscriptions{
id
lineItems{
id,
plan{
pricingDetails{
__typename
}
}
usageRecords(first:100){
edges{
node{
id,
description
createdAt
price{
amount,
currencyCode
}
}
}
pageInfo{
hasNextPage
endCursor
startCursor
}
}
}
}
}
}