#TheMechanic
1 messages · Page 1 of 1 (latest)
Hello TheMechanic, we'll be with you shortly! 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.
• TheMechanic, 2 days ago, 12 messages
• TheMechanic, 5 days ago, 33 messages
Are you using Defer intent flow?
What you mean by defer ?
Collecting payment method before creating an intent?
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=subscription
Ah I think yes
I get my PaymentIntent in a request in the onConfirm callback, then pass it to stripe :
// Confirm the PaymentIntent using the details collected by the Express Checkout Element const { error } = await stripe.confirmPayment({ //elementsinstance used to create the Express Checkout Element elements, //clientSecret from the created PaymentIntent clientSecret: res.data.paymentIntentClientSecret, confirmParams: { return_url: 'https://example.com/order/123/complete', }, });
any guide you're following for this?
Also can you print out the PaymentIntent before you call confirmPayment ?
yes, I can print it, it exists
can you share the ID?
oh, your code explicity sets automatic_payment_methods to false
is there a reason for that?
mhh i have a doubt, i quick check with a coworker
👍
We are not sure, as it is in place since a long time
If you remove it, does the error go away?
i think we use it for forcing 3ds in some cases
i can give a try
I m doing these test, waiting for build.
I got some informations for the reason why we are using manual mode :
- we need to create customer and add them a source for using it later
- we need to creatre authorization flows (-> capture)
- force 3DS in some cases
The other option would be to explicitly set paymentMethodTypes: ['card'] in element configuration
https://stripe.com/docs/js/elements_object/create_without_intent#stripe_elements_no_intent-options-paymentMethodTypes
ok, i have set everything in automatic mode, and now get this error : "Payment details were collected through Stripe Elements using automatic payment methods and cannot be confirmed with a Payment Intent configured with payment_method_types."
huh, can you set the element option I shared above?
i try
ok, adding paymentmethodtypes, it seems to work but redirect me at an unwanted url https://example.com/order/123/complete
that's from your code
// elements instance used to create the Express Checkout Element
elements,
// clientSecret from the created PaymentIntent
clientSecret: res.data.paymentIntentClientSecret,
confirmParams: {
return_url: 'https://example.com/order/123/complete',
},
});
look at the return_url
ow !!! can I tell stripe to not redirect anywhere ?
you can set redirect param to if_required
https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-redirect