A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
In order to import sale orders into another system, I need to create payment methods, appropriate journals, etc in the destination so that when I retrieve a sales order, I can set the appropriate payment method for the order. However, I don't seem to be able to find a way to get all available payment methods from the graph api.
Can anyone point me to a query that will give me payment methods?
Hello @Ethnique
To get all available payment methods from the Shopify Graph API, you can use the following request:
https://{SHOPIFY_STORE_URL}/admin/api/2023-04/payment_methods.json
Thanks for responding. The response is;
{"errors":"Not Found"}
Is there a way to get this via the graph API?
Hello Magecomp,
I get the same response.
{"errors":"Not Found"}
Your provided code looks like it is supposed to be used via REST-API, not graphQL. Is there a way to get this via the graph API?
Yes i'm also getting same issue
There is no graph API or REST-API provided to get list of enabled payment method names
Hey @Paddy3000 and @bavashiek ,
This is a great question. Currently there isn't a way to query the Payment gateway settings to see which payment methods the merchant has enabled.
One workaround would be to query a subset of orders transactions to see which ones are most common or have been used recently, and then maybe use webhooks to detect when a new one is used so you can take necessary action.
One thing to keep in mind as well is some of the processing fields have been deprecated, so to get the specific information you need, it can be inferred from other resources. This changelog post has a great explanation of what's been removed and what you can use instead: https://shopify.dev/changelog/payment-properties-deprecation-on-the-admin-api-order-resource
Hope that helps,
Kyle G.
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog