#nekaoumike

1 messages ยท Page 1 of 1 (latest)

brazen hedgeBOT
bronze nimbus
#

You can call Retrieve Checkout Session API, expanding lines_item.data.price.product

still vortex
#

when I console log it I don't see line items

#

this is in test mode as of now

#

only thing would be if subscriptions are treated differently

bronze nimbus
#

You want to expand

still vortex
#

oh-

kind escarp
#

Not quite (just jumping in; I don't work for stripe)

#

stripe.customers.retrieve('cu_1J8cpqHBt5A08RV1DphWiRZL', {
expand: ['customer', 'invoice.subscription'],
});

still vortex
#

ofc I would change it to be for line items

kind escarp
#

^Maybe just for the line items

#

if that's what you want

still vortex
#
StripeInvalidRequestError: This property cannot be expanded (lines_item).
#

ah

#

found the right one

kind escarp
#

Thank you for visiting Stripe discord. That'll be $5.

still vortex
#

it's line_items

kind escarp
#

๐Ÿ˜‚

kind escarp
#

Jokes. I don't work here

still vortex
#

ik

#

tho with the $10/month just to use your domain

#

wouldn't be sruprised XD

kind escarp
#

LOL

#

Also, try inputting what @bronze nimbus said earlier: "lines_item.data.price.product". That's probably most accurate

#

You mean $9.99 ๐Ÿ˜‰

still vortex
#

yup mods are not wanting off topic stuff-

still vortex
#

I take that back

#

session.line_items.data[0].description it's an array

bronze nimbus
#

๐Ÿ‘‹ LMK if you have issues

still vortex
#

hmm
So this is promising

#

Yeah must be fetching corretly

still vortex
bronze nimbus
#

You can just continue here

still vortex
# bronze nimbus You can just continue here

ah ok. then in that case it's in regards to subscriptions. I want to have my app and stripe be in sync. So that if they auto renew on stripe my app can pick it up too. I am storing the subscription ID if that helped me

bronze nimbus
#

When a Subscription renews itself, it will send you webhook events

still vortex
bronze nimbus
#

invoice.created

#

You can check if that Invoice is belongs to a Subscription, when you retrieve the webhook event

still vortex
bronze nimbus
still vortex
#

Ah I see now

still vortex
bronze nimbus
#

a POST request!

#

You can trigger some test event using Stripe CLI

still vortex
#

Awesome