Main.Invoicing.invoice-service.Implementation guide - Implementation Guide: Cusin 
Page of - last modified by Fredrik Nilsson on 2026/05/05 12:40 
Implementation Guide: Cusin 

Fredrik Nilsson

2026/05/05 12:40
Table of Contents
Introduction
Prerequisites
Overview
Invoicing
Cusin
Receipt
Error log
Invoice generation
Reports and Accounting
Bill Journal
Customer Journal
Accounting Detail
Balance Report

Introduction
This is a general step-for-step implementations guide that guide you through the creation of the CUSIN file that contains your invoice information.
Prerequisites
Before you start implementing PayEx Invoice Service the following is required:
�	A sFTP Client
�	An agreement that includes PayEx Invoice Service (CUSIN)
�	Obtained credentials from PayEx
�	A basic understanding of file name convention and file format limitations
Pease contact us if you have any questions on how to get started.
Overview
Before getting started, have a look at the high level sequence diagram below, which will help you getting a better understanding of the whole process and the components necessary to implement Invoice Service.
The invoice process using CUSIN is designed to operate batch-wise where multiple invoices are to be handled and sent to PayEx in a single file.
All main steps of the invoice process are described below.  that all XML examples below are here primarily for display purposes, to help you get an understanding of the CUSIN file format and to aid you in the implementation.
If you encounter any problem during implementation, don't hesitate to contact us.
Invoicing
The initial step is to create your CUSIN  file.
Cusin
The first thing you need to do is to create a CUSIN file with extension .XML and UTF-8 encoding. Name it according to the filename convention.
Head over to our technical reference section for a more extensive description of the file format, where you find more information of each element in the XML schema and CUSIN example file.
If there are multiple invoices to be handled at the same time: do not send one invoice per file. We strongly suggest to batch them together in one single file. This will also speed up the process of creating and distributing the invoices.
To learn more of how to edit invoice column length and use summary rows, visit the Invoice columns section.    
When you have a complete and validated CUSIN file, you are ready to transfer it to PayEx via sFTP.
Upon reception PayEx will process the file and send you a receipt in return. If something went wrong, you will also receive an error log.
Receipt
When the CUSIN file, containing one or more activities -   is processed a receipt will be created showing numbers of processed customers, numbers of processed invoices and total amount. A receipt is created for each file you send.
Each activity has their own set of result parameters
You can view the XSD and a detailed description here.
Error log
If errors are encountered during file processing an errorlog will be created. Errors may refer to insufficient customer information, invoice information or format errors. An error log is created for each file you send.
The first part displays the processed item itself.
The second part of the error log displays the response item message element that gives reference back to the processed file.
You can view the XSD and a detailed description here.
Invoice generation
When you have transfered your CUSIN file to PayEx and it has been processed successfully the end result will look similar to the invoice example below.  
 If you want to learn more about customizing your invoice, head over to our section that cover additional features and functions.      

Reports and Accounting
You get response files from PayEx in the from of Bill and Customer Journal.
Bill Journal
Bill Journal is the format used to notify changes in invoice status. Entries could relate to events such as a new claim process level, invoices getting closed and newly registered complaints and respites.
You find the Bill Journal technical reference here.
Customer Journal
Customer Journal is the format used to notify changes in customer information. Entries could relate to events such as a new legal address, activation/cancellation of consent and customer status changes due to decease.
You find the Customer Journal technical reference here.
Accounting Detail
Bookkeeping data is produced on two levels. You get accounting records on the transactional level as well as aggretated in the standardised SIE format type 4.
Files are exported from PayEx on a daily schedule.
l file describes the accounting records on the transaction level and Includes invoice number, book account, amount, value date, etc.
You find the Accounting Detail technical reference here.
 describes the accounting records on an aggregated level, that includes total amounts per book account.
You find the SIE4 technical reference here.
Balance Report
The Balance Report (Client Asset Disbursement) includes:
�	 of amount sold, fees and, VAT and specification of total amount to be paid out.
�	. Each record of "Client asset disbursement" listed is equal to the full Accounting Detail for the specified period.
�	   Depending on setup, fees are either deducted from the amount to be paid out, or (when applicable) to be invoiced separatly.Each fees row specify Quantity (sales), Amount (sales), Unit price, Provision and fee Amount.