#dvsk

1 messages ยท Page 1 of 1 (latest)

flat nexusBOT
bleak gyro
#

Hello again ๐Ÿ‘‹

#
  1. At error scenario, how does it work? Will Stripe take me to the redirect url though my payment fails?
    Afaik, Checkout is equipped to handle ~some errors on its own so it may prompt customer to provide a different payment method in case the card is declined for some basic reason.
  1. How can I check the error? Can I use the same checkout_session_id parameter and retrieve session?
    yes you can
  1. I also see success_url and cancel_url and redirect url properties. What is the difference between them? (Specially success_url and redirect_url?)
    Are you referring to Checkout Session success_url , cancel_url here? Assuming yes, our docs describe them as

The URL the customer will be directed to after the payment or subscription creation is successful.
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-success_url

If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-cancel_url

  1. Will the retrieve session object have error object, with particular error message? I don't think I saw it anytime.
    It won't be on the Checkout Session itself. The error message should be on the underlying PaymentIntent instead which you'll need to expand
    https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_intent
main quartz
#

Oh!

#

I am here and trying to completely understand what you said ๐Ÿ™‚ Please bear with me for delay in response

bleak gyro
#

NP!

main quartz
bleak gyro
#

That's correct. You could listen to payment_intent.payment_failed event which would let you know when a customer attempted a payment, but the payment failed.

main quartz
#

done! So at the client level, I can check the payment_intent.last_payment_error object right?

bleak gyro
#

yup

main quartz
#

super! Thank you so much Hanzo...Now I feel it was so simple...

#

So, another question please... I read that Stripe can take upto 16 webhooks.. But why does every webhook get called on completely different instances though we have different webhook secrets... I am not completely clear here...

quiet swift
#

Hello, I'm not quite clear on your question, can you try rephrasing it?

If you are asking why we send events out to multiple endpoints, it is because we don't filter beyond account and event type. So any endpoint for a specific account will get all of the events on that account that it has subscribed to. So if you are subscribed to payment_intent.payment_failed those events from all over the account will be sent to that endpoint.

main quartz
#

yeah..okay