#ayush_checkout-webhooks

1 messages ยท Page 1 of 1 (latest)

frozen crowBOT
#

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

๐Ÿ“ 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.

void marten
#

Hello, how your doing well.

#

To summarize:
what I wanted to understand is that does one checkout session send over more than one event or can it send out multiple?

sour ginkgo
#

Hi there,
depending on the current state of the checkout session and "events" happening around the checkout process, multiple events can and most likely will be omitted during and after a session.

void marten
#

So multiple events could happen?

frozen crowBOT
sour ginkgo
#

Yes, checkout.session.async_payment_succeeded for examples triggers, when the delayed payment intent that belongs to the checkout session succeeds. Which is different than the checkout.session.completed which fires, when the session successfully completed.

void marten
#

I understand. What my question was that if a delayed payment was initiated, would both checkout.session.completed and checkout.session.async_payment_succeeded trigger? or only checkout.session.async_payment_succeeded

worn jay
#

Hi ๐Ÿ‘‹

I'm stepping in as my colleague has to go.

void marten
#

Hello

worn jay
#

If a customer used and async payment method like a US bank debit, this would trigger checkout.session.completed when they complete the Checkout form and checkout.session.async_payment_succeeded when the actual payment succeeds

void marten
#

Understood, so completed is called when they went through the form but async_payment_succeeded actually determines if the payment actually succeded or not correct?

worn jay
#

Correct!

void marten
#

Does async_payment_succeeded trigger for all payment methods?

worn jay
#

Only async payment methods. Cards, for intance, are synchronous

void marten
#

And they would only trigger completed?

worn jay
#

Of the checkout.* type events, yes

void marten
#

For best practice other than the following events what other events would you suggest I should check for if I have an embedded checkout form:
checkout.session.async_payment_failed, checkout.session.async_payment_succeeded, checkout.session.completed, checkout.session.expired

worn jay
#

That entirely depends on what you are doing and what data you need. If the Checkout Session contains the data of interest to you and you are focused there, then the events you listend make sense to focus on.

void marten
#

Mostly, what matters is if the payment has gone through or not. Other than that, I can pass the required info in the metadata, that is possible correct?

worn jay
#

I'm not sure what you mean by that. If your focus in on the payment, you may want to also listen to payment_intent.* events, since those represent the steps taken to actually process the payment the Checkout Session creates.

void marten
#

Understood, what I was asking is that when creating a checkout session, I can pass in
metadata: https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-metadata
nullable object
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

And it would be passed over to the events correct?

worn jay
#

Yeah that can. Just be aware that if you are looking into the Payment Intent object that is created from that Checkout Session, it won't automatically copy over metadata from the Session.

void marten
#

But the checkout session object should have it?

worn jay
#

Yes

void marten
#

Perfect.

#

Thank you so much, thats all I had to confirm!

#

Oh one last thing

#

how long does a checkout session last before it expires?

#

and triggers the checkout.session.expired?

worn jay
#

default is 24 hours

void marten
#

And the time it takes for async_payment_failed to trigger?

worn jay
#

We don't have a deadline for that. It depends on the network.

void marten
#

So if a delayed payment intent is used, and it takes time, I would just need to wait for it?

worn jay
#

Correct

void marten
#

Okay, and expired only triggers when they don't complete the form correct?

worn jay
#

correct

void marten
#

Amazing, thank you so much

worn jay
#

Happy to help ๐Ÿ™‚

It's why we are here

void marten
#

quick question

#

If its a synchronous payment type, where can I see if its succeded or not? payment_status?

void marten
#

perfect

#

thanks!

#

and if its a synchronous payment type then async_payment wont trigger?

worn jay
#

Yes