#kamlesh_webhooks

1 messages ¡ Page 1 of 1 (latest)

wind jewelBOT
#

👋 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/1315734131304562788

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

amber vale
#

Hello! No, we don't generate an Event or send a webhook when someone closes the Amazon popup. Can you give me more info about what exactly you're trying to do? Are you using Express Checkout Element or the Payment Element, or something else? Why do you want to get a webhook when this happens?

abstract ridge
#

We are using a payment element we want to get the webhook because we want to cancel payment intent if the user leaves the page

amber vale
#

When you say "user leaves the page" you mean the page the Payment Element is on?

abstract ridge
#

let me send you screenshot so you can refer

amber vale
#

That's Amazon's sign in page, they control that page, not us.

abstract ridge
#

Even if I click cancel and return to merchant, the payment intent is still not cancelled and no webhook is received.

amber vale
#

That's normal and expected behavior. Why do you want to cancel the Payment Intent instead of allowing them to pay another way?

abstract ridge
#

payment method in payment intent is amazon can we change it ?

amber vale
#

Can you clarify? Are you saying you only set Amazon Pay inside payment_method_types on the Payment Intent?

abstract ridge
#

When we redirect the user to the amazon page, the payment intent is created with amazon pay as the payment method. When the user fills in all the information and submits the payment, the payment intent succeeds and we can begin processing items. When the user leaves the page, we have no way to know that the user left the page. As far as our system knows, the user is still on the page entering information.

amber vale
#

Right, I understand that.

#

That's normal.

abstract ridge
#

So how are we supposed to know if we should ask the user to pay another way or if they are still entering information on the amazon page?

amber vale
#

That's something you need to handle on your end. Did you try listening for the change events I suggested above? Do those give you the signal you're looking for or no?

abstract ridge
#

okay i will try this if that doesn't work i will ping you