#Brendon-Invoice
1 messages · Page 1 of 1 (latest)
Hi, can you provide more detail on how you set up the Subscription and the request Id of UpcomingInvoice API?
Yes, I have two products, One is a one time fee. The other is a metered subscription. Screenshot shows how it looks on the Stripe checkout page.
When I call the upcoming invoice api I pass just a customerid and the price ids of the setupfee and the subscription. see below
{{baseUrl}}/v1/invoices/upcoming?automatic_tax[enabled]=true&coupon=Utixxxy&customer=cus_Jq2wEWxxxxx&expand[0]=total_tax_amounts.tax_rate&expand[1]=lines.data.discount_amounts.discount&invoice_items[0][price]=price_xxxxTlgpobjKQONyICqM&subscription_items[0][price]=price_xxxx5IOTlgpobjKtZicV5Hy
Okie
now when you use Upcoming API, how did it go? And how was it different from your expectation?
When I use the API the Subtotal includes the price of the first month of the subscription
I was expecting the subtotal to only include the one-time fee.
Like this - from the stripe dashboard
Basically im building a checkout page and using the get upcoming invoice to calculate any taxes and discounts. So I want to show the products selected and what they will be charged immediately.
Here is what I get from the upcoming api. you can see the subtotal includes the subscription tier which wouldnt normally be charged until the end of the month and the metered billing is calculated.
Sorry I have been slow as I am in multiple workstream. Let me TAL
Let me clarify something first. From a Checkout that include an one time setup fee, after the customer pay for it, the one time setup should be paid already, right?
of are you talking about before the customer actually pay for it?
No problem. This is before the customer has paid anything. I want to simulate exactly what would happen during a checkout for the first time when there is a one time setup fee.
So basically how can I call the Upcoming api to simulate the very first payment they would make.
Hi, sorry I was a bit swamped today. Feel free to come back and open another thread