#theswerd - client secret

1 messages · Page 1 of 1 (latest)

topaz dagger
#

No, the payment intent or setup intent needs to be created on the server then the client secret sent to the client from there.

grand geode
#

is there docs for doing checkout without a preset price

topaz dagger
#

What do you mean?

grand geode
#

in my app ticket purchasing is done on the same page as ticket selection, so we can't pre-create the payment intent with amount atleast

#

can i create a payment intent without an amount, get the info, and then charge it after

topaz dagger
#

You can update the payment intent when you know the total to charge

#

or you can collect payment detaisl with a setup intent but this is not an authorization and payment might fail later (eg, insufficient funds).

#

I'd suggest getting the amount set on the payment intent once you know it and then confirming

grand geode
#

do setup intents come with client secrets?

topaz dagger
#

Yes they do!

grand geode
#

can you use the same setup intent twice?

topaz dagger
#

Not once it has completed, no. You'd need to create another one for collecting another set of payment details

grand geode
#

kk

#

thank you