async-stripe
async-stripe copied to clipboard
Missing API Endpoint: /v1/checkout/sessions/:id/line_items
Is your feature request related to a problem? Please describe.
Currently, it doesn't seem we are able to retrieve a session's line items. CheckoutSession::retrieve() lets you retrieve the session, but the lineitems requires a separate call to: https://stripe.com/docs/api/checkout/sessions/line_items
Describe the solution you'd like
Maybe an optional parameter to CheckoutSession::retrieve() on whether or not to also retrieve the line items?
Ideally, also a method to an existing CheckoutSession object on populating missing line items.
Describe alternatives you've considered
I needed to get the quantity purchased by the user when CheckoutSessionCompleted is fired by the webhook. Since quantity lives in the line items, and line items aren't returned by default, I can't get the quantity from the CheckoutSession object.
Simple alternative is to store the sessions in my own application.
Additional context
No response
Probably a similar underlying codegen bug as #475 . Will take a look
Ok so not trivially solvable by doing the same thing that I did for #475. There's some additional handling being done for sessions stuff, and I don't completely understand the nuances there. Will revisit once that PR is merged