#geekcorner_best-practices

1 messages ยท Page 1 of 1 (latest)

sudden quarryBOT
eager canyonBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

sudden quarryBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

deft sorrel
#

Hi, let me help you with this.

#

Could you please summarise the context for me?

spring wedge
deft sorrel
#

Yes, SetupIntent is perfect for that.

spring wedge
#

Alright! Time to read some docs, thanks!

#

Also if I'm using the billing portal, how would I make sure the user has at least 1 card saved to prevent them from deleting the card and reusing it on an alt account?

deft sorrel
spring wedge
#

That doesn't really answers the question ๐Ÿ˜…

deft sorrel
spring wedge
#

I mean, I don't mind if the user wants to use a new card instead of an old one, I'd just like to make sure the users have at least 1 card on their account.

#

I don't know if you see what I mean.

deft sorrel
#

Yeah, there's no way to create such a rule for Customer Portal, unfortunately.

spring wedge
#

Is there some kind of workaround maybe?

deft sorrel
#

Only with your own UI.

spring wedge
#

Like suspend the account until they add back a payment method?

#

Is payment_method.detached the webhook event I'm looking for?

deft sorrel
#

Yes, if you're fine with Customers being left without a PM.

spring wedge
#

PM?

#

Oh payment method?

deft sorrel
#

Yes, PaymentMethod, sorry.

spring wedge
#

It's fine it's fine.

sudden quarryBOT
spring wedge
deft sorrel
#

it would suspend
Just to clarify, this wouldn't happen automatically.

hasty bolt
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

spring wedge
spring wedge
#

Okay, (hopefully) last question.

hasty bolt
#

how may I help

spring wedge
#

Should I store the fingerprint on my own database with the id too? Or how would you recommend me to check the fingerprint against the known ones?

#

I looked through the docs and figured out I can't just use a "search" endpoint like I'd do with customers (for example, as I actually save the customer id in my db instead)

hasty bolt
spring wedge
#

That doesn't answers my question though.

hasty bolt
#

I mean each time you want to add a new payment method you can check if there's actually a PM attached to this customer with the same fingerprint before attaching the PM to the customer

spring wedge
#

That's not what I'm looking for.

#

I meant across all customers.

hasty bolt
#

you can keep a list in your db if you want

#

in that case

spring wedge
#

Thanks.