2017 © Pedro Peláez
 

project stripe-xero-csv

Export Stripe's balance affecting transactions in a CSV file, recognisable by Xero Import CSV Statement feature.

image

rtcamp/stripe-xero-csv

Export Stripe's balance affecting transactions in a CSV file, recognisable by Xero Import CSV Statement feature.

  • Wednesday, September 27, 2017
  • by rtcamp
  • Repository
  • 6 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Stripe Xero CSV Export

The php script stripe-xero.php exports all Stripe balance affecting transactions into a CSV file recognisable by Xero Bank Account's import a CSV statement feature., (*1)

Currently it supports:, (*2)

  1. Charges
  2. Refunds
  3. Payouts

Usage

Preparation, (*3)

git clone https://github.com/rtcamp/stripe-xero-csv
cd stripe-xero-csv
composer install

Edit .env file to add correct Stripe API Key., (*4)

Finally run the script:, (*5)

php stripe-xero.php

It will create a file stripe-xero-{date}.csv with all balance affecting transactions from your Stripe account., (*6)

Xero will skip duplicates during import so you need to worry about previously imported transactions appearing in CSV., (*7)

Email

The script supports emailing CSV as attachment to predefined email address. This comes handy if you are running script as a CRON job., (*8)

As of now only Amazon AWS SES is supported., (*9)

You need to set values of following variables in .env file:, (*10)

  • EMAIL_FROM
  • EMAIL_TO
  • AWS_ACCESS_KEY
  • AWS_SECRET_KEY

Please make sure:, (*11)

  1. EMAIL_FROM address must be verified already in SES console.
  2. You are using IAM API user to generate AWS_ credentials. SES SMTP credentials won't work.

crontab

Add a line like below for weekly emails @ Monday 10am., (*12)

0 10 * * 1  cd /path/to/stripe-xero-csv && /usr/bin/php stripe-xero.php >> stripe-xero.log 2>&1

Known Issues and Limitations

  1. Xero doesn't provide support for adding Stripe as a bank account. So we need to create a normal bank account with manual feed.
  2. Stripe doesn't provide Xero friendly statements. Xero supports many formats.
  3. Xero API doesn't have provision to insert bank statement lines. It's second most popular feature request pending from eternity i.e. 2009! This is main reason that you need to run this script locally and import CSV files manually.

TODO

  • [ ] Add support to generate CSV for a specific duration. Something like "this month", "last month" should be enough to start with.

LICENSE

MIT, (*13)

Does this interest you?

Join us at rtCamp, we specialize in providing high performance enterprise WordPress solutions, (*14)

The Versions

27/09 2017

dev-master

9999999-dev

Export Stripe's balance affecting transactions in a CSV file, recognisable by Xero Import CSV Statement feature.

  Sources   Download

MIT

The Requires

 

by Rahul Bansal

csv stripe xero

03/08 2017

1.0.0

1.0.0.0

Export Stripe's balance affecting transactions in a CSV file, recognisable by Xero Import CSV Statement feature.

  Sources   Download

MIT

The Requires

 

by Rahul Bansal

csv stripe xero