#donziglioni
1 messages · Page 1 of 1 (latest)
Can you share the request ID (req_xxx) where you faced the error? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
It's actually getting snagged before the call to my server... Doesn't show in the logs unfortunately.
v3:1 Uncaught (in promise) IntegrationError: To use createPaymentMethod with the Payment Element, your elements instance must be created with paymentMethodCreation: 'manual'.
at ge (v3:1:65657)
at e._handleMessage (v3:1:71191)
at e._handleMessage (v3:1:84951)
at v3:1:69094
I see! To create payment method manually, paymentMethodCreation: 'manual' should be set as explained here: https://stripe.com/docs/js/elements_object/create_without_intent#stripe_elements_no_intent-options-paymentMethodCreation
I think that points me in the right direction! Thank you!
When I click my "Checkout" button, I make a post request to my server which hits paymentIntents.create(). It looks like the paymentMethodCreation is on the "elements.create()" method? Do I need to explicitly create the payment element if I intend to use this method? I can't find anything that says I
I'd need to. So That's why I'm confused I think
Can you share what you're trying to do? Are you going to create a payment method first, then confirm it on a payment intent, or simply just complete a payment?
Absolutely! To make it simple, I am using this react template from material UI. https://mui.com/material-ui/getting-started/templates/checkout/
When the checkout opens, it makes a request to create an intent with the order total and generates the client secret.
When clicking next to move to the second page, I am rendering the Payment Element.
From there, I can add a button to submit the transaction. However, there is another "next" button to review the order. So from what I read, I need to create a payment method request? And that is requiring that I set the Payment Element to "manual" when creating the element, however, I am not creating the element, Stripe has the element pre-built and I am not creating a specific "card" element or anything like that.
So my question would be, how can I hold off submitting the confirmation, until the user clicks submit on the following page? Because once I render the review page, the payment element will unmount and no longer be there.
Eeeee, I hope that was clear enough and helps! If not, I'm sure something will pop up soon I hope
So from what I read, I need to create a payment method request? And that is requiring that I set the Payment Element to "manual" when creating the element, however, I am not creating the element, Stripe has the element pre-built and I am not creating a specific "card" element or anything like that.
This is not necessary from your flow. Creating a payment method is only required if you would like to do some checks on the payment method before processing the payment.
I'd recommend checking the guide here for payment integration: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements