Billing REST API's "Retrieves a list of usage charges" endpoint returns a 401 error when Subscription Charge is canceled

Hello,

When using UsageCharge to retrieves a list of usage charges for a specific recurring charge, it returns a 401 (Authorization error) error when Subscription Charge is canceled after our app got Uninstalled. e.g.

401 Client Error: Unauthorized for url: https://natural-radiant-life.myshopify.com/admin/api/2025-07/recurring_application_charges/27747156208/usage_charges.json

It seems weird to return an authorization error in that case. This new behavior has happened since January 2nd 2026. It was previously responding with a 404 or a 423 HTTP error. Could you have a look? Thanks in advance

Just a heads up that REST is deprecated and you should look to mover over to GraphQL.

Im surprised you were able to retrieve any resources at all with a invalid merchant access token.

Uninstalling an app will automatically invalidate the access token.

I’m not sure why you need to look at usage charges for a merchant that’s terminated their subscription, but another option is to use the Partner API instead.

Each merchant transaction will include the myshopify.com domain and the amount charged. It doesn’t need a merchant specific access token.

Uninstalling an app will automatically invalidate the access token.

Thanks!

  1. About the migration to the GraphQL API, is it possible to create usage charges with the GraphQL API from a subscription charge created with the REST API?
  2. About the Partner API that gives all the merchant’s transactions, could you point me to the exact endpoint?

Thanks in advance

About the migration to the GraphQL API, is it possible to create usage charges with the GraphQL API from a subscription charge created with the REST API?

Yes, the underlying resources are exactly the same. You should be able to interact with any resource, it’s just a different HTTP interface.

About the Partner API that gives all the merchant’s transactions, could you point me to the exact endpoint?

This Partner API query allows you to paginate through transactions, and search by specific merchant, timeframe, etc:

Alright, thanks for being so responsive!

Last but not least, is there a more specific time-window about the effective deprecation of the Billing REST API ?

Shopify will make an announcement far in advance of any other REST endpoints.

But I’d just default to using GraphQL for now, and save yourself the tech debt down the road.

1 Like