#nitarose_best-practices

1 messages ยท Page 1 of 1 (latest)

white relicBOT
#

๐Ÿ‘‹ 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.

tall thicketBOT
autumn marsh
#

Yeah the hosted invoice page doesn't support showing previously saved payment methods

trail widget
#

Thank you for confirming my hunch. Could there be another reason we are seeing duplicate payment methods? Is this a common isue?

autumn marsh
#

If you share the payment method id's I can confirm for you

#

Just would need to examine their creation requests

trail widget
#

pi_3NlaljJ9EVKHmQsl0qa96Foj
The other method does not have a pi_ number. It does have a src however
src_1N9ZRUJ9EVKHmQslLoadVpv8

autumn marsh
#

pi isn't a payment method

#

pm_ are payment method

trail widget
#

oh is pi a payment intent?

autumn marsh
#

yeah

trail widget
#

Thanks for your help.

autumn marsh
#

I can still help if you provide the duplicate payment method id's

#

I can check how they were created

trail widget
#

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-_

grave brook
#

Hi there ๐Ÿ‘‹

#

Jumping in as my teammate needed to step away. Payment Intents are a different type of object from Payment Methods.

trail widget
#

If a customer pays an invoice via the hosted invoice, is that saved as a Payment Intent or a method?

grave brook
#

Is what saved? A Payment Intent will be used to process the payment for the Invoice, that is standard behavior for Invoice objects.

trail widget
#

The hosted invoice says it saves that payment for future use as well. Does that get a pi number or a pm number?

grave brook
#

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.

trail widget
#

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.

grave brook
#

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.

trail widget
#

Does that event get triggered if it is a payment intent? Or is that a different event?

grave brook
#

It gets triggered when a Payment Method is attached to a Customer, which may or may not be part of an intent's lifecycle.