#Jkas

1 messages ยท Page 1 of 1 (latest)

craggy moatBOT
stuck shoal
#

Pasting the customer ID here: cus_GcI1W2foIqlXD7

viscid venture
#

Thank you!

#
#

I have to step away for a meeting, but I will respond with anything else you need when I return! Thank you.

stuck shoal
#

๐Ÿ‘i'll respond here as soon as I untangle what's going on here

viscid venture
#

๐Ÿ™‚

stuck shoal
#

Just a quick update from me - those sources are prety old (more than a couple years old) so I'm having some trouble really tracking down the full timeline of what's happening here

viscid venture
#

That's correct. These are monthly automatic updates to old payment sources from Stripe.

stuck shoal
#

As far as I can tell, these were two separate sources that were created with different API requests and were both attached to that customer. These aren't duplicate automatic updates, it just looks like duplicates because the same card was added to the customer twice

viscid venture
#

These are the first 4 events, they all look automatic to me. Not API request-initiated.

stuck shoal
#

Yeah they aren't realted to a specific request - the same card was added to the customer twice so you're getting four events:

  • 2 customer.source.updated events (one for each card)
  • 2 paymetn_method.card_automatically_updated events (one for each card)
#

You get both customer.source.updated AND payment_method.card_automatically_updated because card sources can also be used as payment methods

viscid venture
#

That's correct. But they look to be for the same underlying card, not two different cards.

stuck shoal
#

Yeah that's because what I mentioned before - it looks like a long time ago (like 2020) the same card was added to this customer twice

#

We (stripe) don't do any automatic deduplication

viscid venture
#

I'm only seeing 1 card associated with the Customer, if you go to Stripe customer details.

stuck shoal
#

So it's possible to add the same card to a customer more than once

viscid venture
stuck shoal
#

Yeah one of the cards was recently deleted (a few seconds after all those events)

viscid venture
#

So this customer truly only has one default payment source now?

#

Or, one payment source in general.

stuck shoal
#

Yes, right now it should truly only have one source

viscid venture
#

Is there a way to search or locate any customers with duplicate underlying payment sources to avoid this from happening again?

stuck shoal
viscid venture
#

Aha, so the fingerprint is a secondary id for the underlying card details?

#

I'm wondering if we can put a check in our code when handling these customer.source.updated events to confirm the underlying details are the same, so we can make that a no-op.

stuck shoal
#

I wouldnt really call it a secondary ID - but yes, if your code is sensitive to duplicate card sources then you can add something in your webhook handler to check the fingerprint and make sure it's unique

craggy moatBOT
viscid venture
#

Hmm ok. Why does Stripe allow non-unique fingerprints on multiple customer.sources?

tidal topaz
#

Because we don't de-duplicate those automatically for you, you need to determine appropriate flows for your app/business