#axelvaindal

1 messages ยท Page 1 of 1 (latest)

cursive frostBOT
open gale
#

Stripe has legacy integration using plan instead of price

#

It's possible that price to be null

vital field
open gale
#

In Checkout Session, the number of line items returned can be limited. /v1/checkout/sessions/:id/line_items can be used to retrieve the full list with pagination:

cursive frostBOT
vital field
# open gale In Checkout Session, the number of line items returned can be limited. `/v1/chec...

Sorry, I'm not sure I understand.
From my understanding, by default, Stripe Checkout Session are not retrieved with line items.

From my screen above, there is a way to add limited number of line items to response, and if need be, there is a dedicated endpoint to fetch all line items.

My question is, how to customise the retrieve call to include the limited line items property ?

const session = await Stripe.checkout.sessions.retrieve(sessionId); // no line item by default
const { data } = await Stripe.checkout.sessions.listLineItems(sessionId); // paginated list of line items for the session

const sessionWithLineItems = await Stripe.checkout.sessions.retrieve(sessionId, {)); // which params should be passed here to include line items and avoid doing two api calls ?
steep basin
#

You use expand: Stripe.checkout.sessions.retrieve(sessionId, { expand: ['line_items'] });

vital field