#ebellotpu6_code
1 messages ¡ Page 1 of 1 (latest)
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.
- ebellotpu6_code, 4 days ago, 17 messages
- ebellotpu6_code, 5 days ago, 8 messages
đ 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/1242777992665763901
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi! we only speak English here on Discord. if you need support in another language, try https://support.stripe.com/?contact=true
sorry
Can I create like this, and then when the user fill the payment method and I call my API to get the clientSecret, add it to the elementOptions without loosing the payment method?
this.stripe = await loadStripe(this.stripePublishableKey);
this.elementsOptions = {
mode: "setup",
paymentMethodTypes: ["card"],
// Fully customizable with appearance API.
appearance: appearance,
};
// Set up Stripe.js and Elements to use in checkout form, passing the client secret
this.elements = this.stripe.elements(this.elementsOptions);
I'm sorry I don't understand. can you clarify what you are trying to do and what's the issue exactly?
I am trying to create a web page where user have to fill it's personal data and a paymentElement of mode 'setup', for future payments. The problem is that I don't have the clientSecret until both forms are filled, because I need first to create the customer on stripe and then return it's clientSecret to attach it on the paymentElementOptions.
if you want to use the Payment Element but create the SetupIntent later, then use the deferred flow: https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web
but this is creating a paymentintent instead of a setupintent no?
woops, wrong link: https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=setup
I don't think I understand correctly, do I have to create the setupintent on the server? But then how do I assign the payment method entered by the user?
- first you mount the Payment Element
- then when the user submits the form, then you create the SetupIntent and confirm it
then when the user submits the form, then you create the SetupIntent and confirm it - on the server right?