PayEx CUSIN (CustomerInvoice) is a file format for you to send customer and invoice information to PayEx. This is a technical overview of the file format, its elements and related material. This section should be seen as a companion to the standard setup scenario.

XSD overview

Please note that your CUSIN file, depending on package type and file version, might only utilize and/or contain a subset of all elements described below. See the XSD for your CUSIN file version to learn more.

Invoice Service = <InvoiceWithDistribution>

Ledger Service = <InvoiceWithoutDistribution>

Invoice service (with distribution)

Cusin_[2.0].xsd-withdistribution.svg

Ledger service (without distribution)

Cusin_[2.0].xsd-withoutdistribution.svg

Encoding

The file must use UTF-8 encoding

Name convention

CUSIN_<CompanyNumber>_<DateTime>_<SerialNumber>.xml

Name componentsDescription
CompanyNumberThe company number in our ledger system
DateTimeDate created, Should be in the format  ISO 8601 format, YYYYMMDDhhmmdd
SerialNumberShould follow an uninterrupted number series, 1, 2, 3 and so on.

Limitations

LimitationsDescription
Maximum size limit100 MB
Maximum number of lines50.000 items

Important to note!

  • You cannot use the same serial number more than once. In case something goes wrong during CUSIN processing, you need to supply a new serial number - the next number in the number series you are using - when transferring the rectified file to PayEx.
  • To avoid most file errors, always validate the cusin-file toward an up-to-date XML schema before transferring the file to PayEx.
  • Standard length of CustomerNo in Norway and Denmark is 7 characters (numeric only).
  • Only use numeric characters for CustomerNo in Sweden, in order to use AutoGiro (Direct Debit).

Current XML schema description

A detailed description of the elements in the current version of the XML schema definition file (XSD) can be found here

The Cusin file must be validated toward an up-to-date XML schema file!

Download current XML schema file

FileversionVersionReleasedateComment
Cusin[2.X].xsd2.42022-04-26eCurrencyType, added new values USD,GBP
Cusin[2.3].xsd2.32020-11-24

DistributionAddressInfo, added new field ProtectedIdentity

2.22020-10-06

EdiInfo.EDIOrderRows.Quantity decimal support, 

EDIInfo.ExternalreferenceURL, added new field

Added support for more characters in EdiInfo.EDIOrderRow.ContractType

Cusin[2.1].xsd2.1 June 2020Order rows under SubOrderBlocks, no longer mandatory
Cusin[2.01].xsd2.01February 2020 
Cusin[2.0].xsd2.02016 

Change Log

Version 2.4

April, 2020

Cusin[2.x].xsd

eCurrencyType, added new values USD,GBP

Version 2.3

November, 2020

Cusin[2.3].xsd

DistributionAddressInfo, added new field ProtectedIdentity

Version 2.2

October, 2020

Cusin[2.2].xsd

EdiInfo.EDIOrderRows.Quantity decimal support, 

EDIInfo.ExternalreferenceURL, added new field

Added support for more characters in EdiInfo.EDIOrderRow.ContractType

Version 2.1

June, 2020

Cusin[2.1].xsd

Order rows under SubOrderBlocks, no longer mandatory

Version 2.1

February, 2020

Cusin[2.01].xsd

Added new DistributionRule UseEInvoiceB2CFI, and two new properties for accounting InterCompanyCode and VatType

Version 2.0

September, 2016

Cusin[2.0].xsd

 Initial version (latest documented version)

Download sample file

CUSIN_367_20190911090045_93

Created by Fredrik Nilsson on 2021/12/28 12:01