Tracking cryptocurrency payments in Xero

Jevon Wright
CryptFolio
Published in
7 min readJul 2, 2018

Cryptfolio.com accepts cryptocurrency payments for its services, and internally, we use Xero to generate our reports and returns. Xero is a great platform for accounting with fiat, but cannot support cryptocurrency. By combining Xero + CryptFolio, we can use the strengths of each platform.

By getting this transaction into our accounting software, we can safely satisfy our tax and reporting obligations (such as GST, IR4, and IR10), and make our end-of-year reporting easier.

In this article, we’ll process a simple transaction:

A New Zealand customer has made a payment on 11 May 2018, with Litecoin, for $19.00 ex GST (minus a 5% cryptocurrency discount). The payment has gone through CoinPayments.net, who have also charged a fee. We have charged GST and need to capture this for our GST return. We want to hold onto LTC long-term, and not immediately exchange it into NZD.

This article will cover, in detail, some of the steps that you may wish to use in order to integrate your own cryptocurrency payments into your accounting software and reports.

(Note: This is not financial advice, and is a work in progress. The tools and services listed below may change at any time. We are not accountants or advisors, and this article has been written with New Zealand law in mind. You should contact your own accountant(s) or another suitable professional service, in your own country, for personalised advice.)

The customer invoice

Send your customer an invoice, as per usual. Include all of the necessary information, including total amount, discount, GST, and payment method(s).

The invoice sent to the customer.

Xero transaction for customer payment

We’ll now switch over to Xero, our preferred platform for accounting and reporting in fiat, to include the customer payment in our reports.

To keep things separate between our NZ bank account, and our cryptocurrency accounts, we’ll create a new virtual Bank Account in Xero (in NZD) to track our cryptocurrency events. This will measure the raw input value of all cryptocurrency payments. As a separate bank account, the transactions within this account will also be included in all of your Xero reports.

A virtual cryptocurrency bank account in Xero (in NZD), for tracking purposes.

We then create a new transaction for the customer payment in this account, for the full amount, including GST and any discounts. Make sure you have the GST correct, and include the original user invoice as an attachment.

We create a new Transaction for the user invoice, as Receive Money.

(You can also apply the discount by creating a separate Invoice in Xero, if this is how you have set up your accounts.)

Xero will then include this payment in our GST return for the correct period (e.g. 1 Apr 2018–31 May 2018).

However, at this point we’ve neglected to cover the fees of the transaction, and we have no idea how much the Litecoin is actually worth. Xero’s internal inventory model is not suitable for tracking cryptocurrency inventory (we’ve tried). We’ll instead be using CryptFolio’s inventory model, which has been designed to support cryptocurrency.

How to treat cryptocurrency payments?

In this article, we’ll be treating cryptocurrency payments as per our Accepting Cryptocurrency as a NZ business article: as if we had immediately purchased cryptocurrency with the fiat received from the invoice, and stored it as a long-term investment.

To deal with fees, we’ll treat it the same way: as if we had immediately purchased cryptocurrency with the fiat received from the invoice, and used it to pay the CoinPayments.net fee.

Calculating the fee

On the CoinPayments.net merchant portal, you can see the full details of a transaction, including the incoming LTC, the CoinPayments.net fee, and the cryptocurrency network fee.

We will treat both the CoinPayments.net fee, and the cryptocurrency network fee, as a single fee for processing and receiving the transaction. (You can split this up into two separate transactions if so desired.)

We need to calculate the value of the fee so that we can correctly calculate how much we were actually paid. (We can’t say that the 0.099730 LTC cost $20.75, because we’d be creating value out of thin air.)

Using cryptfolio.com (or another block explorer), you can see how much cryptocurrency was eventually received by the destination address, and from there you can calculate the final combined fee.

In our example, the user sent 0.10042 LTC, and we received 0.099730 LTC. This means that the final fee was 0.00069 LTC, or 0.6871%. (Much cheaper than a credit card.)

Since Xero and its inventory model can’t adequately track cryptocurrency, we will use CryptFolio to track all four transactions: the original transaction (from the user), the transfer to and from our final Litecoin address (secured in our Trezor wallet), and the fee.

The four transactions that we’ll be creating and updating in CryptFolio (for inventory reporting)

Creating the CryptFolio transactions

The user invoice is created as a Purchase transaction, in our User Invoices account, because in our interpretation, the cryptocurrency sale is treated as the immediate purchase of 0.100420 LTC with 20.75 NZD. We can use this to set a fixed valuation of this transaction.

We create a new Purchase transaction to capture the invoice being paid with cryptocurrency, and fix the value of the transaction to the NZD value of the invoice.

We then create a new transaction, in our User Invoices account, to capture the 0.000690 LTC of fees, as a Sale transaction. This is because we want this to capture our realised gain or loss from the fees. We leave the Valuation field empty so that CryptFolio can calculate the value of the fee for us.

We also create a new Sale transaction, to capture the fees we paid to CoinPayments.net.

For the existing Litecoin network transaction (fetched automatically by CryptFolio), we set its transaction type to Transfer, because in our interpretation, this is not a taxable event.

The existing transaction (transferred to our Trezor) is updated to be a Transfer transaction.

We’re now almost complete. However, if we now look at our overall balances and inventory, we’ll note that we’re actually 0.099730 LTC out, and CryptFolio gives us a warning message. This is because we have not yet connected our incoming invoice to our incoming address transaction.

We can resolve this by creating our final Transfer transaction, in our User Invoices account, of -0.099730 LTC. This is the reverse of the transaction into our Trezor wallet.

Once saved, we’re done with the CryptFolio side, and can switch back to Xero.

The payment (and the fees) will all be correctly included in our FIFO reporting for realised and unrealised gains, and we can use the effective cost of the fees transaction as part of our accounting in Xero.

Back into Xero

We now know the effective cost of the CoinPayments.net fees: $0.1426. We can either apply this fee to an existing transaction, or add it to the existing transaction — use whatever method that is consistent with how you treat invoices paid with fiat currency.

Adding the transaction fee to the original user payment.

At this point, we’ve completed all of the accounting necessary for this transaction: it’s been fully captured in both Xero and CryptFolio.

By having the transaction in Xero, we get access to powerful GST reporting tools, profit/loss tools, and all of the other tools available to business owners. Our submission workflow for GST returns has not changed.

The GST component for the NZ sale is captured in our GST return within Xero, shown here in the GST Audit Report.
The NZ sale is also included in our Xero Profit & Loss report under 200 — Sales.

By having the transaction in CryptFolio, we get access to powerful cryptocurrency reporting and realised gain/loss tools. We don’t need to track or calculate cryptocurrency exchange rates ourselves, because CryptFolio does all of this for us.

We can track the performance of our cryptocurrency portfolio in CryptFolio across desktop and mobile.

And at the end of the financial year, when we need to calculate our realised gains from cryptocurrency, the realised gains report from CryptFolio will include the fees disposal event.

When completing your company IR4, our calculated realised gains/losses from cryptocurrency disposal events can be used to complete Question 21.

Whoa, that was a lot of work for one transaction

Yes, it was —but we want to ensure that every step of this (still quite ground-breaking) process is correct. Once we’re more comfortable with our process, we’ll be developing tools to automate a lot of these steps. For example:

  • CoinPayments.net API support to automatically import and create transactions in CryptFolio
  • Download a single PDF for each cryptocurrency transaction, ready to be imported into Xero, rather than having to browse multiple pages
  • Xero integration to automatically create new Receive Money events for incoming cryptocurrency payments

Wherever possible, we’ll be releasing these tools on the CryptFolio platform, to help merchants around the world accept cryptocurrency in their own businesses. To stay up to date with the latest features, you can subscribe to our mailing list, join the platform, or get in contact.

--

--