#Rohit-Session

1 messages · Page 1 of 1 (latest)

gleaming patrol
#

Hi there, what session are you referring to?

neat needle
#

I don't want to allow users to do payments after a certain period of time ( say for 5 mins ). In this scenario, I want to destroy the existing payment Intent object and want to create a new Payment Intent object.

gleaming patrol
neat needle
#

Do you suggest me to create a new payment intent if the user changes the products details or amount before payment?
How we can handle this kind of scenario?

gleaming patrol
#

Sorry I'm not following, I thought we're discussing session expiration?

#

Hi my shrift is over, my colleague will join and take over this thread son.

candid vector
#

if they change the amount then you need a new CheckoutSession yep!

neat needle
#

I have the below scenario:-
If the user clicks on the checkout page then we are creating a payment intent but before payment,if the user changes the product then it is a good idea to create a new payment intent or update the existing one ?

candid vector
#

are you actually using PaymentIntents(directly via the /v1/payment_intents API), or Checkout? They're different things.

neat needle
#

Yes we are using /v1/payment_intents API

candid vector
#

cool! and what do you use on the frontend?

neat needle
#

Yes we are using PaymentElement in frontend

candid vector
#

ok! then you can not really do that use case, since the PaymentElement doesn't work for it.

#

you can change the existing PaymentIntent on the backend but it doesn't update the PaymentElement's details. You also can't change the PaymentIntent the PaymentElement. So instead you really need to reload the overall checkout page and re-create the PaymentElement with a new PaymentIntent.

neat needle
#

My current location is India and I want to create US based stripe account for testing purpose. How can I do it ?

candid vector
#

go to your dashboard https://dashboard.stripe.com and click the dropdown in the top left(where the name of your account is). There's an option to create a new account and you can pick its country.