#Mike Taylor - Upcoming Invoice

1 messages · Page 1 of 1 (latest)

foggy dew
#

The Upcoming Invoice doesn't actually exist as a record so it doesn't have an ID yet and you cannot fetch it.

opal magnet
#

Ok thanks. So in the absence of knowing the upcoming invoice ID, what do we pass as invoice id in this code stripe.invoices
.finalizeInvoice(invoiceId, { auto_advance: true }) -- do we pass null?

foggy dew
#

Wait...sorry. I might have got on the wrong foot. Is this an invoice you are creating manually or is it created via a subscription?

opal magnet
#

manually via the api

foggy dew
#

Okay then you should receive the invoice object in the response to your API request

opal magnet
#

We add InvoiceItems. An upcoming invoice is created. Stripe does not return an id in the invoice object. But we don't see a "close the latest draft invoice call in the API".

foggy dew
#

Ah, creating Invoice Items does not create and invoice by itself

#

But when you create a draft invoice for that customer it will pull in those invoice items

#

Although you can now create a draft invoice with no items first and then add items to it if that makes more sense for you

#

That was kind of a big deal and it just became available

opal magnet
#

Is that new behaviour?

foggy dew
#

Brand new this week

opal magnet
#

Gotcha.

#

have you got a refernce link? Also what is the use case for Quotes? Is that what Quotes is intended to target?

foggy dew
#

I think Quotes is something slightly different. To be honest I haven't messed around with them yet but I think the idea was to provide the customer something where they could see a potential charge

foggy dew