/stripe-xero-csv

Stripe transactions -> Xero-compatible .csv

Primary LanguagePythonMIT LicenseMIT

Stripe -> Xero-compatible .csv

Python CLI for dumping Stripe transactions to a .csv file that's compatible with Xero bank statement imports.

Features

  • 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

Requirements

  • Python 3 (tested on 3.7)

Installation

Install packages:

pip install -r requirements.txt

Usage

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.

CLI options

  • -k or --api-key - Your Stripe API key (must have 'Balances' permissions)
  • -c or --currency - 3 letter currency code (defaults to USD)
  • -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

LICENSE

MIT