Importing PayPal CSV into Wave Accounting

If you ever find yourself importing historical PayPal transactions into Wave Accounting, you’ll likely discover that PayPal’s exports aren’t very digestible.

The key issues with PayPal CSV files are:

  • PayPal’s fees show up in a “Fee” column on the same row as the originating transaction. In Wave, you’ll want these inputted as separate transactions to properly categorize them as “Merchant Gateway Fees.”
  • The column names are incorrect; they must be (Date, Amount, and Description).
  • Regardless of currency, all transactions appear in the same CSV file. You’ll need a separate CSV for every PayPal currency account to import into Wave.

There’s some discussion in Wave forums about resolving this problem by making new rows, but this takes time.

So, I’ve made a little script in Ruby to help with the task. Here’s a link for the self-sufficient.

Update 2019-02-11: Someone requested that I make a web page to allow non-tech people to perform this task. Feel free to go there instead of reading all the technical stuff below.

Update 2020-05-08: Many people have trouble with the page I link below. Most of the problems were because of the various internationalized types of CSV. I think I’ve fixed these problems. Please click the link and try again!

What Does the Script Do?

This script performs the following tasks:

  • Creates out CSVs that have the column headers needed for Wave Accounting.
  • Breaks the transactions into separate files, one for every 100 currency transactions. This small size is required per Wave’s instructions (see import notes below).
  • Splits transactions involving a PayPal fee into two, naming the second “PayPal Fee” with its dedicated Amount.
  • Sets the description of each transaction as “Name – Type”, where Name is the recipient, and Type is the type of transaction, e.g., “MostlyDev.com Donation – PayPal Express Checkout”.

If you’re on MacOS, you’ve already got Ruby installed — I make a point of not depending on any third-party libraries — so you can run the script as-is.

Running on MacOS

So, to get started:

  • Save your PayPal CSV into a folder; let’s say you called it: “PayPal.CSV”
  • Download make_wave.rb from Terminal.
curl -L "https://mostlydev.com/wp-content/uploads/2019/01/make_wave.rb" > make_wave.rb
  • Then, run the script on your CSV file:
ruby make_wave.rb PayPal.CSV

You’ll see some output like this:

PayPal to Wave-importable CSV converter
Copyright (c) 2019 Wojtek Grabski (mostlydev.com)
------

... created PayPal.usd.wave.csv
... created PayPal.cad.wave.csv
... outputted 2202 rows

That’s it.

You should import each of the resulting CSV files into its own currency-specific PayPal account in Wave.

Need to OCR and Import Bank Statements?

If you’re importing paper/pdf bank statements, then check out https://docparser.com. I spent a few days twiddling with OCR before I discovered that these guys have it pretty much figured out. If you need help with importing their CSV exports into Wave, or need some advice on how to best configure, then hit me up

Notes on Importing

Through a lot of trial and error, I’ve discovered that Wave is *very* picky about imports, and whatever process performs this task can easily fail.

To reduce the chances of failure, make sure that after you have commenced the import, and despite what Wave happily tells you, DO NOT LEAVE THE TRANSACTION PAGE, and do not refresh while the import progresses. If you stay on the page and refrain from doing other things, the import will be more likely to succeed, and you’ll also get a visual update when it’s done.

Trust me. Stay on that page, and keep the tab open.

Moreover, even if it looks like Wave has done nothing – there’s no status box on the page after you confirm the import – you should still wait a few minutes and refresh the date range to see if your transactions have been imported. I’ve had several occasions where I thought I was re-attempting an import, only to find multiple copies of transactions.

Check your ledger a little after and between every attempted import. Yes, it’s tedious, but it’s much less tedious than sifting through and deleting 300 triplicate transactions.

Running on Windows

Check out Chocolatey on Windows to get your hands on Ruby. Choco will change your life, I promise.

Install Chocolatey & Ruby on Windows

  1. Go here and copy the cmd.exe Chocolatey install command under the heading Install with cmd.exe.
  2. Drop into an Administrative (Run as Administrator) command shell and run the command you copied above.
  3. Follow instructions.
  4. Quit your Command Shell and re-open it as administrator.
  5. Run choco install ruby -y. Follow instructions.
  6. Run choco install curl -y. Ditto.
  7. Quit your shell again, re-open (you don’t need to be admin this time), and follow the Mac instructions above.

Note: I recommend importing your home currency first. If you don’t do this, Wave will erroneously flag transfers between the non-home and your home currency as having come from your native bank account. This creates some work to un-link and re-link to the correct PayPal account.

29 thoughts on “Importing PayPal CSV into Wave Accounting”

  1. This is awesome! Can’t believe how bad Wave is at handling different Paypal currencies. I wonder how hard it’d be to turn this into a simple, more user-friendly program?

    1. The only big complaint I have is about how transfers are pre-linked. I’d rather none of them were pre-linked than have to unlink and fix 20-25% of my imported transactions.

    2. Did you mean turning the script into a program? Yeah, I’ve been wondering whether I should’ve just turned this into a web app. It wouldn’t take more than a couple of days. I suppose if one or two people ask then I’ll probably do it.

        1. Great, let me know if it works for you. You might well be the first person to actually try it who isn’t me.

  2. Thank you for working on this huge gap in Wave 🙂 I’m going to attempt to process my .csv file as described above, although I understood about 1/3 of the instructions, lol. I’m 60 years old and pretty tech savvy for my age, but the struggle is real . . .

    First let me say if you made this into a web app, I’d totally buy it. I’d send you a $50 donation or what ever you feel is fair within reason.

    Secondly, when you download the .csv from paypal, (I do it in the Reports Tab) do you select “Completed Payments”, “All Transactions” or “Balance Affecting” My instinct is completed payments

    1. Hi! Sorry about the delay in response. Apparently I need to check my comments more often.

      You want to download “Balance Affecting” transactions. Thanks for your interest in a web app that does this.. I’ll see if i can whip one up in the coming week or so.

  3. Can you give me more instructions on how to run on MacOS? I don’t know what “Run the script on your CSV file” means?

    1. > “Run the script on your CSV file”

      This means quite literally running the command that appears right below it.

      $ ruby make_wave.rb PayPal.CSV

      Without the dollar sign — that’s just a convention for expressing terminal commands.

      To run the command you have to open the Terminal application, navigate to the folder where you downloaded the script and your csv, usually by typing:

      $ cd ~/Downloads

      And then running the aforementioned command.

  4. Thanks so much for this script!
    I tried running the Wave Maker after uploading my Paypal CSV file, but the zip file it creates in empty.
    Am I missing something?

  5. Thank you! I almost decided to give up on Wave and move to something paid, but they I found this.

  6. Hello,

    I sent an email but the website you listed isn’t working. Is it offline?

    I really need this service so I hope I get a reply soon 🙂

  7. Hey, thank you so much for making this! I’ve been really frustrated with Wave since they removed the PayPal integration.

    I seem to be having some issues with the web tool, though. I upload the CSV to the web tool successfully and then it sends me back a zip file. However, the zip file seems to be empty. Any idea what’s going wrong?

    Thanks!

    1. Working on a fix for this. I moved servers recently and apparently there are some issues.

  8. I’ve also tried doing it with the power shell and get this in return:

    :85:in `require’: cannot load such file — os (LoadError)
    from :85:in `require’
    from make_wave.rb:40:in `’

  9. Your tool is a life saver.

    No matter what I did I could not get my normal CSV imported this year. Last year I had no problems.

    There is no WAVE community forum any more and free users have to now rely on WAVE articles and bots.

    I tried their sample CVS file and it accepted it with one row. I then tried more than one row and it was rejected. I reverted to one row and it was rejected. I guess there is some LF issue but I have no idea.

    I re-downloaded from PayPal and without opening the file used your tool and it works.

    1. Thanks! I just noticed this site was down for a couple of months :). Feel free to use this year too and let me know if it breaks!

    1. Hi Jim, please try another browser. This issue seems to only come up on some browsers, and I probably won’t ever have enough examples to crack it fully.

  10. When I use your wavemaker tool, it just downloads an empty zip file. Am I doing something wrong?

    1. Just a comment for casual visitors. Travis’s file worked in my browser (Edge on macOS), so if you encounter issues, then please try another browser before posting here.

Leave a Reply to Christie Cancel reply

Your email address will not be published. Required fields are marked *