#Elian-download-invoice
1 messages · Page 1 of 1 (latest)
Hi 👋 so you're gathering the invoice_pdf from the invoice object, and what happens when you try to download it? Hitting the associated URL via a browser is showing a redirect occurs, have your approaches been following redirects?
I keep getting the same message with all javascript packages (or direct http request) : "Header overflow". And when I setup a bigger header size, it downloads an empty file.
Can you give me a node.js script which downloads your invoices it with 100% success rate ?
Or is there a way to copy my accountant when an invoice is sent to my client?
I have spent around 40 jours trying to solve this, I really need a solution now
40 hours
The pdf link you send does not seem to be downloadable from any server program
This isn't something supported by our libraries and we don't have snippets for this. You'll need to investigate how to write this script to meet your needs to collect the PDF from the URL if you want to host/email that file directly.
I just told you that I have spent 40 hours on this : it is just impossible !
Stripes fees are expensive, so if I cannot even get my invoices, I will just switch to Chargebee.
You are really not helpful
It is definitely possible to do this. You say it fails for a curl http request outside of any node considerations too?
Do you have an example of that request?
Here is an example :
var axios = require('axios');
var config = {
method: 'get',
url: 'https://pay.stripe.com/invoice/acct_1ICZlqD7HiD8Wcfr/test_YWNjdF8xSUNabHFEN0hpRDhXY2ZyLF9LVjB2NGpFOVN0N3h4VVVwOTd6QlVCMXdhS0N2RXpu0100dYsPlQkY/pdf'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);})
The links you sent me are the packages I have tried
they all send the samme "header overflow" error
Error: Parse Error: Header overflow
Have you tried responseType: 'blob'?
I still get the same error ""header overflow". I do not htink that it is possible to download a pdf from your invoice_pdf link