#aditya-srikar_webhook-events-checkout-session

1 messages ยท Page 1 of 1 (latest)

bold brookBOT
#

๐Ÿ‘‹ 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/1363903322289078475

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

hollow light
#

Hi ๐Ÿ‘‹

It depends on what event type you are listening to what Session you are referring to.

  1. Do you have an example event ID I could look at?
  2. What kind of "Session" do you mean?
peak palm
#
  1. An example event ID: evt_1RG2sQ2RL62FpULAeX3RC9d2
  2. A payment checkout session
hollow light
#

This is an invoice.payment_succeeded event. Invoices are not directly linked to Checkout Sessions.

#

Each type of event with have a different object in the in the object property

peak palm
#

In that case, how can I know the status of an event ?

#

Whether it is completed or not

hollow light
#

Sorry that is a totally different question

#

This event means the payment was successful

#

what "status" are you referring to? The status of what?

peak palm
#

status of a checkout session

#

whether it is completed or expired or cancelled or pending

hollow light
#

If you want to know the status of the Checkout Session

#

you should listen to Checkout Session related events

#

Like checkout.session.completed

peak palm
#

So, we cannot map the invoice with checkout session id right ?

#

Then, how can i know invoice is generated for which checkout session

hollow light
#

What you can do is use the ID in the invoice.payment_intent as the payment_intent parameter with the List Checkout Sessions API. That will only return the Checkout Session associated with that Payment Intent

peak palm
#

payment_intent is unique for each checkout_session ?

#

Can we have multiple checkout_sessions mapped with same payment_intent

hollow light
#

No

#

A payment intent will map to just one checkout session

peak palm
#

Okay

peak palm
#

Hey, i have one more doubt

#

If the webhook is failed due to my server issues, how can i know that ?
Is there any alerting system to let me know

hollow light
#

You mean if your server is down and you are not receiving webhooks?

hollow light
#

In that case Stripe will message you after multiple days of failed webhook deliveries. But ideally you would provision some alert system with your hosting providing to notify you of a server outage.