#ilamathi-duplicated-payment-method
1 messages ยท Page 1 of 1 (latest)
๐ Happy to help
You can use update payment method API to update the expiry of an existing card: https://stripe.com/docs/api/payment_methods/update
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Other than card expiry, is there any possible chance to get card with same card number and different cvv/expiry?
If you update an existing payment method instead of creating a new one and attaching it to a customer, then there won't be any duplicate
In this case, you can do:
- Create a payment method
- Check fingerprint
- If same fingerprint, update existing payment method on the customer (if expiry is different)
- If different fingerprint, attach newly created payment method to the customer
But suppose user try to give same card. expiry & cvv in that case step-3 not needed right
mean un necessarily we are updating the payment method..
here no need to update payment method at all
May be we can add additional check like exp_year & exp_month in addition to the fingerprint? Is that make sense?
When you create a payment method in Step 1, it introduces a new payment method that has no relationship with any existing one. So you still need to Step 3 to copy the new expiry over.
Nevertheless, Stripe works with card network to update the card details like card expiry: https://stripe.com/docs/saving-cards#automatic-card-updates
Ideally, you shouldn't need to check for difference in card expiry
yes i got that point.. for other case like user unknowingly entering the same card details (same card number , expiry & cvv) instead of using the existing saved one.. in that case as per 3 though fingerprint same again we care replacing old with new.. in this case no need this right, if finger print same we can sinply ignore and use the existing one as per video
Yes, you're right
May be we can add additional check like exp_year & exp_month in addition to the fingerprint? Is that make sense?
You can do that, then it will be updating payment method as per Step 3. However, Stripe has automatic card update with network to check for latest card information. Most likely Step 3 will be redundant
But that automatic card update widely adopted only in US right, not in all country?
if this automatic card update work across the country then no need to consider this case at all...
Yup, automatic update is slowly getting adopted across countries. In this case for other countries, manual update might still be required.
ok in that case we need to provide separate option for the user to update existing payment method instead of adding new one
for this kind of card update.. if no automatic update they can use this option by user
Also is there a chance to have 2 cards having same card number and different CVV/Expiry other than card expiry case?
As long as you don't attach any new duplicated payment method to a customer, then there won't be duplicated
I am asking in general not in stripe... Any case card issuer will issue the card with same card number?
is that possible of having 2 card with same card number?
I see. That's not possible. Each card number is expected to have only one card activated.
ok great...
Is it possible to get the list of counties in which stripe support automatic card update?