Why do my invoices have HastedInvoiceUrl being null in Stripe? Should I configure it somehow in the backoffice of my Stripe account?
I am using the Stripe.InvoiceService.ListAutoPagingAsync
method from C#.
My invoices have a status of draft. According to the documentation:
hosted_invoice_url string
The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
So, I would expected to see a link inside the hosted_invoice_url
field, but it is not there.
CodePudding user response:
This is expected behavior. An Invoice begins in a draft
state, it can later be finalized at which point its status becomes open
[1]. If you wait until your Invoice finalizes with auto-advancement[2] or manually finalize[3] the invoice yourself, the hosted_invoice_url
field will no longer be null.
[1] https://stripe.com/docs/invoicing/overview#invoice-lifecycle
[2] https://stripe.com/docs/invoicing/integration/automatic-advancement-collection
[3] https://stripe.com/docs/invoicing/integration/workflow-transitions#finalized