#Elian-download-invoice

1 messages · Page 1 of 1 (latest)

wise juniper
#

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?

shy condor
#

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

hidden barn
#

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.

shy condor
#

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

hidden barn
#

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?

shy condor
#

Here is an example :

#

The links you sent me are the packages I have tried

#

they all send the samme "header overflow" error

#

Error: Parse Error: Header overflow

hidden barn
#

Have you tried responseType: 'blob'?

shy condor
#

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

hidden barn
#

curl -L -o file.pdf https://pay.stripe.com/invoice/acct_...dYsPlQkY/pdf definitely works

#

you might want to remove those links though as they appear to contain personal information

#

unless thats all fake test info

shy condor
#

yes it all works in the front-end, but I cannot make it work in the backend

#

And the data is fake indeed

#

Any idea on how to do it on a backend server?