A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi,
Im currently trying to create a feature on a shopify store where signed up customers can view their default payment method, i'm have been trying to do this via querying paymentMethods on the customer object via the admin API but keep getting an error that I do not have the correct permissions. The app I am using is a custom app installed via shopify admin, is there anyway to grant a custom app 'read_customer_payment_methods' permission or do i need to install an app via the partner dashboard?
Any advice appreciated!
Thanks
You cannot grant yourself read_customer_payment_methods in the Admin of a private App. So you probably want to instead change to installing your App code, and ask for that permission from the merchant, using the oAuth install method.
The docs clearly say that we have to request access via partners dashboard. i think its included within Subscriptions API.
https://shopify.dev/api/usage/access-scopes
And here is a thread to reply from shopify support: https://community.shopify.com/c/shopify-apis-and-sdks/subscriptions-with-a-private-app/m-p/1317168/h...
The interesting thing about that, is that there is no such thing as that scope, as an easily understood request from the App's partner dashboard. Tacking it on the Subscription API access, means asking for access to that API, which, frankly, does not seem right. If I just wanted to see what payment methods were in play as a list, why would that entail me also having the full gamut of subscriptions?
I love the fact Shopify is trying to be granular, but there are also so many of these little hidden gotchas spread throught the system, it would be nice if they published a proper tree with branches and nodes, that exposed the way one would go about getting permission scopes correct.
The text listing they provide (docs) and the way the Partner App setups work (or Admin for that matter), is highly inefficient and prone to error. Too bad as now is the time to ensure these kinds of things be more clear, actionable with ease, by developers.
Agree! And i dont understand why we need to request those from shopify support for development ? I just want to test to scope the work, dont want to push it live. And it is a custom app not public.