#mr_pablo-events

1 messages ยท Page 1 of 1 (latest)

fading stump
#

๐Ÿ‘‹ happy to help

frank agate
#

Hi Tarzan

fading stump
#

if you're using Checkout Sessions then you are in the right place

frank agate
#

Ah, its in line items

#

cos I also have to handle subscriptions, and thats in "items"

fading stump
#

that would be in the items of the subscription (the expandable property of the checkout session)

frank agate
#

I'm looking at a checkout.session.completed event in Stripe, and it does not have any line items

fading stump
#

could you please share the event id evt_xxx?

frank agate
#

sure, it's evt_1LNHSELEsMFdv4uUZ0cjG6dz

#

got another here, evt_1LNZZgLEsMFdv4uU65ZHONbk

fading stump
#

sorry about that, I just realized that the line_items is an expandable field and doesn't really show unless you specify it

#

and add the expand param for line_items

frank agate
#

but you dont have to do that for a subscription, so why is a session different?

#

I need the line item data to be in the webhook. Whats the point of a webhook if you have to do a secondary look up for data?

fading stump
#

I totally agree, and this has been raised internally as a pain point, and unfortunately today we don't have any work arounds

frank agate
#

Also, your documentation for retrieving a session does not mention any parameters

fading stump
frank agate
fading stump
#

you can do both

#

either expand on the checkout session itself

#

or get the line items alone

#

I prefer the first approach since you also need to expand on subscription

#

so why not do that in one time

#

for both one-off and recurring payments

#

unless you have more than 10 line items you don't really need to use that API

#

but if you do since this is a paginated list you'd have to use that API to get the next page of line_items

frank agate
#

I dont have to expadn the subscription though. The price item data is included n the webhook payload.

#

I've ended up using the "stripe.checkout.sessions.listLineItems()" method form the nodejs package

fading stump
#

you could use that as well

frank agate
#

We only have a single line item for one off purchases you see

fading stump
#

both methods are valid

frank agate
#

Any ETA on when line items might be added to the checkout session data by default?

fading stump
#

no idea tbh

#

you can send a request on https://support.stripe.com/?contact=true and ask them to raise the feature request for you and to update you if/when they have any news

frank agate
#

ok, ta

fading stump
#

if you have any more questions you can ask them here

#

When viewing a webhook and the events that passed through, there is "All", "Succeeded" and "Failed". "All" is not showing all. It's showing old data. If I click "Succeeded" I can see todays data.
I'm not sure about this since it's more on the dashboard, you'd have to contact support

frank agate
#

๐Ÿ‘

slow geyser
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!