#Austin Jakusz-price
1 messages ยท Page 1 of 1 (latest)
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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
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.
Ah, okay. Must have missed that in your message lol. Thanks.
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.
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.
Ah, gotcha