#fladson_docs
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/1399730265630445610
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
I would like to confirm that it isn't possible to create a credit card when using the payment element: without the checkout session integration; without a setup/payment intent; without a payment method ID.
I'm sorry I don't understand your question. can you clarify what you want to do exactly?
Hey, thanks for taking a look.
Sorry, it's indeed confusing.
Essentially we need to save a credit card before submitting an order, i.e. with only the ctoken available. Is this possible? From what I could see, we either need a card token or a payment method ID.
Essentially we need to save a credit card before submitting an order
so you want to save a payment method for later? then that's what SetupIntents are for.
yes, okay, so you're saying setupintents are the suggested way to save payment methods for later when using the payment element, right?
correct
once the SetupIntent is confirmed, you'll have a PaymentMethod object that you can reuse.
I see, yeah, we are already doing this on the server when the order is submitted.
The new proposal is to save the credit card before the order is submitted, but the approach we chose is to confirm only on server side, the client only has the confirmation token available.
Is there any other way to accomplish this saving for later without a setup intent?
Is there any other way to accomplish this saving for later without a setup intent?
maybe, but I'm having a hard time understading your use case and requirements. can you share more details on how your payment flow would work exactly?
Sure, sorry for not being clear, this is a bit complex to put in words.
The payment element has these options:
onBehalfOf: "ID",
captureMethod: "manual",
setupFutureUsage: "off_session"
The page has two buttons: "Save and continue" and "Submit".
On "Save and Continue", we are basically calling stripe.createConfirmationToken.
On "Submit", we hit our API which will create the payment intent and if needed, it will also trigger the credit card creation.
There's a proposal to save the credit card on "Save and Continue" instead, but at this point, we don't have anything else than the confirmation token available.
Hello
Sounds like you're talking about this flow? https://docs.stripe.com/payments/build-a-two-step-confirmation
But you want to save the card after generating a ConfirmationToken?
Yeah, pretty much.
We are not using a customer session though, not sure if that's possible without it.
In that case, when you reach step 6 - you'll need to create a SetupIntent and in step 7 - call confirmSetup instead of confirmPayment while using the clientSecret of the SetupIntent you would create in step 6
Okay, I see, that's what I needed to confirm, without a SetupIntent, this is not feasible.
Basically, step 5 and 6 from this guide - https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=setup#create-intent
But in step 6, instead of passing the parameters in screenshot 1, you'd pass the parameter in step 2.
Okay, I see, that's what I needed to confirm, without a SetupIntent, this is not feasible.
Correct, because when you save the payment method for later use - we generate a mandate that allows you to charge the payment method when the customer is not around.
In many cases, that could requires some sort of authentication like 3DS. Hence, confirming a SetupIntents is a required step.
Great, thank you both for the help, appreciate it and sorry for not being super clear.