#ajit

1 messages · Page 1 of 1 (latest)

astral forgeBOT
delicate forge
#

Hi there

#

Hmm not sure what you mean exactly here

#

Can you explain further?

#

This sounds like stuff your own code is controlling

#

So it doens't really matter what you do within Stripe with regards to the Checkout Session

sonic wraith
#

i am using stripe checkout

#

after payment sucess , i get stripe session id

#

i retrieve data of the session ID and credit credits to user based on metedata i sent

#

stripe session id expires in 1 min

#

within this 1 min, if i hit my credit addition API multiple times with same session id . It causes bug in my code

#

is there any way , that stripe provide to invalide that session Id

#

I hope , you understood . if not i can provide some code

delicate forge
#

Yeah I don't really understand what you mean by stripe session id expires in 1 min... the Session ID itself doesn't "expire". Like the Checkout Session will expire in a set amount of time if it isn't completed. Or it can't be used again after it is completed. But we don't invalidate the Checkout Session ID itself or anything.

sonic wraith
#

object: 'checkout.session',
expires_at: 1686684086,

#

there is expires_at in json

#

ok . not an issue

delicate forge
#

Yep as noted that is when the Checkout Session itself expires. Like the ability to redirect a customer there

#

Overall I would recommend not using the Checkout Session ID here to add credits and then code defensively on adding multiple times from the same UUID you use.

sonic wraith
#

ok . i understood . i will change code accordingly