# Random "Payment on file not found" errors

**URL:** <https://developer.squareup.com/forums/t/random-payment-on-file-not-found-errors/9106>\
**Category:** Questions\
**Tags:** payments-api, cards-api\
**Created:** [April 4, 2023, 7:27pm UTC](https://developer.squareup.com/forums/t/random-payment-on-file-not-found-errors/9106 "2023-04-04T19:27:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![onajartm](https://avatars.discourse-cdn.com/v4/letter/o/ac8455/32.png) [@onajartm](https://developer.squareup.com/forums/u/onajartm)\
**Post date:** [April 4, 2023, 7:27pm UTC](https://developer.squareup.com/forums/t/random-payment-on-file-not-found-errors/9106/1 "2023-04-04T19:27:16Z")

</div>

We have a payment flow that involves saving a card on file via Reader SDK and charging it some time later. Occasionally we see some “Payment on file not found” errors and I’m not sure why.

Upon further inspection in Square API logs, I’m seeing some strange behavior where the card on file is successfully created, but when it comes time to charge the payment on file is not found. The strange thing is that some time later we’re able to successfully call the API to disable the same card on file, so it’s almost as if something goes wrong on Square’s end where the card on file is momentarily not found.

Check out the following events in Square API logs:

**Merchant ID:** MLS7BGJFT27SS

**2023-03-14 13:48:45 GMT-7:** Card on file is successfully created with last 4 digits 7918.

**2023-03-14 13:49:43 GMT-7:** Payment on file not found error, but the source\_id is redacted in my log so I can’t verify if it’s exactly the same above. That being said, it should be - see the next event.

**2023-03-14 14:11:13 GMT-7:** Card on file is successfully disabled with the same ID as created above.

Square API logs don’t provide much info beyond this, so I’m hoping someone at Square can provide some deeper insight.

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [April 4, 2023, 8:44pm UTC](https://developer.squareup.com/forums/t/random-payment-on-file-not-found-errors/9106/2 "2023-04-04T20:44:14Z")

</div>

The `customer_id` in the payment request is `Z4WB4XD3EVHPVHD10PPKF3SQX0` and the `customer_id` for the card is `AG33FZPZFX6PH11YQ67BDZHX64` which is why the card not found error was returned. 🙂

---

<div class="post-metadata">

**Author:** ![onajartm](https://avatars.discourse-cdn.com/v4/letter/o/ac8455/32.png) [@onajartm](https://developer.squareup.com/forums/u/onajartm)\
**Post date:** [April 5, 2023, 12:37am UTC](https://developer.squareup.com/forums/t/random-payment-on-file-not-found-errors/9106/3 "2023-04-05T00:37:31Z")

</div>

That’s what I thought when I was investigating this, but when you actually search up both of those customer IDs, they seem to point to the same customer object in Square? 🤔

In fact if you use the [Retrieve Customer endpoint](https://developer.squareup.com/reference/square/customers-api/retrieve-customer) on both of those IDs, they point to the same object in Square - but this time with a different ID: QWHDMRTN1N4VV2FW4BRSSX1DW4. What’s up with that?

---

<div class="post-metadata">

**Author:** ![onajartm](https://avatars.discourse-cdn.com/v4/letter/o/ac8455/32.png) [@onajartm](https://developer.squareup.com/forums/u/onajartm)\
**Post date:** [April 18, 2023, 11:58pm UTC](https://developer.squareup.com/forums/t/random-payment-on-file-not-found-errors/9106/4 "2023-04-18T23:58:27Z")

</div>

@Bryan-Square - See above. Any update on this?

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [April 19, 2023, 12:43am UTC](https://developer.squareup.com/forums/t/random-payment-on-file-not-found-errors/9106/5 "2023-04-19T00:43:44Z")

</div>

We haven’t been able to find anything that would have caused this. Are you still seeing this happen? Do you have any additional examples we can look into? 🙂

---

<div class="post-metadata">

**Author:** ![onajartm](https://avatars.discourse-cdn.com/v4/letter/o/ac8455/32.png) [@onajartm](https://developer.squareup.com/forums/u/onajartm)\
**Post date:** [April 19, 2023, 1:38am UTC](https://developer.squareup.com/forums/t/random-payment-on-file-not-found-errors/9106/6 "2023-04-19T01:38:02Z")

</div>

Haven’t had another report from the merchant, but let me ask them and follow up with you.

---

<div class="post-metadata">

**Author:** ![fcmarquis](https://avatars.discourse-cdn.com/v4/letter/f/82dd89/32.png) [@fcmarquis](https://developer.squareup.com/forums/u/fcmarquis)\
**Post date:** [June 6, 2025, 1:02pm UTC](https://developer.squareup.com/forums/t/random-payment-on-file-not-found-errors/9106/7 "2025-06-06T13:02:07Z")

</div>

Hi,

It would be awesome if the api would return something like customerId don’t match customer liked to stored card.

Right?
