#Austin Jakusz-price

1 messages ยท Page 1 of 1 (latest)

stone grove
#

Hi ๐Ÿ‘‹ you will need to backtrack from the Payment Intent to the Checkout Session:
You can use this endpoint to list the Checkout Session related to a Payment Intent by passing that intent's ID as a filter:
https://stripe.com/docs/api/checkout/sessions/list

And then retrieve its line items:
https://stripe.com/docs/api/checkout/sessions/line_items

hardy lintel
#

Hrm, okay. Is that going to give me the same object that a checkout.session.completed would? If so, I don't see line items available in what I receive from stripe.

#

This is the event that I am referencing ^^: evt_1LTfq7INqIsdKRCqRQUgCjGA

stone grove
#

Correct, line items are not included, and that's why you'll need to retrieve the session's line items using the second endpoint that I referenced.

hardy lintel
#

Ah, okay. Must have missed that in your message lol. Thanks.

stone grove
#

No worries! Glad you saw that other event type, I was going to also mention maybe listening for checkout.session.completed events as that would save you one step.

hardy lintel
#

We had thought about it but with the way we are doing things on the back end at the moment, that would cause us some more issues then it would solve I think. We are hoping to rewrite the backend soon though so probably will listen for that.

stone grove
#

Ah, gotcha