#l0rdandbooz_best-practices
1 messages · Page 1 of 1 (latest)
👋 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.
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
ok so setup intent is exclusively for future use? (even if it is the immediate future)
Yeah setupintents never charge
ok so I'd just be better off using my whole flow with payment intents then right?
Well I don't know your usecase, so I can't say. We have SetupIntents because they're necessary in some use cases
haha ok. I think that explains things enough thank you duchess
No problem. If you describe what you're building in detail, I can provide a recommendation if you want
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)
Ah then yeah I think PaymentIntents exclusively make more sense for you
sick thank you!
No problem
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?
Why do you need that?
There is this though: https://docs.stripe.com/payments/accept-a-payment-deferred
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
right I was checking that out but it requires an amount still
function App() {
const options = {
mode: 'payment',
amount: 1099,
currency: 'usd',
// Fully customizable with appearance API.
appearance: {/.../},
};
return (
<Elements stripe={stripePromise} options={options}>
<CheckoutForm />
</Elements>
);
};
oh perfect! Thank you.
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
is it bad practice to defualt it $1
Nah up to you
perfect thank you duchess🫡
No problem