when I am creating a usage charge via the Admin REST API, I get a successful result (201 Created) and it returns the created object. The property "balance_used" stays "0.0" (see screenshot). I expect that "balance_used" is will be increased by the "price". But it is not.
Date: Mon, 11 Jul 2022 12:25:08 GMT
When I try to get a list of all usage charges, I always get an empty array instead of a filled array that includes the new created object.
In this test cases I used API version 2022-07, but I have the same issue with 2022-04.
I am testing the REST endpoints on a development shop. I used a working and approved plan in my test cases. The same test cases worked a week ago (04.07.22) as expected. I also tried using the GraphQL API with the same negative test results.
Date: Mon, 11 Jul 2022 12:28:35 GMT
Has anyone an idea how to solve this issue?
With kind regards
Solved! Go to the solution
I just checked the changelog, at it seems our issues more or less match with this new change:
Since there was something changed on this endpoint, I assume this is connected to the issue.
Having the same issue with UsageCharge: balance_used is always 0, UsageCharge list is always empty. Any changes / solutions so far?
Unfortunately not yet. I checked our logs and just confirmed that this worked at some point before shopify applied their changes. since then we see this issue.
Is it possible to use GraphQL instead?
Can't figure out if this doc is suitable for that: https://shopify.dev/api/admin-graphql/2022-07/mutations/appUsageRecordCreate
Have no idea what does this param means and where to get it: subscriptionLineItemId
@Jason hi, could you please help with the problem or at least clarify if Shopify really has the issue after the latest updates? Thanks in advance
I received an answer from the technical support. They confirmed that this is an issue with the Shopify API. They recorded this issue and created an internal ticket. So I guess we need to wait for the bugfix.
In addition the support told me, that this behavior should NOT appear at "real" shops. They recommended me to test the endpoints on a "real" shop. I will let you guys know as soon as i have tested it.
Unfortunately I am not able to test in on a live shop. When we use a not-listed app, the Billing API is not available and other wise the app needs to be in the app store (fully released) to install it on a real shop. Maybe someone else can test it with his released app on a live shop.
Running into the same issue on Rest using a 'real' shop. We're not developers creating our own app though, we're simply trying to pull a list of usage charges for apps we have already configured (plus other regular recurring charges). Have had the same issue on the RecurringApplicationCharge and ApplicationCharge endpoint(s).