简体   繁体   中英

How do I receive the upcoming invoice pdf from the upcoming invoice stripe api call?

So here's the context: I have an app that bills customers on the 8th of each month for their subscription. Subscription charges are calculated on the last day of each month for the entire month (1st - 31st). That leaves an 8 day period between when the charges are calculated and when the customer is automatically billed.

I would like to send my customers a preview of their upcoming bill. The Stripe ruby docs state that the response of the upcoming invoice api call gives me an invoice_url. My original thought was I could simply send this pdf in an email. However, when trying this call with test data in my app, there is not invoice_url.

https://stripe.com/docs/api/invoices/upcoming

Am I missing something?

Thanks in advance.

Upcoming Invoices are just a preview of the next invoice, they do not have actually have an invoice PDF.

The response in the API reference (showing the invoice_pdf field) seems to be a docs bug.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM