#nitarose_best-practices
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/1225807491724738620
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Yeah the hosted invoice page doesn't support showing previously saved payment methods
Thank you for confirming my hunch. Could there be another reason we are seeing duplicate payment methods? Is this a common isue?
If you share the payment method id's I can confirm for you
Just would need to examine their creation requests
pi_3NlaljJ9EVKHmQsl0qa96Foj
The other method does not have a pi_ number. It does have a src however
src_1N9ZRUJ9EVKHmQslLoadVpv8
oh is pi a payment intent?
yeah
Thanks for your help.
I can still help if you provide the duplicate payment method id's
I can check how they were created
Let me see if I can find some more.
It looks like the customers with duplicate methods are actually payment intents.
I found another with multiple and all the ids start with pi-_
Hi there ๐
Jumping in as my teammate needed to step away. Payment Intents are a different type of object from Payment Methods.
If a customer pays an invoice via the hosted invoice, is that saved as a Payment Intent or a method?
Is what saved? A Payment Intent will be used to process the payment for the Invoice, that is standard behavior for Invoice objects.
The hosted invoice says it saves that payment for future use as well. Does that get a pi number or a pm number?
I'm guessing you're referring to it saving a Payment Method, but I'm not exactly sure. If so, that object's ID would have a pm_ prefix.
We have some customers racking up a lot of duplicate payment methods/intents. Is there a recommended way of dealing with that? One customer has 5 saved cards that are the same.
You can delete the extras when you detect duplicates.
You can listen for payment_method.attached Events, and use those to trigger a check looking for any existing Payment Methods with the same type and fingerprint. If you detect duplicate fingerprints, you can delete the duplicate Payment Methods with those.
Does that event get triggered if it is a payment intent? Or is that a different event?
It gets triggered when a Payment Method is attached to a Customer, which may or may not be part of an intent's lifecycle.