#HeyHey-subscription

1 messages · Page 1 of 1 (latest)

rocky cloak
#

Hi @gilded bear! Could you share a Checkout Session ID that doesn't have a payment intent (cs_xxx)?

#

Actually when creating a Checkout Session, the payment intent is only created when the user click on the Checkout link. That's why you only see the payment intent in the webhook and not right away.

gilded bear
#

I dont quite understand

rocky cloak
#

Could you clarify your question? What data are you trying to "correlate" in the webhook?

gilded bear
#

Anything really

#

But on creating the checkout with mode subscription

#

There is no information in that, which i can relate to the webhook

gilded bear
rocky cloak
#

If you listen to the checkout.session.completed event, you could find the Checkout Session ID, or the price ID (by expanding line_items.data.price), or look at the metadata object (if you set one when creating your session). So it really depends what you are looking for.

gilded bear
#

hmmm

#

Since originally i just did subscription create

#

But i couldnt redirect the user after the user had paid

#

So i had to go with checkout instead

mellow sparrow
#

Hi there 👋 getting caught up on this thread.

#

When you pass a client_reference_id that should be available in the object that is included with the webhook events we send for that session.

gilded bear
#

I cant find the client reference id in the webhooks

mellow sparrow
#

Do you have the ID of a checkout session (cs_test_XXX) where you set this, or the ID of an event where you were expecting to see it (evt_XXX), that you could share so I can take a closer look?

gilded bear
#

Yea give me a min

#

cs_test_a12IoLW3GhN16RBHidD5ZAR9PIQkGtu0h1BML2pxP6vt9WBsBK7SJELBQC

mellow sparrow
#

Thank you for that! I can see that there is a client_reference_id set on that session, and that it would have been included in the webhook event if your webhook endpoints were listening for one of the related events. However, the one active webhook endpoint I see on that account is not listening to any checkout session events.

gilded bear
#

Oh so i should listen to a checkout event?

#

Which of the checkout events is smart to listen to?

mellow sparrow
#

If you want to be notified about your checkout sessions, then yes you'll likely want to listen to those events. It's hard to suggest which ones as it's not clear to me what you're trying to accomplish. checkout.session.completed is good if you want to know when a checkout session has been completed:
https://stripe.com/docs/api/events/types#event_types-checkout.session.completed