#Sharvari96

1 messages · Page 1 of 1 (latest)

quiet ferryBOT
native star
#

You can List Checkout Session filtering by the payment intent id

topaz laurel
#

can the same payment intent have multiple sessions?

#

I am using this -
stripe.checkout.Session.create() to give out a line so that our application users can make a payment

native star
#

One PaymentIntent can only belongs to one Session

topaz laurel
#

Ok

#

Can you help me understand the flow when card payments fail -

https://stripe.com/docs/testing#declined-payments

Use test cards to validate your Stripe integration without moving real money. Test a variety of international scenarios, including successful and declined payments, card errors, disputes, and bank authentication. You can also test non-card payment methods.

#

what happens from a user perspective if they were not able to fullfill the card payment from a checkout session?

native star
#

The Checkout Session will display some red error says your card is declined. You can test it using the test-decline card on any of Checkout Session in test mode

topaz laurel
#

I did that

#

my question is - will they be redirected somewhere? - after multiple attempts

#

or will the session just expire on its own, server can listen to the corresponding event?

#

also - I am able to reload the checkout link - should that be allowed? I thought most payment links do not allow reload - will the session id be the same even upon reload? - and what about payment Intent ID - will that be same or will a fresh intent be created

native star
#

No redirection after declines. The session will just be there and expired after 1 day

#

Not sure what you mean by reload

#

browser reload?

topaz laurel
#

yes

native star
#

You can test it, right? a PaymentLink will regenerate a different CheckoutSession each time

#

PaymentLink is a global link you can give to multiple customers. Each of them will have a different Checkotu Session and PaymentIntent

topaz laurel
#

oh

#

I am using - stripe.checkout.Session.create()

#

not the PaymentLink API

#

shoudl I be using the PaymentLink API instead? now I am confused

#

this is for one time purchases not subscriptions

#

also I am not getting events upon browser reload of the checkout page

#

Also - can we set a custom expire time ?

native star
#

Sorry I thought you used Payment Link as you mentioned in your previous message

#

Checkout Session will create the Session immediately, then no it won't generate new id

topaz laurel
native star
topaz laurel
#

sorry that tagged you, i waited for 30mins, didnt want the thread to get closed

#

ok thank you!

native star
#

np, sorry

topaz laurel
#
  • so the min time we can set is 30min
#

but I think we might need a much less time than that...

#

is that possible?

native star
#

Sorry no AFAIK. You can try but it would probably error on parameter value

topaz laurel
#

yes it did that

#

can you see the text below something went wrong - I hope this will not be shown in live mode?

I am expiring the checkout session when card gets declined. - I need the customer to try to pay again, in that scenario.

native star
#

It will behave the same in Live mode. After you expires it it will always displays like this

#

How about ... just don't expire them. Let them try again in the same page

#

I don't really grasp the reason you would like to expire the Session.

#

Leave it as it is and the customer can simply input another card

topaz laurel
#

cause I dont want the client side waiting on this for 30mins...

#

but okay, thanks for confirmation