#Surya-Mani
1 messages · Page 1 of 1 (latest)
Would you have code for download invoice?
You can download the invoice pdf from this url:
https://stripe.com/docs/api/invoices/object#invoice_object-invoice_pdf
what parameter should pass to download invoice?
that property has a padf url, just redirect the customer to that url, and the invoice will be downloaded via the browser.
PDF, please read through the dcumentation:
The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
i dont understand what is pdf url?
it's a link, if you open it in a browser, the invoice pdf will be downloaded.
if i pass that property it will generate the url , i need to put the url in browser for download the invoice ,am i right?
i need to put the url in browser for download the invoice ,am i right?
correct. You need to do a redirection from your website.
This process are done by call API or only pass the property
No API call, just use the property value for the frontend redirection
First you retrieve the invoice by Id (if you don't have the object already):
https://stripe.com/docs/api/invoices/retrieve
Then you just read the value of invoice_pdf
https://stripe.com/docs/api/invoices/object#invoice_object-invoice_pdf
yes.
You want to retrieve the invoices by customerId?
https://stripe.com/docs/api/invoices/list#list_invoices-customer