#macros-preview-invoice

1 messages ยท Page 1 of 1 (latest)

fallen cloud
#

That's not really possible @dim cedar

#

the upcoming invoice API is to preview the next invoice for a given subscription

dim cedar
#

yeah i know! just trying to find a workaround to preview an invoice with some products in it and maybe a coupon applied

fallen cloud
#

I guess what you'd do is use that API and then ignore/filter some items (in your code) but you have to do the whole math basically

dim cedar
#

yeah, that is what i am trying to avoid, since coupons can apply different discounts

#

by product, percentage, fixed amout, etc

#

are you familiar with the subscription_items field in that endpoint?

#

think i am close but i am not quite sure how to use it

fallen cloud
#

that would be to simulate changes to your existing subscription so it really won't work for pending invoice items

dim cedar
#

damn!

#

can't believe stripe doesn't have something to do IMO a common use case!

fallen cloud
#

I can tell you it's not common, I've never seen anyone ask for this before at least

dim cedar
#

ah okay! guess with the new orders API, something like what i am trying to accomplish will become more common, the thing is i am trying to use the "subscription" engine to do something like placing an order!

#

thanks anyway, guess i am going to do the math bymyself

fallen cloud
#

yeah sorry I don't have a better answer

dim cedar
#

all good!

#

enjoy the rest of your day

#

and thanks

#

๐Ÿ‘ ๐Ÿค