How to create a POS integration


Rasmus Nielsen,

In this guide we will try to cover what you need to be aware of, if you want to create an integration between a POS system and Dinero. Now it might look different across separate POS systems, since you might have some specific functionality. But in general it can be broken down into the same steps.

An overview of the process could look like this:

Create a deposit account to handle receivable card payments. Let the user choose their bank account on your end for where payouts will be booked. If you handle payouts. Create and book a daily sales report, handling different payment types and any applicable fees. Create and book payouts and any applicable fees.

Setup

For accounting purposes we need to place credit card payments on a deposit belonging to the payment provider. This deposit account could be named “Credit Card Receivables” or named after the specific payment provider for instance “Flatpay” or “Stripe”. We need to park the payments here, since they are usually paid out in bulk at a later date.

To create a deposit account, you’ll use the following endpoint:

POST Create deposit account

Number should be in the 55000-55999 range. We have some standard accounts in this range you need to avoid. Something like 55120, 55125 etc. will usually be safe to use. However the user can create their own accounts in our system and these numbers might already be used. Be ready to handle these situations, by for instance adding 5 to the account number, in case it’s already used.

Account information such as bank registration and bank account number can be left empty, since this is not a bank account.

The user might have several bank accounts in their actual bank and that needs to be represented in their accounting. So in case you handle payouts, make sure to let the user define which bank account to book payouts to.

55000 is the default bank account everyone will have. 55040 is the default cash account everyone will have. 55120 will be created as a creditcard deposit and used as part of this walk through.

Booking daily sales

With the setup out of the way, let’s dive into the meat of things. Booking our daily sales.

First we need to upload the daily sales report as a PDF or image file. This is done via the Upload file endpoint.

POST Upload File

You will get a GUID back, which you use to connect the PDF/Image to the voucher.

Second we need to create a manual voucher, also called Finansbilag inside Dinero. We use this type of voucher to book whatever we want. Now I won't go deep into the ins and outs of bookkeeping. If you are in doubt about this, we advise you to ask us or maybe an accountant in case it is particularly involved.

POST Create Manual Voucher

We will use an example here, where we have a daily sales of 5000 kroner incl. VAT, of which 3800 were paid by card and the remaining 1200 in cash. In this example we will handle fees during payout.

Due to how bookkeeping works, we need to credit the amount into sales with a minus and debit it into our receivables and cash account. This always needs to be balanced. We do not use balancing accounts though, since we need to split it into three separate accounts. We typically only use balancing accounts when we have exactly two accounts in play to simplify the operation.

We need to fill out our voucher as follow:

{
  "voucherDate": "yyyy-mm-dd",
  "lines": [
    {
      "description": "Dagens salg d. dd/mm/yyyy",
      "accountNumber": 1000,
      "amount": -5000,00
    },
{
      "description": "Kreditkort d. dd/mm/yyyy",
      "accountNumber": 55120,
      "amount": 3800,00
    },
{
      "description": "Kontant d. dd/mm/yyyy",
      "accountNumber": 55040,
      "amount": 1200,00
    }
  ],
  "fileGuid": "{The guid of the file we just uploaded}", 
  "externalReference": "e.g. POS ID:42 (for your use)"
}

If your user has sales without VAT, you need to book these into 1050 instead.

Once you’ve sent the manual voucher over, remember to book it, for it to actually have an effect on the user's books and not leave them with a whole bunch of drafts, which they can mess up. When you send it over you get a GUID and Timestamp (version) returned. You need to use these for booking.

POST Book Manual Voucher

And just like that, our daily sales report is booked. We do this every day, if the user has any sales.

Booking payouts

Our demo POS integration also handles payouts.

First we will upload another file, showing the payout and the fee involved. I assume the fee is VAT free, since most payment fees are without VAT, if your fee is with VAT you need to tweak it with a Vat Code.

POST Upload File

There is a 3% cut of all that is received via card. We book this as a fee. Our voucher will look like this:

POST Create Manual Voucher

{
  "voucherDate": "yyyy-mm-dd",
  "lines": [
    {
      "description": "Udbetaling fra indløser d. dd/mm/yyyy",
      "accountNumber": 55000,
      "amount": 3.686,00
    },
{
      "description": "Kreditkort fra indløser d. dd/mm/yyyy",
      "accountNumber": 55120,
      "amount": -3800,00
    },
{
      "description": "Gebyr fra indløser d. dd/mm/yyyy",
      "accountNumber": 7220,
      "amount": 114,00
    }
  ],
  "fileGuid": "{The guid of the file we just uploaded}", 
  "externalReference": "e.g. POS ID:43 (for your use)"
}

Once again, remember to book this voucher once it has been sent over.

POST Book Manual Voucher

Your own service fee

If you charge for your service, say once a month, you can also automate this booking. This is simply done via our purchase voucher, which is quite intuitive.

POST Create Purchase Voucher

You simply fill out any applicable fields, usually a cash purchase since it’s withdrawn at the same time as the date on the invoice from you, and book it into the Software account, 7320, with the amount charged. Remember to upload a file as before, and book this once it’s been sent over. This account assumes you charge Danish VAT on your service.

And with that you’re done. Congratulations, you now have a pretty good POS integration with Dinero.



If you want to be notified whenever we have news, you can add this news feed to your favorite RSS feed software.

Get started today!

Documentation