Delay retrieving saved customer cards

I’m seeing some delays with customers being able to use a card they have just saved. The workflow in our app is:

  1. Customer adds items to their cart on our end
  2. Customer is prompted to create an account to check out (if they haven’t registered before.)
  3. Customer registers and saves a card using the Square card form.
  4. Checkout is completed using the card they have saved.

Most of the time this seems to work, but on a few occasions I’m seeing “NOT_FOUND: Card on file not found” errors when trying to check out with a card that was recently saved.

The latest error has this timeline (PDT timezone):
10:45am: user registers on our app
1:51pm: they try to place an order
3:47pm: user info was updated on Square.

The order they tried to place was unsuccessful due to the “card not found” error. Looking at their info from the customers API, they have 2 of the same card saved, which confirms what they saved on our end. It looks to me like there was a 2 hour delay actually saving the cards to their Square account though?

Customer ID is AMJGCMYEPH1J91TTDN5PN0BYH4 if that helps.

This is one example, but we’re seeing these sporadically every day or so. Should we expect a delay between a customer saving the card and actually being able to use it?

Could you provide any other customer_ids this is happening with? There definitely shouldn’t be a 2 hour delay between being able to use it. I do not see any “card not found” errors with the customer id provided. Is this with the CreatePayment request?

If any more pop up I’ll add the ID’s here. Thanks for looking into this.

And yes, it was the CreatePayment request that threw the error.

The order ID was GrNwATZczanYpfvPJuuIeBNtib6YY for this instance.

Thanks, I found that order and payment, but it’s for a different customer (WQ9RGAG9SCVZ93V1FGSH52V294). I can confirm that the card id passed does not match the card id that is on file for this customer, though.

Hmm…that’s odd. Fetching the user from Customers API:
https://connect.squareup.com/v2/customers/WQ9RGAG9SCVZ93V1FGSH52V294/

Returns user with ID AMJGCMYEPH1J91TTDN5PN0BYH4.

Ahhh probably a merged customer then. That’s probably their old id :slightly_smiling_face:. Regardless in the request I found, it was passing the wrong card_id though which is where the error is coming from.

I can’t tell which card ID was used for the payment request from my end, but the only 2 cards I have on record for this customer match the two in the customer returned from the API:

ccof:M68JDfWrC2JLZBuh3GB
ccof:GLMgdVAeewK1tLMu3GB

Would using the old customer ID cause the error?

Talking to the payments team about this to make sure I don’t miss anything, but from what I see so far:

WQ9RGAG9SCVZ93V1FGSH52V294 owns ccof:GLMgdVAeewK1tLMu3GB
6FS7196TMMX1X8QPYA4JMP17PR owns ccof:M68JDfWrC2JLZBuh3GB
and it looks like the two of these were merged to make AMJGCMYEPH1J91TTDN5PN0BYH4.

However in the CreatePayment request, at least in the logs we received, WQ9RGAG9SCVZ93V1FGSH52V294 and ccof:M68JDfWrC2JLZBuh3GB were passed (and not AMJGCMYEPH1J91TTDN5PN0BYH4) which do not belong together. So if WQ9RGAG9SCVZ93V1FGSH52V294 (the old id) is used, then yes it would return this error.

Ah, ok. So we were sending old ID #1 with old ID #2’s card. I didn’t see any webhooks for customers api - is there any way for us to be notified if they have been merged aside from seeing an error when they try to pay? If that happens after someone creates an account through our app, we wouldn’t be aware of it, and would have the old customer ID, which seems to be what happened here.

Hi @shannonf. I’m the Product Manager for Customers API. We don’t have Webhooks publicly available quite yet for providing notifications for customer-related changes (including merges), but this is something we’re actively working on. I will DM you!