#newreyes-elements
1 messages · Page 1 of 1 (latest)
@rare heart it is though it's not the common integration path
but you can just create a payment method client-side yes https://stripe.com/docs/js/payment_methods/create_payment_method
May I give you a bit more context of what we want to accomplish?
Basically, we are gathering information like amount, billing details, etc. That info is gathered on a page and then, the user is shown another page where we load Stripe Elements to gather the CC info.
Now, we have a big hurdle: we can't load Stripe Elements on the first page. That is why we move the user to the second page.
But, we are thinking about iframing the second page into the first one. If we do that, we will need to be able to gather the information before creating the payment intent. Or, we will need to create a payment intent with bare minimum information that will need to be updated as the user enters the rest of the information in the first page.
Once the user click the "Purchase" button, we will create the PaymentMethod, add it to the Payment Intent and capture the Payment Intent.
Is that possible?
It is, that's what I explained above, but I think we've discussed this before right? I do think you should defer collecting payment details at the time you are ready to confirm the PaymentIntent. It will be easier to handle declines, 3DS, etc.
what you are trying to do works, it's just a lot more complex
I don't think we discussed this in the past
It may have been someone else
🙂
collecting payment details at the time you are ready to confirm the PaymentIntent.
Payment details is CC details?
yes
@rare heart did that unblock you?
I am still thinking how to best implement this
It's an uncommon scenario, for sure
I wish we could load Stripe Elements on the first page.
And just make it all look seamless
I don't really grasp what that means and why that isn't possible. Sorry a bit tricky to help without context or details about what blocks you