A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
We are able to create usage record either via REST or GraphQL but the balance is always zero and balance remaining always the same. 'Test charge' is not an issue as it was working successfully for test charge during implementation. But all of a sudden, it just stopped working. The API reference is here:
GraphQL: https://shopify.dev/api/admin-graphql/2022-04/mutations/appUsageRecordCreate
The return from the API when we create the usage charge (Created Under Subscription ID: 21821161601):
{
"usage_charge": {
"id": 352908247041,
"description": "Test charge 3",
"price": "0.15",
"created_at": "2022-07-11T22:55:54-04:00",
"billing_on": "2022-07-11",
"balance_used": 0.0,
"balance_remaining": 45.0,
"risk_level": 0.0
}
}
{
"usage_charge": {
"id": 352970375169,
"description": "Test charge 4",
"price": "0.15",
"created_at": "2022-07-11T23:05:00-04:00",
"billing_on": "2022-07-11",
"balance_used": 0.0,
"balance_remaining": 45.0,
"risk_level": 0.0
}
}
Also, when we are trying to retrieve the usage charge, it is returning empty array in case of 'list of usage charge' and returning 'Not found' incase 'single usage charge'
API reference:
I am looking for an answer to a very similar issue and came across this: https://community.shopify.com/c/shopify-apis-and-sdks/admin-rest-api-getting-a-list-of-usage-charges...
Seems this is a current issue for multiple people. Did you already get some more info on the issue? We face the more or less the same issue. balance is not correct if requested.
We reported exactly the same issue with the same behavior. Feel free to subscribe this thread if we get a faster response. I hope this issue will be solved soon.
https://community.shopify.com/c/shopify-apis-and-sdks/admin-rest-api-getting-a-list-of-usage-charges...