#huy_best-practices

1 messages ยท Page 1 of 1 (latest)

arctic berryBOT
#

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

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

boreal comet
#

๐Ÿ‘‹ give me a moment to run a test

stuck gyro
#

here's the screenshot for reference, thanks!

boreal comet
#

It is expected that SetupIntent does not set an amount

stuck gyro
boreal comet
#

I don't think that's possible. We don't have a way to check if a card has sufficient funds / or its credit limits before an actual charge, since we require the card issuer (customer's bank) to actually return this error code to us.

#

the purpose of Setup Intent is to tell Stripe you intent to charge this payment method in the future, it does not check if a card has enough credit

stuck gyro
#

okay, is there any better way to handle that error? I am currently doing it like this: confirmSetup -> create subscription -> payment fails due to insufficient funds -> show the user the "open" invoice and let them pay again

boreal comet
#

Yes if the payment fails, then you would need to collect a new payment method. Redirecting the customer back to the invoice for payment is the right way to handle this error

stuck gyro
#

okay thanks!

boreal comet