Stripe2QB
Stripe2QB reads your Stripe transactions and imports them into Quickbooks.
Stripe2QB is built on top of the stripe and quickbooks-ruby gems.
Installation
Add this line to your application's Gemfile:
gem 'stripe2qb'
And then execute:
$ bundle
Or install it yourself as:
$ gem install stripe2qb
Configuration
The suggested way to configure Stripe2QB is by pointing it to a YAML file.
There is a template file at config/stripe2qb.yml
that you can copy into your
application. See that file for information on configuration options.
s2qb = Stripe2QB.new # look for the default at config/stripe2qb.yml
s2qb = Stripe2QB.new('path/to/config.yml') # use a different config file path
s2qb = Stripe2QB.new(quickbooks_api: { ... }, stripe_api: { ... }) # use a Hash
Usage
The #process
method looks for deposited (paid)
Stripe Transfers on a certain date
(or date range), and converts them into
Quickbooks Deposits.
s2qb = Stripe2QB.new
# process transfers on or after October 1st, 2016
s2qb.process('2016-10-01')
# process transfers in the month of October, 2016
s2qb.process('2016-10-01', '2016-11-01')
In addition to creating a Deposit, all Stripe Charges associated with each Transfer are converted into Quickbooks SalesReceipts, and all Stripe Refunds associated with each Transfer are converted into Quickbooks RefundReceipts. The SalesReceipts and RefundReceipts are linked to the corresponding Deposit.
Also, each Deposit will contain a line item for the Stripe processing fees and fee refunds included in the Transfer.
You can safely re-process dates without creating duplicate records, as long as
you do not edit the payment_ref_number
or private_note
fields in records
created by Stripe2QB.
Disclaimer
Even though this gem is used in production applications, and most of the API operations involved are reversible / fixable, there may be cases where API calls made by this gem have unforeseen consequences.
Therefore, you assume all liability for any unwanted changes to data caused by use of this gem. The author and contributors assume no responsibility. Use at your own risk.
Development
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Contributing
Bug reports and pull requests are welcome on GitHub. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.