Main.Invoicing.invoice-service.Implementation guide.Technical reference.Cusin - 01. Cusin

Page of - last modified by Fredrik Nilsson on 2024/06/04 12:33

01. Cusin

Fredrik Nilsson

2024/06/04 12:33

Table of Contents

XSD overview

Invoice service (with distribution)

Ledger service (without distribution)

Encoding

Name convention

Limitations

Important to note!

Current XML schema description

Download current XML schema file

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)

Ledger service (without distribution)

Encoding

The file must use UTF-8 encoding.

Name convention

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

Name components	Description
CompanyNumber	The company number in our ledger system
DateTime	Date created, Should be in the format ISO 8601 format, YYYYMMDDhhmmdd
SerialNumber	Should follow an uninterrupted number series, 1, 2, 3 and so on.

Limitations

Limitations	Description
Maximum size limit	100 MB
Maximum number of invoices	50.000 invoice 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 and not with a leading zero for CustomerNo in Sweden, in order to use AutoGiro (Direct Debit).

The use of EDIInfo will result in distribution by E-Invoice B2B if no other preferred distribution method is set in eDistributionType, see Standard Invoice distribution order of priority.

DistributionDate on the credit invoice must have been passed when using CreditInstructions, in order to execute the settlement against a debit invoice.

Dependency to LegalEntity in CustomerInfo element:

Late fee will be added instead of reminder fee or collection claim fee when LegalEntity is set to "Business" (if specially contracted with PayEx and configured in ledger)

SSN (RegNo) for private individuals will not be displayed in ledger reports due to GDPR. RegNO will only be displayed when LegalEntity is set till "Business"

If distributed by e-mail: When LegalEntity is set to "Private" the e-mail message will include a link to PayEx Invoice Portal where the invoice/claim is available, otherwise a copy of the invoice/claim will be attached in the e-mail message as a pdf-file.

Finland only: Different claim processes will be used depending on "Private" or "Business"

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

Fileversion	Version	Releasedate	Comment
Cusin[2.X].xsd	2.9	2023-04-18	Added element 'CashDiscountInfo' for specifying cash discount on invoices, only supported for invoices without distribution

Change Log

Version 2.9

April 18, 2023

Cusin[2.9].xsd

Added element 'CashDiscountInfo' for specifying cash discount on invoices, only supported for invoices without distribution

Version 2.8

March 29, 2023

Cusin[2.8].xsd

Added element 'RecurringCardInfo' to support recurring card payments (agreement for card payments must be set before use)

Version 2.7

February, 2023

Cusin[2.7].xsd

Added VatRate 24 and 10

Version 2.6

October, 2022

Cusin[2.6].xsd

Allows a wider range of chars for Name, Addressee, StreetAddress, COAddress and City.

Supports StreetAddress and COAddress with up to 72 chars in length.

Version 2.5

September, 2022

Cusin[2.5].xsd

Added support for setting customer LegalStatus

Version 2.4

April, 2022

Cusin[2.4].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