#viaggio-diff-emails-payment

1 messages ยท Page 1 of 1 (latest)

quaint saddle
#

Hello ๐Ÿ‘‹
could you describe your use case in more detail? I'm not really sure what you're looking for.

twin basin
#

We are looking to have the option to have an email triggered from our system when a payment gateway is opened, when the back arrow has been clicked, and when card details are incorrect. all three email should indecate different stages of the payment. currently, we have been able to get an email to send when a payment session has been opened or failed.

#

the failed emails are being triggered by incorrect card details and the back arrow. we are hoping to have two separate emails "failed" when card details are wrong, 'abandoned' when someone clicks the back arrow

quaint saddle
twin basin
#

amazing

#

and to confirm, this will allow for 3 separate email to be sent: 1. when a session is created, 2. when the back arrow is clicked, 3. when card information is inncorrect

quaint saddle
#

It'd depend on your implementation and how you're handling it on your end

twin basin
#

what would prevent all 3 from sending?

#

would only having 2 URLs be the issue?

quaint saddle
#

not sure what you mean by 2 URLs

twin basin
#

our devlopers have told us that we cannot trigger 3 emaisl due to there only being 2 URLs

#

meaning only 2 emails can be triggered

#

"failed' - card details/back arrow and "complete" for when the payment has gone through

thorn tusk
#

Ah, so you're not the developer, that's what we were missing (since it's a bit more obvious when you understand how our API works exactly).
Your developers are correct in one way but didn;t see they totally can do this. A Checkout Session is linked to a PaymentIntent which represents the payment state machine. It's possible for a PI to never be attempted confirmed, or it's possible for it to succeed after 0, 1 or 20 declines
So when it's "abandoned", your developers can look at the underlying PI on the Session and confirm whether that PI was declined before. This is how they can then tweak the email you are sending to handle real abandoned carts (no payment attempt) from failed ones

twin basin
#

ah thank you! yes we wanted to check ourselves as this is something we need. I appreciate your help and for being able to understand my question. It can be difficult to communicate your issue when you cannot explain it in technical terms

thorn tusk
#

Totally fine! My advice for next time is to mention you're not the dev yourself as we would change how we reply to help with that ๐Ÿ™‚

#

but hopefully you're unblocked, and do tell your devs to come to ask themselves as they can share the code and we can help point them in the right direction faster too!

twin basin
#

thank you thank you thank you. I will do that if i have anymore questions!