Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing API Endpoint: /v1/checkout/sessions/:id/line_items #476

Open
Aseeef opened this issue Jan 14, 2024 · 2 comments
Open

Missing API Endpoint: /v1/checkout/sessions/:id/line_items #476

Aseeef opened this issue Jan 14, 2024 · 2 comments

Comments

@Aseeef
Copy link

Aseeef commented Jan 14, 2024

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

@dgramop
Copy link
Contributor

dgramop commented Jan 15, 2024

Probably a similar underlying codegen bug as #475 . Will take a look

@dgramop
Copy link
Contributor

dgramop commented Jan 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants