Hey everyone ![]()
I’m running into a strange issue with the Shopify Admin GraphQL API.
This query returns an empty paymentMethods array for a specific customer:
query {
customer(id: "gid://shopify/Customer/[REDACTED]") {
id
paymentMethods(first: 50) {
nodes {
id
}
}
}
}
The response looks like this:
{
"id": "gid://shopify/Customer/[REDACTED]",
"paymentMethods": [],
}
However, this customer has already placed an order, and I can clearly see a saved payment method associated with that order in the Shopify admin UI.
The same query works fine for other customers - their payment methods are returned correctly.
Only this particular customer’s paymentMethods array is empty.
I’ve reviewed the docs here: Customer - GraphQL Admin
So far, I haven’t found anything suggesting why this might happen.
Has anyone experienced something similar?
Is there any condition under which a customer’s payment method wouldn’t appear in the API response (e.g. order type, payment gateway)?
Thanks in advance for any insights! ![]()