Stripe API to download all invoices

Hi guys! I have background on html css and some js, but I cannot pull this one off.

First time installing php and composer on my local computer.

I’m trying to download all my stripe invoices using this:

I can’t understand something that for sure is simple, how to use it:

STRIPE_KEY=rk_live_<…> ./download.php , where I put this? in the windows console? I tried: php STRIPE_KEY=rk_live_<…> ./download.php

Looking at the code, the api key is as a environment variable, I don’t know how to set server variables.

Also, I tried to hard code the api key, but I got this errors:

any help will be very welcome! TIA.

If your STRIPE_KEY would not be set correctly, there would be an error like this:
’Set a Stripe API Key in the “STRIPE_KEY” environment variable’

The error you get looks like your System could not open the file. Maybe it is because you are using Windows and it is not possible to read the Filename like “2023-04-12T04:08:25+00:00_in_****.pdf”

Have you tried to add write Permission on the “invoice” directory?

Another method you could try is to open the Windows-Console in Administration mode.

Best regards

Sponsor our Newsletter | Privacy Policy | Terms of Service