#ibgoldbergs

1 messages · Page 1 of 1 (latest)

toxic skyBOT
oblique pollen
#

Yeah, you can look at current_period_end (see here: https://stripe.com/docs/api/subscriptions/object#subscription_object-current_period_end), which gets returned when you retrieve a Subscription using its ID: https://stripe.com/docs/api/subscriptions/retrieve

serene bone
#

That gives end date

#

but what about subscription billing amount (after coupon applied, if applicable)

#

for next bill

#

I'm trying to build a system to let support agents know the next amount a subscription will bill for, and what that date is. Would like to surface it in our UI

oblique pollen
#

You would want to look at the Upcoming Invoice API in that case: https://stripe.com/docs/api/invoices/upcoming

There is a webhook event that is triggered ahead of the renewal date as well: https://stripe.com/docs/api/events/types#event_types-invoice.upcoming

serene bone
#

the unit_amount on the price object seems to only give the price before coupon is applied

#

So invoices upcoming... when does this next upcoming invoice get created?

#

I think I understand it now, just curious to know when this upcoming invoice is created. Is it always the next invoice?

oblique pollen
serene bone
#

Cool. And since we use charge automatically, we can use this as the renewal date