RecurringCharge returns empty list

Solved
Highlighted
Shopify Partner
77 0 18

I'm using the following endpoint:

https://XXX.myshopify.com/admin/recurring_application_charges.json

 

Expected result:

List of recurring application charges

 

Actual result:

Some stores return the correct list of application charges, others return an empty list.

The list should contain one charge, which is listed on the partner portal for that store.

 

Here's the request and response in Fiddler.

The request ID was: X-Request-ID: 854de007-cc24-41e2-9420-9a46ad943ab6

recurring charge issue 2.png

 

The corresponding shop's overview in the partner portal shows a recurring charge is active (see last three lines).

recurring charge issue.png

 

We're seeing this behavior for a number of stores.

What could be causing this?

 

Note: using the same access token we are able to get correct results from other API calls for shops that fail to display the correct list of recurring charges.

Bart Coppens | Limoni Apps | Building apps for Shopify since 2016
0 Likes

Success.

Shopify Staff
Shopify Staff
112 21 23

Hey @DiscountNinja ,

 

If you send a GET request to the admin/api/2019-04/recurring_applicaton_charges.json endpoint, you will only see a result if your app (as identified by the 'X-Shopify-Access-Token' header in your request) has created an actual recurring application charge for that Shopify store - and the result you will see will only be the recurring application charge that your app created. This prevents other App Partners who have recurring application charges set-up with the same Shopify store from seeing each others recurring charges and seeing how much the other apps charge and when. Even if you are the owner of the Shopify store, going to https://your-store-name.myshopify.com/admin/recurring_application_charges.json directly in your browser will still return an empty result unless you use a'X-Shopify-Access-Token' that belongs to an app with a recurring application charge for that store. 

 

With this in mind, looking at the logs for the request-ID of 854de007-cc24-41e2-9420-9a46ad943ab6, I can see that this request was being made from the app with client_id=3162277 (Discount Ninja Sales Channel). However the Shopify store being hit in this request-ID of does not have an active recurring application charge set-up with the app with client_id=3162277, but it does indeed have an active recurring application charge set-up with the app with client_id=1644751 (Discount Ninja). Therefore, in order to see the correct application charge you are looking for with this Shopify store, send a GET request to this store's admin/recurring_application_charges.json endpoint using a 'X-Shopify-Access-Token' that belongs to the Discount Ninja app with client_id=1644751 (and not the Sales Channel)

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Shopify Partner
77 0 18

@hassain Thanks for taking the time to analyze this. My mistake indeed!

Bart Coppens | Limoni Apps | Building apps for Shopify since 2016
0 Likes