PHPackages                             rtcamp/stripe-xero-csv - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. rtcamp/stripe-xero-csv

ActiveProject[Payment Processing](/categories/payments)

rtcamp/stripe-xero-csv
======================

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

1.1.0(7y ago)25[2 PRs](https://github.com/rtCamp/stripe-xero-csv/pulls)MITPHPCI passing

Since Aug 3Pushed 2mo ago31 watchersCompare

[ Source](https://github.com/rtCamp/stripe-xero-csv)[ Packagist](https://packagist.org/packages/rtcamp/stripe-xero-csv)[ RSS](/packages/rtcamp-stripe-xero-csv/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (4)Versions (7)Used By (0)

Stripe Xero CSV Export
----------------------

[](#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:

1. Charges
2. Refunds
3. Payouts

Usage
-----

[](#usage)

Preparation

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

```

Edit `.env` file to add correct [Stripe API Key](https://dashboard.stripe.com/account/apikeys).

Finally run the script:

```
php stripe-xero.php

```

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.

Email
-----

[](#email)

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:

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

[](#crontab)

Add a line like below for weekly emails @ Monday 10am.

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

```

Known Issues and Limitations
----------------------------

[](#known-issues-and-limitations)

1. [Xero doesn't provide support for adding Stripe as a bank account](https://community.xero.com/business/discussion/2014947/). So we need to create a normal bank account with manual feed.
2. Stripe doesn't provide Xero friendly statements. [Xero supports many formats](https://help.xero.com/int/BankAccounts_Details_ImportTrans).
3. Xero API doesn't have provision to insert bank statement lines. It's second most popular [feature request](https://xero.uservoice.com/forums/5528-xero-accounting-api/suggestions/340274-import-bank-statement-lines-via-the-api) pending from eternity i.e. 2009! This is main reason that you need to run this script locally and import CSV files manually.

TODO
----

[](#todo)

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

LICENSE
-------

[](#license)

[MIT](https://opensource.org/licenses/mit-license.php)

Does this interest you?
-----------------------

[](#does-this-interest-you)

[![Join us at rtCamp, we specialize in providing high performance enterprise WordPress solutions](https://camo.githubusercontent.com/09a0d2a1f7799a07ff316278434511ff1377c7682d970aebead65f1a1d068c28/68747470733a2f2f727463616d702e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031392f30342f6769746875622d62616e6e65724032782e706e67)](https://rtcamp.com/)

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance58

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~468 days

Total

2

Last Release

2736d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c1a89bea2f81a41074e34f8ddd59411fe1c355d7fed1d2663487f235695b7e92?d=identicon)[rtcamp](/maintainers/rtcamp)

---

Top Contributors

[![rahul286](https://avatars.githubusercontent.com/u/4115?v=4)](https://github.com/rahul286 "rahul286 (8 commits)")[![iamimmanuelraj](https://avatars.githubusercontent.com/u/26855364?v=4)](https://github.com/iamimmanuelraj "iamimmanuelraj (6 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![maitreyie-chavan](https://avatars.githubusercontent.com/u/20221326?v=4)](https://github.com/maitreyie-chavan "maitreyie-chavan (1 commits)")

---

Tags

csvstripexerostripecsvxero

### Embed Badge

![Health badge](/badges/rtcamp-stripe-xero-csv/health.svg)

```
[![Health](https://phpackages.com/badges/rtcamp-stripe-xero-csv/health.svg)](https://phpackages.com/packages/rtcamp-stripe-xero-csv)
```

###  Alternatives

[tightenco/nova-stripe

A tool to create a quick Stripe dashboard in your Laravel Nova admin panels

110308.9k](/packages/tightenco-nova-stripe)[jacobbennett/stripe-test-token

Quickly create Stripe test tokens for successful and exceptional Stripe responses.

14654.8k](/packages/jacobbennett-stripe-test-token)[flux-se/payum-stripe

Payum Stripe gateways

29407.5k4](/packages/flux-se-payum-stripe)[payum/stripe

The Payum extension. It provides Stripe payment integration.

22573.1k3](/packages/payum-stripe)[craftcms/commerce-stripe

Stripe integration for Craft Commerce 5.0+

32157.4k3](/packages/craftcms-commerce-stripe)[chronon/stripe

A CakePHP 2.x Stripe Payment Processing Component.

4246.6k](/packages/chronon-stripe)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
