#nils_93415
1 messages · Page 1 of 1 (latest)
- User selects payment method like P24 from the Payment Element, where he gets redirected to another page
- User enters payment element and gets redirect again to the url which is passed as "return_url" to "confirmPayment()" in the client
- There are query parameters in the Url the user gets redirected to, like payment_intent, but also the redirect_status. payment_intent is documented, redirect_status isn't. Can I expect it to always be passed to us?
Yeah I understand, but can you give an example Url when it returned?
There could be undocumented parameters there, but it's generally not a good idea to rely on them
https://.../checkout/details?payment_intent=pi_3OJXssGuZMihDWtE0j5cOeAG&payment_intent_client_secret=pi_3OJXssGuZMihDWtE0j5cOeAG_secret_yL7eI2zmCUg3RMVrBtlBs0LUy&redirect_status=failed
The path is our own checkout page. The query parameters are added by Stripe. payment_intent and payment_intent_client_secret are documented for the payment method
For other payment methods "redirect_status" is documented. That's what's wondering me
Um I am seeing redirect_status=failed but it did successfully, right?
Yep I don't think we documented it, and things like that could subject to change, so let' just ignore it if it doesn't block you
No, it actually failed, just did a quick run to have the query parameter included 😄
Our problem with P24 is that payment intents in production are updated from "requires_action" to "succeeded" seconds after the user gets redirected back to us. With the redirect_status we want to determine if we can wait and poll the result until it is succeeded
The redirect_status does not necesarily indicate payment success so shouldn't be relied on in that instance. The recommendation is to use a webhook for async post-payment actions/fulfilment
Yes, we don't rely on it to complete the order on our side. We just want it as an indicator that the payment intent may switch to succeeded in the next couple of seconds so that we wait for a webhook without showing the user that the payment failed or similar, since the payment_intent status is still on "requires_action" when the user gets redirect from P24 payments
I think our recommendation would be to just show a 'payment pending' page in those scenarios, as opposed to polling the API based on an undocumented query parameter