Hi,
Can a GraphQL query be used to get a list of a store’s payment methods used at checkout?
I see many payment customization apps list down payment methods, do they get that through Graphql?
Thanks!
Hi,
Can a GraphQL query be used to get a list of a store’s payment methods used at checkout?
I see many payment customization apps list down payment methods, do they get that through Graphql?
Thanks!
I dont think Shopify GraphQl support that directly.
Yeah, I tried digging into docs but looks like it does not but want to check if my eyes missed something.
an alternative way I found that is partially helpful
{
translatableResources(first: 10, resourceType: PAYMENT_GATEWAY) {
nodes {
translatableContent {
key
value
}
}
}
}
Another option could be to use the tenderTransactions query as this has a connected field for paymentMethod
. So you could get a selection of orders and read the payment gateway used to infer what gateways are active. However it may not be 100% accurate if a specific method is not used in the selection you pick.
Hi Liam,
Is there any other way that’s foolproof? or a premade list is the only option?
Even if you could fetch all transactions completed in a store, you could still not get all its active payment methods, if for example one payment method has never been used, or the store doesn’t have orders yet.
A lot of delivery or payment customization apps have to rely on the store’s available options for payment during Checkout. Looking for these options through the translatable content is simple enough, but leaves a lot to be desired for sure.