#feloe_paymentintent-capture
1 messages ยท Page 1 of 1 (latest)
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.
- feloe_wallet-manual-capture, 6 days ago, 35 messages
๐ 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/1245488713442787338
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
You can test different outcomes that result from different 3DS auth scenarios using these test cards: https://docs.stripe.com/testing#regulatory-cards
But you can't really see what 3DS redirects will look like, since it's different for every customer's card issuer.
Oh ok because I'm following https://docs.stripe.com/payments/place-a-hold-on-a-payment-method this method and I was receiving this error
A `return_url` must be specified because this Payment Intent is configured to automatically accept the payment methods enabled in the Dashboard, some of which may require a full page redirect to succeed. If you do not want to accept redirect-based payment methods, set `automatic_payment_methods[enabled]` to `true` and `automatic_payment_methods[allow_redirects]` to `never` when creating Setup Intents and Payment Intents.
So I just added the return_url param to my payment intent but I have no idea how that is handled in the client and I can't just roll out my code without testing it first ๐ฌ
Gotcha. Basically that is the URL that the customer is redirected to after 3DS authentication, so you would need to have a staging environment setup to test this flow yourself. I'm not sure of another way
Here is my checkout flow if it helps
// submit the StripeElements form
const { error } = await (paymentForm.value as StripeElements).submit()
// create a payment method using the elements form
$stripe.createPaymentMethod({
elements: paymentForm.value,
params: {
billing_details: {
name: `${firstName} ${lastName}`,
email: email,
phone: `${phoneNumber}`
},
}
}).then(async (result: any) => {
if (result.error) {
// todo handle error
loading.value = false
} else {
// use created payment method id to create order
await placeOrder(result.paymentMethod.id)
}
}).catch((err: any) => {
handleError(err)
console.error(err)
}).finally(() => {
loading.value = false
})
Not really. Like, you need to run a local server of your code and access it in the browser to test this yourself. Without that, you're not going to be able to test actions performed on redirect
ok so now that I triggered an error I have to follow this guide,right?
https://docs.stripe.com/payments/finalize-payments-on-the-server#next-actions
It depends. If you followed that guide to create your payment flow, then yes.
No I initially followed this one https://docs.stripe.com/payments/place-a-hold-on-a-payment-method
I just Googled how to handle next_action returned from
await Stripe.paymentIntents.create(stripeIntent, stripeAccount)
so our flow doesn't capture the funds until a restaurant accepts the order
Wait... So if the confirmation step is handled, why not just capture the payment like the guide says?
which guide?
This one
you mean in the Capture Funds Section?
yup
feloe_paymentintent-capture
So the flow was working correctly until I updated the node-stripe dependency from version 12 to 15 and added support for Apple Pay then I started getting that return_url is required error. I want to make sure I am handling those redirects correctly
you jumped 3 major versions and each major version has breaking changes that is important to carefully read about
What is blocking you exactly after what my colleague explained?
Yeah that was my mistake.
So currently nothing is blocking me from capturing funds after I added the redirect_url to my paymentIntent.
My main concern is how should I handle those redirects when following the place a hold on a payment method guide.