#tarantino-47_error
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/1351829620122718241
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- tarantino-47_error, 11 hours ago, 15 messages
- tarantino-47_error, 17 hours ago, 15 messages
hello, so yesterday stripe support team member was not able to reproduce this. But here's the thing
Hi, let me help you with this.
Basically you need to make sure you provide exactly the same parameters when creating the Payment Element on the frontend, and PaymentIntent on the backend.
Could you please share the Request ID with the error req_xxx? https://support.stripe.com/questions/finding-the-id-for-an-api-request
I display Payment Element to a user, at this point captureMethod is automatic.
Then user fills in his new credit card details
Then I change captureMethod to manual
The error pops up
Then I change captureMethod to manual
How do you do that exactly?
I do set the same captureMethod on PI on the BE while creating it
const elements = useElements();
if (typeof isManualCapture === 'boolean') {
elements.update({
captureMethod: isManualCapture ? 'manual' : 'automatic',
});
}
At which point do you get the error exactly?
after stripe confirm
I also have options.paymentMethodCreation = 'manual'; just an fiy
So when you create the PaymentIntent, correct?
You probably update the captureMethod on the Payment Element, but don't forward the new value to the backend when you're creating the PaymentIntent.
Could you please share the relevant backend code?
you know what, I think I found the issue, thank you
hm
turned out I didn't find the issue yet
here's request log id:
req_mDN8EpnXIZMVut?t=1742372615
Yes, I see that you're creating the PaymentIntent with capture_method=manual, but it seems like the Payment Element was created with the default value of captureMethod, which is automatic.
Again, as I said, you need to make sure the values are exactly the same in both places.
that's true, Payment Element was created with the default value of captureMethod, which is automatic.
hm I call await elements.submit(); first and then trying to update the elements options. I think that could be the reason
You need to go over your code and make sure you provide the same values in all cases.
// here I create confirmation token
const {
error: stripeConfirmationTokenError,
confirmationToken,
} = await stripe.createConfirmationToken({ elements });
// here I confirm the Payment
const { error: stripePIError, paymentIntent } = await stripe.confirmPayment({
clientSecret,
confirmParams: {
confirmation_token: confirmationToken.id,
return_url: typeof window !== 'undefined' ? window.location.href : 'https://app.usmobile.com',
},
redirect: 'if_required',
});
do you know if there any place where I can pass "captureMethod"?
I know that's probably not, but was just wondering.
It's not here.
It's when you create the Payment Element on the frontend and create the PaymentIntent on the backend.
yea, I know, I thought these methods also accept that
ok, nevermind, I got you, thanks again
Happy to help.