Python CLI for dumping Stripe transactions to a .csv
file that's compatible with Xero bank statement imports.
- Handles multiple currencies (just pass a
--currency
flag) - Parses plain English/multi-lingual transaction dates using dateparser
- Adds Stripe fees as separate rows, for easier accounting
- Outputs to a
.csv
file that can be uploaded immediately into Xero
- Python 3 (tested on 3.7)
Install packages:
pip install -r requirements.txt
This is intended as a CLI tool rather than a library.
cd
into the cloned folder and run from the command line:
python3 main.py --api-key="YOUR_STRIPE_API_HERE" --start="Jan 1" --currency="GBP"
By default, a .csv
file will be generated in the the output
folder of the current directory.
-k
or--api-key
- Your Stripe API key (must have 'Balances' permissions)-c
or--currency
- 3 letter currency code (defaults toUSD
)-s
or--start
- Start date (defaults to start of the current month)-e
or--end
- End date (defaults to now)-o
or--output
- Override default output file name
Dates will be parsed using dateparser