Having an issue in Usage Charge API?

Shopify Partner
17 0 2

Our application was working fine last 2 years but now suddenly having an issue regarding Shopify Usage charge API. As we are using functionality in our app that costs 3 cents on every user request. When a customer uses that functionality, we create usage charge associated with recurring application charge by sending a POST request to UsageCharge API as following: 

POST /admin/recurring_application_charges/#{recurring_application_charge_id}/usage_charges.json

 But in the response, Shopify doesn't send the latest calculations for after deducting 3 cents of the request. It always sends the same response in each POST request after creating the usage charge.

API response: {"id":11112222,"description":"3 cents per calculation","price":"0.03","created_at":"2019-04-17T04:29:35-04:00","billing_on":"2019-04-25","balance_used":0,"balance_remaining":60,"risk_level":0.0095}

It should return the response with the used and remaining balance. But partner dashboard clearly shows that the amount is being deducted for each request. 

Please advise, What is going wrong? Is Shopify API unstable nowadays? 

Replies 2 (2)
Shopify Partner
1 0 0

Hi, did you ever find out what the problem was? We recently found a very similar issue affecting one of our client stores, creating Usage Charges would add them to the merchant's account (sometimes duplicated, but that's probably a separate issue), yet `balance_used` and `balance_remaining` were always reported at their initial values.

Shopify Expert
76 0 45

I am actually now experiencing the exact same issue. Any resolution/thoughts here?