#macros-preview-invoice
1 messages ยท Page 1 of 1 (latest)
That's not really possible @dim cedar
the upcoming invoice API is to preview the next invoice for a given subscription
yeah i know! just trying to find a workaround to preview an invoice with some products in it and maybe a coupon applied
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
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
that would be to simulate changes to your existing subscription so it really won't work for pending invoice items
I can tell you it's not common, I've never seen anyone ask for this before at least
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
yeah sorry I don't have a better answer