#pawan_code

1 messages ¡ Page 1 of 1 (latest)

blissful blazeBOT
#

👋 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.

static widget
#

Hello again, can you explain fully the issue youre having here?

onyx mango
#

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

static widget
#

ie, what are you trying to do, what are you expecting to happen, and what actually happens

onyx mango
#

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

static widget
#

How are you initializing elements? What options are you passing?

onyx mango
static widget
#

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 set setup_future_usage for other PM types, only for cards as off session?

onyx mango
#

Yes you are correct

static widget
#

setupFutureUsage: 'off_session'

#

but you dont want it for everything

blissful blazeBOT
static widget
#

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