#arjun258387_api
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/1283093781239038077
๐ 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.
- arjun_intent-integration, 21 hours ago, 52 messages
Hello, can you show me your code for your confirmPayment call? It sounds like your call is either missing return_url or is passing it in the wrong place
i want to redirect in success page when updateorder.php file response success full i do not redirect directly when i call stripe.confirmPayment this so i have modify mention below
const { error: paymentError } = await stripe.confirmPayment({
elements,
clientSecret: data.clientSecret,
redirect: "if_required", // Remove the return_url, only handle redirection after updateOrder.php call
});
i have follow
Collect payment details before creating an Intent
document
Thank you for the code. Yep looks like it is missing confirmParams and return_url, the doc that you mentioned has a solid demonstration of how to pass that param
elements,
clientSecret,
confirmParams: {
return_url: 'https://example.com/order/123/complete',
},
});```
https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=payment#submit-the-payment
If you add that to your code, that error should go away for the confirm call
but i want to redirect when my updateOrder.php api call successfully so i can not pass return_url than what i do??
You can pass us redirect: 'if_required' which tells us only to redirect if a Payment Method needs the redirect to happen.
https://docs.stripe.com/js/payment_intents/confirm_payment#confirm_payment_intent-options-redirect
But keep in mind that some PMs do require a full page redirect. This doc has info on which Payment Methods do and do not require redirects, if you epxand each section there will be a "Requires Redirect" column
https://docs.stripe.com/payments/payment-methods/integration-options#additional-api-supportability