#cd

1 messages · Page 1 of 1 (latest)

humble tulipBOT
formal harbor
fallen aurora
#

Is there a way to later retrieve all the Checkout Sessions a user has completed? I.e. their purchases?

formal harbor
fallen aurora
#

Is there any way to filter by paid?

#

Basically, it doesn't seem like the CheckoutSessions object was designed for displaying an "Orders" page, where a customer can see all their previous orders. This seems like a common use-case. Am I missing something?

formal harbor
#

It depends on how your UI / UX is designed

fallen aurora
#

The UX is like a pretty typical ecomm site: A user builds a Cart -> they checkout with that Cart -> later, they want to see their past purchases.

formal harbor
#

if you just want to display a high level detail of the orders first, you can do a search for PaymentIntents -> filter by customer id and status as succeeded

fallen aurora
#

The PaymentIntent list would also include PaymentIntents associated with Subscriptions too though, right?

formal harbor
#

ah yes

#

if that doesn't work for you, then you would have to list all Checkout Sessions and do your own filtering

fallen aurora
#

It works, but just seemed like weird UX, given how common the use-case is.

#

Will there be a successor to the Orders API? That might make this use-case simpler?

formal harbor
#

I don't know of the future plans for that off the top of my head right now, but if you email Stripe Support https://support.stripe.com/contact/email, they should be able to tell you more (if there's any plans)

fallen aurora
#

Last thing -> do you know if you can pass an ID to the line_items.price_data.product_data field when creating a Checkout Session? Like you could with the Orders API?

#

I'd like to find-or-create a Product when creating a user "Cart"

fallen aurora
#

You can pass an ID?

formal harbor
formal harbor
#

hrm, unfortunately not, there's no such parameter when creating the Checkout Session

fallen aurora
#

Hmm, too bad. Do you know why they're getting rid of the Orders API? It seems like it fit my use-case well. Which is very typical ecomm...

humble tulipBOT
hard trellis
#

Hi @fallen aurora I'm taking over.

fallen aurora
#

Thanks! Any ideas on the above?

hard trellis
#

Is it about orders API?

fallen aurora
#

Yea, do you have access to the previous messages?

hard trellis
#

Yes I can see them.

fallen aurora
#

Any idea on how to model a basic "Cart" and then list a customer's previous purchases? Without the Orders API?

hard trellis
#

I believe Alex has already answered this question. Is there something that you wish to clarify?

fallen aurora
#

Ahhh, I thought when you said you were "taking over", it was because you had some extra domain expertise.

All good. Looks like I'm out of luck here.