#kevinx9999_webhooks

1 messages ¡ Page 1 of 1 (latest)

nova hawkBOT
#

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

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

faint dust
#

Hello Sam, hope all is well

hardy cosmos
#

Hi! I see that your account has 1 live webhook [0] and it's only listening to these events:

  • charge.dispute.created
  • checkout.session.completed
  • customer.subscription.deleted
  • customer.subscription.updated
  • invoice.payment_failed
  • invoice.payment_succeeded

The events generated from pi_3SB7AQK4QhmVWaKc1cX4P83k are:

  • charge.updated
  • charge.succeeded
  • payment_intent.succeeded
  • payment_intent.created

This is why you didn't receive any events from the payment object to your current webhook.

[0] https://dashboard.stripe.com/acct_1RugBMK4QhmVWaKc/webhooks/we_1RujDOK4QhmVWaKcDvj3P9FZ

faint dust
#

oh, I see, thank you, I noticed only credit card payments got webhook events, but if users use other payment method such as LInk or Amazon Pay, there is no webhook event recevied at all.
so one quick question here, checkout.session.completed only from credit card payments? while charge.succeeded are from anything else? What else events I need to listen

#

or is there any events that can handle all for successful payment regardless how it is paid?

hardy cosmos
#

so one quick question here, checkout.session.completed only from credit card payments?
No, you will get this event for any payment method as long as the checkout session was completed successfully.

while charge.succeeded are from anything else?
charge.succeeded is for all payment methods

What else events I need to listen
If you are using Checkout Sessions, these are the recommended events to listen to: https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=stripe-hosted#post-payment

But you can also look at the list of events types that we have and see if there is anything specific that you should listen to for your internal workflows: https://docs.stripe.com/api/events/types

faint dust
#

checkout.session.completed is an event I am listening, as you listed above.
for credit card payments, we got this event delivered via webhook.
for other payment method (Link, Amazon Pay etc), even though the dashboard says payment succeeded, it is totally silent on webhook, we got nothing.

hardy cosmos
#

Do you have an example for a payment with Link, Amazon Pay, etc. where an event was not sent for a successful payment?

faint dust
#

pi_3SB75PK4QhmVWaKc0DqjA5Xz
pi_3SAjRUK4QhmVWaKc18XZw8WB

#

the first one is Link and the second one is Amazon pay

#

we didn't get checkout.session.completed

#

there are a few other cases too, these two are just examples

#

both of these payment went through and showed up on Stripe transaction dashboard

hardy cosmos
faint dust
#

hold on a second, this is even more confusing, we tested the two payments on the same device and same stripe check out UI. why one of them uses checkout session and another use direct API call?
pi_3SB78CK4QhmVWaKc0IPIN1T3 nothing recevied - link payment
pi_3SB7AQK4QhmVWaKc1cX4P83k checkout event received -credit card payment

hardy cosmos
#

If you go to these payments on the dashboard [0, 1], go to Events and logs section and scroll down to the first event, you can see that pi_3SB7AQK4QhmVWaKc1cX4P83k was created via /v1/payment_intents [2] while pi_3SB78CK4QhmVWaKc0IPIN1T3 was created via /v1/checkout/sessions [3].

pi_3SB7AQK4QhmVWaKc1cX4P83k used an mobile payment interface (Stripe/v1 AndroidBindings/21.23.1 @stripe/stripe-react-native/0.51.0) [4] and not a Checkout Session to collect the payment.

[0] https://dashboard.stripe.com/acct_1RugBMK4QhmVWaKc/payments/pi_3SB7AQK4QhmVWaKc1cX4P83k
[1] https://dashboard.stripe.com/acct_1RugBMK4QhmVWaKc/payments/pi_3SB78CK4QhmVWaKc0IPIN1T3
[2] https://dashboard.stripe.com/acct_1RugBMK4QhmVWaKc/logs/req_ThXGEWtTrMknsB
[3] https://dashboard.stripe.com/acct_1RugBMK4QhmVWaKc/logs/req_oXBasAwpfFpQ1p
[4] https://dashboard.stripe.com/acct_1RugBMK4QhmVWaKc/logs/req_SNhtR34JkwTsZz

faint dust
#

Thanks, I will dig into the code to find out why it is using a payment_intents instead of checkout sessions.
For payment_intents, do we need to listen these four events?
charge.updated
charge.succeeded
payment_intent.succeeded
payment_intent.created

hardy cosmos
#

It would depend on what you require on your end. If you just require an update for successful payments then you can just listen to the succeeded events.

faint dust
#

Thank you very much Sam, this is very helpful, have a good one there

#

one more quick question

#

is payment_intent.succeeded fired for both checkout session and payment intent?

hardy cosmos
#

Yeap it is!