#l0rdandbooz_best-practices

1 messages · Page 1 of 1 (latest)

native hearthBOT
#

👋 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/1242930792145879276

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

hexed sierra
#

SetupIntents can't charge the payment method immediately that's the difference

#

SetupIntents only set up the payment method

#

PaymentIntents charge the payment method and then, optionally, set them up for future use

sturdy oar
#

ok so setup intent is exclusively for future use? (even if it is the immediate future)

hexed sierra
#

Yeah setupintents never charge

sturdy oar
#

ok so I'd just be better off using my whole flow with payment intents then right?

hexed sierra
#

Well I don't know your usecase, so I can't say. We have SetupIntents because they're necessary in some use cases

sturdy oar
#

haha ok. I think that explains things enough thank you duchess

hexed sierra
#

No problem. If you describe what you're building in detail, I can provide a recommendation if you want

sturdy oar
#

it's a donation widget for non profits but it'll always be immediately charged when the payment method is setup for future use (for a recurring donation or something)

hexed sierra
#

Ah then yeah I think PaymentIntents exclusively make more sense for you

sturdy oar
#

sick thank you!

hexed sierra
#

No problem

sturdy oar
#

is there any way for me to create a payment intent without an amount or a way to display the stripe payment element without an amount or payment intent attached to it?

hexed sierra
#

Why do you need that?

sturdy oar
#

because they'll be entering in a custom donation amount and I'm establishing the stripe session as soon as the form opens so by the time they get to the stripe payment element it's good and ready to go

sturdy oar
sturdy oar
#

oh perfect! Thank you.

hexed sierra
#

So you can default it to $1 or something and have the customer be able to set it

#

Or just don't render the Payment Element until they've selected an amount

sturdy oar
#

is it bad practice to defualt it $1

hexed sierra
#

Nah up to you

sturdy oar
#

perfect thank you duchess🫡

hexed sierra
#

No problem