Download the PHP package rtcamp/stripe-xero-csv without Composer
On this page you can find all versions of the php package rtcamp/stripe-xero-csv. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package stripe-xero-csv
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.
Currently it supports:
- Charges
- Refunds
- Payouts
Usage
Preparation
Edit .env
file to add correct Stripe API Key.
Finally run the script:
It will create a file stripe-xero-{date}.csv
with all balance affecting transactions from your Stripe account.
Xero will skip duplicates during import so you need to worry about previously imported transactions appearing in CSV.
The script supports emailing CSV as attachment to predefined email address. This comes handy if you are running script as a CRON job.
As of now only Amazon AWS SES is supported.
You need to set values of following variables in .env
file:
EMAIL_FROM
EMAIL_TO
AWS_ACCESS_KEY
AWS_SECRET_KEY
Please make sure:
EMAIL_FROM
address must be verified already in SES console.- 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.
Known Issues and Limitations
- Xero doesn't provide support for adding Stripe as a bank account. So we need to create a normal bank account with manual feed.
- Stripe doesn't provide Xero friendly statements. Xero supports many formats.
- 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
Does this interest you?
All versions of stripe-xero-csv with dependencies
league/csv Version ^8.0
vlucas/phpdotenv Version ^2.4
daniel-zahariev/php-aws-ses Version ^0.9.1