#pawan_code
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/1293206715986214943
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- pawan_code, 4 days ago, 30 messages
- pawan_code, 4 days ago, 21 messages
- pawan_docs, 5 days ago, 7 messages
- pawan_code, 5 days ago, 52 messages
Hello again, can you explain fully the issue youre having here?
Hi Synthrider
I am Having 2 step checkout for my react site & i am using stripe payment Element for my chekcout
So once i am landing to the payment form i am Creating Payment intent
[reference Image : paymentIntentCreation]
aftet that once user filled the Credit card form i am creating confirmation token & after that i am confirming the payment Intent and passing the confirmation token.
so My Steup_future_usage is on Session i want it to be off session for card only for other like amazon pay it should normal
ie, what are you trying to do, what are you expecting to happen, and what actually happens
I want if its card it should be
"setup_future_usage": "off_session",
confirmation token id : ctoken_1Q7co0HBIoGyEgRJz1ggDFTP
in this above token if you see **"setup_future_usage": "on_session" **is there
because of that Saved Card is not Persisting
Hi Synthrider could you please guide once
How are you initializing elements? What options are you passing?
so My Steup_future_usage is on Session i want it to be off session for card only for other like amazon pay it should normal
Are you saying you don't want to setsetup_future_usagefor other PM types, only for cards as off session?
Yes you are correct
So to set it for everything you need to include that option: https://docs.stripe.com/js/elements_object/create_without_intent#stripe_elements_no_intent-options-setupFutureUsage
setupFutureUsage: 'off_session'
but you dont want it for everything
Just a minute, testing something for you
Ok, confirmed this flow. So to allow PM types that don't support setup_future_usage you currently want to not set that top level option for elements.
Presently, elements doesn't support passing setupFutureUsage just for cards via paymentMethodOptions: https://docs.stripe.com/js/elements_object/create_without_intent#stripe_elements_no_intent-options-paymentMethodOptions-card
but when you pass the ConfirmationToken to your server to confirm, you can set that for cards only on the payment intent:
payment_method_options.card.setup_future_usage=off_session
https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_options-card-setup_future_usage
if this triggers 3ds authentication, you detect that with the response being status=requires_action and send the client_secret back to your client app to use with handleNextAction like we show here:
https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=web&type=payment#next-actions