Skip to content
Copy QuickBooks Online production entities to a sandbox in a single command
Ruby Shell
Branch: master
Clone or download


Copy QuickBooks Online production entities to a sandbox in a single command


Ruby 2.2.2 or greater


  1. Clean out your sandbox.

  2. gem install qbo-sandbox

  3. Enter in your production and sandbox credentials into a .env file of your choosing.

    For example, here is a .env file at ~/qbo-sandbox.env

    # ~/.qbo-sandbox.env

    All variables need to filled in. The PROD variables are your QuickBooks Online production credentials

  4. QBO_SANDBOX_ENV_FILE=~/qbo-sandbox.env qbo-sandbox customers

  5. That's it!


  • What if I set they wrong credentials and copy entities from the sandbox to the production QuickBooks Online account?

    There is a bit of protection against [this] ( but use of this library is at your own risk so be careful to set your credentials correctly.

  • Will this library generate a ton of requests and hit API throttle requirements?

    No, to create the sandbox entities this library uses batch requests.

  • My QBO Sub-customers, certain Items, etc. are not copying over to the sandbox?

    Name list and transaction entities that have references are going to fail because the reference id is not going to be available on the sandbox. This library is not going to support references anytime soon but pull requests are very welcome. This library is only tested with QuickBooks Online Customer, Vendor, and Items. Sub-customers and inventory items that have required references to accounts will not be copied to your sandbox.


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

To run the command locally:

bundle exec ./bin/qbo-sandbox vendors


Bug reports and pull requests are welcome on GitHub at


The gem is available as open source under the terms of the MIT License.

You can’t perform that action at this time.