#rnld_best-practices

1 messages ¡ Page 1 of 1 (latest)

solemn notchBOT
#

👋 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. Thank you for your patience!

⏱️ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.

🔗 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/1214728778379567104

📝 Have more to share? You can add more detail below, including code, screenshots, videos, etc.

cursive valley
#

As a follow up, are there any arguments on why this may be a bad idea to remove expired cards upon subscription cancellation?

tame mossBOT
prisma grail
#

You can look at the invoice.payment_failed event. You can then make a call to retrieve the Invoice and expand its PaymentIntent and the PaymentIntent's latest_charge in order to look at the failure_code

cursive valley
#

since i have to make a new call to stripe anyway, would it be more efficient to just query attached cards and determine if it is expired, and if so, remove the expired card?