#NES-checkout
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
could you please provide the request id? here's how you can find it https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
evt_1Kw3K9IK1xBhH3tyIiaidXWt I'm using the webhook so I guess that's what your are talking about
listLineItems requires the session id, but it fires a 404 error.
I need instead the request idreq_xxxthat generated the 404
req_1cHw26nOKKt2CB
you're using the invoice id in_xxx to retrieve the checkout session line items this is why it's not working
what's expected is to send the checkout session id cs_xxxx
Okay, where am i supposed to find this id from the request send to the webhook ?
Hi! I'm taking over tarzan.
Hi, okay
Are you trying to retreive the line items of aspecific Checkout Sessions using this? https://stripe.com/docs/api/checkout/sessions/line_items
If so, you need to pass a Checkout Session ID (cs_xxx) and not an invoice (in_xxx)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Okay, where am i supposed to find this id from the request send to the webhook ?
Which request are you using?
To summarize, I'm using checkout for subscriptions, on invoice.paid I want to check the item in line items to fetch the duration of the sub (in the metadata)
Do I need to save the cs_xxx in database, to retrieve it later for lineItems ?
I don't think you need the checkout session of this, the subscription should be enough. Can you clarify exactly what information you are looking for?
I have a subscription product, on which there is 3 or more prices, monthly, 3 months and a year
On each price there is a data stored in the metadata for the duration (in months) and i need this data
That's why I wanted to retrieve lineItems
It probably not the smartest design/choice on my end tho
Thanks for your help, I've figured it out !
Have a great day
FYI you can find a Checkout session by using this https://stripe.com/docs/api/checkout/sessions/list and passing a subscription ID.