生成 Stripe 草稿发票的 PDF

Generate a PDF of a Stripe Draft Invoice

在 Stripe 中,一旦您确定了发票,its status 就会从 draft 更新为 open。然后您可以下载它的 PDF 或查看它的托管页面。

你能下载发票草稿的 PDF 文件吗?我无法在 API 或仪表板中找到执行此操作的方法。

在最终确定发票之前,invoice_pdfhosted_invoice_url 字段均为空。对我来说,只有打开的发票才能获得托管页面是有道理的,但感觉很奇怪,无法下载发票草稿的 PDF。

无法在 Stripe 中创建发票草稿的 PDF。

听起来您可能想改用 Quotes

Quotes enable you to combine recurring and one-off line items so you can provide your customers with a price estimate, including any discounts or taxes. ​​Stripe enables you to convert the quote into a recurring subscription or a one-time invoice after the customer accepts the quote.

报价也需要敲定才可以download a PDF, but Quotes aren't actual Invoices or Subscriptions until you accept them, so finalizing them has very few consequences. You can even clone a new Quote from an existing Quote using from_quote