PayPal bad, hmmkay.

So like any self-respecting and self-torturing merchant Otaku Square's website accepts PayPal payments.

There are a few reasons why I'm not a big fan of PayPal, for one their skyscraper high transaction fees but most of all their attitude towards merchants. But let's not get to deep into that right now, because if I do I'm going to be digging up Police reports and will probably end up writing a whole manifesto.

No, instead of doing that let's go into something quite simple: financial administration. A key process in any business is registering and monitoring the flow of money, sounds pretty logical right? So, you would probably expect PayPal to have some kind of reporting to get an insight in your monthly costs and a per transaction overview so you can actually like mark invoices as paid. Well you're wrong kiddo.

Don't misunderstand, the report is supposedly there... but good luck accessing it!

So let's see if we can get support to help us, I'll press the PayPal support button.

Over the last couple of months I've been trying to contact PayPal to get access to this mythical report... or any kind of useful report for that matter. But guess what, PayPal support points you to technical support, and technical support... well you guessed it, points you to PayPal support.

Mollie to the rescue

Luckily, we're using PayPal through a third party payment provider. This has a few advantages, but the first and foremost one is that we do not have to deal with the hot mess that is called the PayPal API. Another big pro I discovered is that they also somehow know the transaction costs... cha-ching sound effect.

So how do we relate these PayPal payments to their actual outpayment bank transaction without a proper report? Well that's actually fairly easy.

You see, it is fundamentally impossible for a payment to be paid out after the next outpayment in line after the last outpayment. So I basically created a list of all outpayments, and started summing up the total amount paid minus the transaction costs. This must at some point add up to the total amount of an outpayment.

After we know the outpayment, we can simply iterate all payments, get their reference from the metadata and link them to an invoice in the financial administration. Badabing badaboom you got your invoices marked as paid and you can now see how much you are actually paying PayPal.

I will leave you with this poorly edited meme