#nachofranco14
1 messages · Page 1 of 1 (latest)
Hello! Error seems pretty descriptive to me. pm_1O0fHtBEDYDqpisuSOV4GlAu is already attach to a different Customer: cus_KKVhfEF52rOOPG
It can't be attached to multiple
Doesn't matter I'm afraid. They can only be attached to a single Customer object
if I cannot attach the same payment method to two customers why did Stripe allowed me to create the same customer twice? (with same name and email)
cus_OfkByI7ejoOOh9 and cus_KKVhfEF52rOOPG
actually, this used to throw an error
Because we don't check for email/name uniqueness
If that is important to you, then you'll need to implement that check in your code
Which problem is that?
I have to attach the same payment method to the same person
which in this case is two different customers in Stripe
You would need to create a new Payment Method (pm_xxx) with the same card details
You shouldn't be calling that /attach endpoint really anyway. You should be using a Setup Intent: https://stripe.com/docs/payments/save-and-reuse
That works for non-card PMs too
Payment Element supports SEPA
But either way you need a new pm_xxx object
that's okay, what's is rather strange is that this didn't happen before
see these two customers: cus_Jww1LxUrPojhGC and cus_OnyvPYQqO8xOO0
What about them?
or these two: cus_LQY99ntRrnmaB0, cus_MWT7Ba3FCaRvhY
they are the same person, two customer objects and exactly identical IBAN
Yeah, to be clear that is fine. You can have 2 customers that have unique pm_xxx object that are the same underlying IBAN
ahhhhh
That's not an issue. The issue is that the pm_xxx needs to be unique
I understand what happened now
A single pm_xxx can only belong to one cus_xxx
we're using the key meant to avoid repeating exactly identical requests
so, the person that updated the payment method did both updates within the same time range, let's say with 10mins diff
so the idempotency key was the same because tthe ddata used was the same
and hence the payment_method_id was the same, as the idempotency key was the same
do you happen to know how long those idempotency keys leave?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok. thanks