#unclphil.

1 messages · Page 1 of 1 (latest)

umbral otterBOT
dusk basalt
#

Hello

#

Yep generally you would use metadata here.

#

Though really I'm not sure what you mean by the Checkout Session ID not being reliable

night orbit
#

I meant the the checkout session ID is not something I can pull then tie to a particular payment_intent

dusk basalt
#

Why not?

#

You do have to wait until the Session is completed, as you stated, but at that point the PaymentIntent will be associated to the Session

night orbit
#

For example the very first event when i create a checkout session is payment.intent.created but there is no checkout session id in that event.

night orbit
dusk basalt
#

Yeah you want to ignore payment_intent.created really. It doesn't matter.

#

The Webhook you want is checkout.session.completed

#

When you receive that Webhook then you retrieve the Checkout Session and expand the necessary properties

night orbit
dusk basalt
#

Are you creating Checkout Sessions directly here?

#

Or are you using Payment Links?

night orbit
#

directly

dusk basalt
#

Okay then you have the Checkout Session ID already from your creation request.

night orbit
#

hmm, ok. I don't see it in events.. Must be doing something wrong

dusk basalt
#

It would be returned from your API request

#

There is no Event triggered on a Checkout Session creation.

#

But when your code creates a Checkout Session then the response our API returns is the Checkout Session object.

#

That is how you redirect your customer to Checkout to begin with

night orbit
#

I see. Thanks! I was looking for an event for checkout.session creation since I saw it in logs.