#vizio_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1316815403967582208
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
one of the cards has a new payment method id and the old payment method finger print
This is not abnormal. Fingerprints are based on the card number so if two different customers save the same card number, each of their cards will have a different PM ID but the same fingerprint. If one of those customers detaches their PM and re-adds the same card number, the new card will have a new PM ID but the same fingerprint
Let me know if I've misunderstood your question or if you need more help!
ok but what I don't understand is this
we have a customer with an existing card
PM = A
fingerprint= AF
they then go an pay and I assume they are adding a new card (?), anyway a new payment method is created with
payment_method.attached
PM = B
fingerprint = BF
Then we call /v1/payment_methods to get the list of payment methods and at this point our logic decides to detach a card
Based on that detach call we then receive a detach event with
PM = A
fingerprint = BF
and then if we look at the customer cards we can see a card with
PM = B
fingerprint = AF
** PM = payment method ID
the thiings that confuses me is that detach event with the PM of the original card but the fingerprint of the newly attached card
I want to make sure we're talking about the same ID so I won't grab the ID from the previous thread
Can you share an example here? it'll be helpful to share the Customer ID, PM A and PM B
you mean production data right?
Sure, if that's where you're seeing the behavior you described above
Customer ID = cus_Ikpwj55pIfMsT0
PM A = pm_1QRKSlDD3nZJlvMpWGtGD9Qb
PM B = pm_1QSMjrDD3nZJlvMpX02cHN7P
I don't think your summary is accurate in this specific case
ok
PM A and PM B fingerprints were identical in the payment_method.attached events that were sent when each of these PMs were attached to the customer
ok
that makes sense as our dedupe logic triggers only if the fingerprints are identical
but then why does the finger print change?
I don't see the fingerprint changing either. The payment_method.detached event has the same fingerprint: https://dashboard.stripe.com/events/evt_1QSMjxDD3nZJlvMpxXar7om7
ok here is another example as now I have more logs
This is the log from our dedupe logic. We get all payment methods and we remove the ones that have the same finger print, keeping the method with the most recent created date:
12/12/2024, 5:57:46 PM LOG ######
12/12/2024, 5:57:46 PM LOG Current customerId: cus_P4Z6lNMUGo5NF1
12/12/2024, 5:57:46 PM LOG Current accountId: acct_1Gin94DD3nZJlvMp
12/12/2024, 5:57:46 PM LOG Current paymentMethodId: pm_1QVGduDD3nZJlvMp7zLCcpIQ
12/12/2024, 5:57:46 PM LOG Current fingerprint: v5gdHZanzX9BCjAd
12/12/2024, 5:57:46 PM LOG ######
12/12/2024, 5:57:46 PM LOG ######
12/12/2024, 5:57:46 PM LOG Current customerId: cus_P4Z6lNMUGo5NF1
12/12/2024, 5:57:46 PM LOG Current accountId: acct_1Gin94DD3nZJlvMp
12/12/2024, 5:57:46 PM LOG Current paymentMethodId: pm_1QSmiLDD3nZJlvMpTtvP8CTx
12/12/2024, 5:57:46 PM LOG Current fingerprint: EYF6UfWbpB3Kwz1s
12/12/2024, 5:57:46 PM LOG ######
12/12/2024, 5:57:46 PM LOG ######
12/12/2024, 5:57:46 PM LOG Current customerId: cus_P4Z6lNMUGo5NF1
12/12/2024, 5:57:46 PM LOG Current accountId: acct_1Gin94DD3nZJlvMp
12/12/2024, 5:57:46 PM LOG Current paymentMethodId: pm_1PMB6nDD3nZJlvMpRZFwOZFy
12/12/2024, 5:57:46 PM LOG Current fingerprint: v5gdHZanzX9BCjAd
12/12/2024, 5:57:46 PM LOG ######
12/12/2024, 5:57:46 PM LOG ######Detach duplicate card######
12/12/2024, 5:57:46 PM LOG Current customerId: cus_P4Z6lNMUGo5NF1
12/12/2024, 5:57:46 PM LOG Current accountId: acct_1Gin94DD3nZJlvMp
12/12/2024, 5:57:46 PM LOG Current paymentMethodId: pm_1PMB6nDD3nZJlvMpRZFwOZFy
12/12/2024, 5:57:46 PM LOG Current fingerprint: v5gdHZanzX9BCjAd
12/12/2024, 5:57:46 PM LOG ######
if you look at that customer page, there is no card with fingerprint = v5gdHZanzX9BCjAd
the card with PM pm_1QVGduDD3nZJlvMp7zLCcpIQ has now a different finger print lcw0Es0Wup0jirtO
and based on our logs, this fingerprint lcw0Es0Wup0jirtO was already on one of the existing cards before this process started. But this could be just a red herring on our side.
Hm, that's really odd
I think you may need to debug your logging
Ohhh, I think I see what's happening here
Connect is involved, as my teammate mentioned
So fingerprints are unique to a specific account
If Card Number A is added to Account 1 and another customer adds Card Number A to Account 2, the cards will have different fingerprints even though they're the same underlying card number
ok could that happen for the same customer?
same customer did add Card A to account 1 and now they are adding the same Card A to account 2
Hold on a second
I'm trying to make sense of this:
payment_method.detached event: https://dashboard.stripe.com/events/evt_1QVGdyDD3nZJlvMpEmfMuxr8
this mentions fingerprint lcw0Es0Wup0jirtO
However, the request log for the call to detach the PaymentMethod includes a different fingerprint: https://dashboard.stripe.com/logs/req_nBuLXU8RwX0Z4z
yes
Hello
Taking over as my colleague needs to step away soon
I will need to go soon as well
if it helps we are using the node sdk to call the detach and the only thing we pass is the payment method id, no fingerprint
How exactly are you looking at the card fingerprints? Are you looking via dashboard or retrieving them via the API?
My understanding is that the fingerprints are unique to an account. However, if the payment methods are created by a platform - if the platform retrieves the payment method using Stripe-Account header, they should be able to see the same fingerprint across connected accounts.
we are getting them through the node sdk
const stripePaymentMethods = this.stripe.paymentMethods.list(
{
customer: customerId,
type: PaymentMethodTypeEnum.Card,
},
!isObjectEmpty(requestOptions) ? requestOptions : undefined
)
we then log the results out and this is what we get
12/12/2024, 5:57:46 PM LOG ######
12/12/2024, 5:57:46 PM LOG Current customerId: cus_P4Z6lNMUGo5NF1
12/12/2024, 5:57:46 PM LOG Current accountId: acct_1Gin94DD3nZJlvMp
12/12/2024, 5:57:46 PM LOG Current paymentMethodId: pm_1QVGduDD3nZJlvMp7zLCcpIQ
12/12/2024, 5:57:46 PM LOG Current fingerprint: v5gdHZanzX9BCjAd
12/12/2024, 5:57:46 PM LOG ######
12/12/2024, 5:57:46 PM LOG ######
12/12/2024, 5:57:46 PM LOG Current customerId: cus_P4Z6lNMUGo5NF1
12/12/2024, 5:57:46 PM LOG Current accountId: acct_1Gin94DD3nZJlvMp
12/12/2024, 5:57:46 PM LOG Current paymentMethodId: pm_1QSmiLDD3nZJlvMpTtvP8CTx
12/12/2024, 5:57:46 PM LOG Current fingerprint: EYF6UfWbpB3Kwz1s
12/12/2024, 5:57:46 PM LOG ######
12/12/2024, 5:57:46 PM LOG ######
12/12/2024, 5:57:46 PM LOG Current customerId: cus_P4Z6lNMUGo5NF1
12/12/2024, 5:57:46 PM LOG Current accountId: acct_1Gin94DD3nZJlvMp
12/12/2024, 5:57:46 PM LOG Current paymentMethodId: pm_1PMB6nDD3nZJlvMpRZFwOZFy
12/12/2024, 5:57:46 PM LOG Current fingerprint: v5gdHZanzX9BCjAd
12/12/2024, 5:57:46 PM LOG ######
12/12/2024, 5:57:46 PM LOG ######Detach duplicate card######
12/12/2024, 5:57:46 PM LOG Current customerId: cus_P4Z6lNMUGo5NF1
12/12/2024, 5:57:46 PM LOG Current accountId: acct_1Gin94DD3nZJlvMp
12/12/2024, 5:57:46 PM LOG Current paymentMethodId: pm_1PMB6nDD3nZJlvMpRZFwOZFy
12/12/2024, 5:57:46 PM LOG Current fingerprint: v5gdHZanzX9BCjAd
12/12/2024, 5:57:46 PM LOG ######
What API key are you using here? Are you passing Stripe-Account header?
yes we are, we are passing accountId: acct_1Gin94DD3nZJlvMp
const requestOptions = {
...conditionalFields(accountId, () => ({
stripeAccount: accountId,
})),
}
const stripePaymentMethods = this.stripe.paymentMethods.list(
{
customer: customerId,
type: PaymentMethodTypeEnum.Card,
},
!isObjectEmpty(requestOptions) ? requestOptions : undefined
)
we pass it as part of the options
we were wondering if it's because now the webhooks are triggered from the parent account instead of the child account
I think before the 3rd of Dec webhooks were triggered from the child account, and after the 3rd we started getting them from the parent
but I'm not sure if this was a change we made in the code or in the stripe config
Could be. Webhook events also reflect similar variation in terms of fingerprint.
Connect type webhook endpoints receive -> platform's fingerprint
Account type webhook endpoints receive -> connected account's fingerprint
The logs you've shared are a bit confusing to me. It seems like the customer has 3 payment methods attached and one of them is a duplicate of another. So your code tries to detach one of the duplicate ones
like
Card 1 -> pm_1QVGduDD3nZJlvMp7zLCcpIQ -> v5gdHZanzX9BCjAd
Card 2 -> pm_1QSmiLDD3nZJlvMpTtvP8CTx -> EYF6UfWbpB3Kwz1s
Card 3 -> pm_1PMB6nDD3nZJlvMpRZFwOZFy -> v5gdHZanzX9BCjAd
Card 1 == Card 3
So your code tries to detach Card 3
that's what I've understood from your logs
If you try to list the payment methods after detach has happened, what are you seeing then?
I think the issue here is that you're trying to look at it from the dashboard and its showing you account level fingerprint rather than platform level fingerprint
Try using the API
What response do you get?
If you look at this webhook event for example - https://dashboard.stripe.com/events/evt_1QVGdyDD3nZJlvMpEmfMuxr8
The event data shows you what we'd have sent to the account type webhook (so account level fingerprint - lcw0Es0Wup0jirtO )
If you look at the webhook attempts to connected platform section and it's payload - you'd see platform level fingerprint - v5gdHZanzX9BCjAd
I removed the attachment since it contained user data. but you can look at it via dashboard
this is all expected