Payment method visible in UI but not via graphql API

Has anyone ever come across a customer that has a payment method visible in the admin UI yet when you query the customer object via graphql the payment methods returned is empty?

(Same query different customer works perfectly fine)

If the card is revoked, why does it not have the revoked badge in the UI? Do Shop Pay cards not have the revoked badge?

In conjunction to this the customer had a billing attempt with the following error that I have not seen before “Unable to generate vaulted remote token payment method” (why would such an error trigger on the billing attempt). Every subscription billing attempt after that we see “Payment method revoked” for this customer.

So again, if the payment method is revoked why is it still in the UI without the revoked badge and how can we explain this to the client and their customer that they have to potentially update their card AGAIN. If the revoked badge was present that would at least make sense to the client, but we have nothing to back up our claim if the UI doesn’t show this.

query used, api version 2025-01

{
    customer(id:"gid://shopify/Customer/1234567") {
        id
        paymentMethods (first: 20) {
            nodes {
                id
            }
        }
    }
}

Thanks all

1 Like

Hey @the_one, can you share an example of the response you received that is different than you see in the admin (redact all customer details though please). Just so I have more of a visual of the discrepancy you are seeing.

Here’s what the graphql response looks like

{
    "data": {
        "customer": {
            "id": "gid://shopify/Customer/1234567",
            "paymentMethods": {
                "nodes": []
            }
        }
    },

Here’s a screenshot of the UI (card details redacted, still no revoked badge)

If the revoked badge was present, I’d say this would be expected behaviour but since it’s absent I’m not sure what could be happening.

Thanks for sharing that. If you add the showRevoked argument to the query does it still return empty? That could help confirm if the payment method is classified as revoked or not.

Regarding the errors when you’re making a billing attempt, has the merchant recently migrated their subscriptions to shopify from a different provider? For example, when migration from Stripe to Shopify Payments it’s often required to keep stripe active until all merchants have migrated their subscription payment methods over. If stripe is disabled before that, then you can start seeing some errors related to the payment method.

Ah bingo, revoked reason is “FAILED_TO_UPDATE_CREDIT_CARD”

hmm strange, I guess the customer will have to update the card. I’ll try find more on this revoked reason. If you have any more information on this particular reason that’d be helpful, but I think I have enough to go on now.

Thanks Kyle