Name convention

PR_<CompanyNumber>_<DateTime>_<SEQNO>.DAT

Names ComponentDescription
CompanyNumberThe company number in PayEx ledger system
DateTimeDate created in format YYMMDDHHMMSS
SEQNOUnbroken serial number sequence.

For example: PR_1234_201001155511_1.DAT

The file is semicolon-separated.

What to avoid

  • If the PR-file contains errors witch needs to be corrected a new PR needs to be send with the next coming serial number
  • The customer number needs to be registred in the PayEx Billing system before processing PR-files containing.

Change log

VersionDateDescriptionCreated by
1.02018-09-26

Document created

Tomas Kristoffersson


General information and explanation of records

Product file to Billing (PR) is used to add fees to end-user in the PayEx Billing System. PR contains products that are placed on customer level or subscription level on the end customer's customer.

After creating a billrun in the PayEx Billing system the products from the PR-file will be presented on the invoice.

Incorrect data in fields will be returned in a detailed error file.

PR needs to be correct in its total to get processed.

File format

The format field is written in the way that numerical values are written as N there ”n” is the maximum number of characters or in certain cases number of characters that must exist. Alphanumerical characters are written as X. The decimal separator on amounts must be comma ”,”. Some records are not obligatory but if they exist can some fields in the record be obligatory. Obligatory records are described with the abbreviation ”Req.” in the type column.

 

Character encoding

Windows-1252

Response files

Format errors will be returned in a general error file

Incorrect data in fields will be returned into an error file (BERR007..ErrorlogProductfile).

Correct data in all fields will lead to a receipt file (BRCP007..ReceiptProductfile).

Receipt and Error -files

Examples of an extract from a receipt and a error -file:

Receipt and Error -file example

Record description

H - Header record

Field nameField no.FormatTypeDescription
Transaction type1HReqHeader record
CompanyNumber2N(4)ReqThe company number you receive from PayEx
CompanyName3X(40)ReqYour company name
Created date4N(6)ReqYYMMDD – the same date as in the filename.
Created time5N(4)ReqHHMM – the time of creation.

Example on the records appearance.
H;1234;CompanyName;180923;1220

P - Product record

Field nameField no.FormatTypeDescription
Transaction type1P Product record.
Customer number2X(15)ReqCustomer number
Product text3X(73)ReqProduct text, see Definitions and terms
Quantity4N(5)ReqNumber of products
Unit5N(7),N(2-6)ReqPrice for each product, VAT excluded, can have 2 to 6 decimals.
VAT rate6N(7),N(2)ReqVAT rate
Product_group_Id7N(3)ReqAccording to agreement with PayEx.
Identification_No8N(5) Group in statistics. 1-99999

Example on the records appearance.
P;12345; Football1;5;23,50;25,00;2;1

K - CustnoInformationrecord

**Is not used without agreement

FältnamnFältnrFormatTypBeskrivning
Transaction type1K Product record.
Customer number2X(15)ReqCustomer number
Product text3XReqProduct text, see Definitions and terms
Product_group_Id4N(3)ReqAccording to agreement with PayEx.*
Group_No5N(3) Is empty if nothing else is agreed.

Example on the records appearance:
K;000087; Installation: the Villa;9;

* Product_group_id is set according to agreement for CustnoInformation record.

I - AnoInformationrecord

**Is not used without agreement

Field nameField noFormatTypeDescription
Transaction type1I Product record.
Customer number2X(15)ReqCustomer number
A-number3X(34)ReqA-number
Product text4XReqProduct text, see Definitions and terms
Product_group_Id5N(3)ReqAccording to agreement with PayEx.*
Group_No6N(3) Is left blank if nothing else is agreed.

Example on the records appearance:
I;000087;0702402377; Installation: The house;9;

* Product_group_id is set according to agreement for AnoInformation record.

A - A_no_product record

Field nameField noFormatTypeDescription
Transaction type1A Product record.
Customer number2X(15)ReqCustomer no.
A-number3X(34)ReqA-Number
Product text4XReqProduct text, see Definitions and terms
Quantity5N(5)ReqNumber of products
Unit6N(7),N(2-6)ReqPrice for each product, VAT excluded, can have 2 to 6 decimals.
VAT rate7N(7),N(2)ReqVAT rate
Product_group_Id8N(3)ReqAccording to agreement with PayEx.
Identification_No9N(5) Group in statistics. 1-99999

Example on the records appearance:
A;12345;4788743; Installation fee1;5;150,00;25,00;1;2

​​​​​​​Q - Date_product record

**Is not used without agreement

Field nameField noFormatTypeDescription
Transaction type1Q Product record.
Customer number2X(15)ReqCustomer number
Product text3XReqProduct text, see Definitions and terms
Quantity4N(5)ReqNumber of products
Unit5N(7),N(2-6)ReqPrice for each product, VAT excluded, can have 2 to 6 decimals.
VAT rate6N(7),N(2)ReqVAT rate
Product_group_Id7N(3)ReqAccording to agreement with PayEx.
From-date8N(8)ReqYYYYMMDD – Date from when the product is active
To-date9N(8)ReqYYYYMMDD – Date from when the product no longer is active
Identification_No10N(5) Group in statistics. 1-99999

Example on the records appearance:
Q;12345; Football1;5;23,50;25,00;2;20180101;20181001;1​​​​​​​

B - Date_product record

**Is not used without agreement

Field nameField noFormatTypeDescription
Transaction type1B Product record.
Customer number2X(15)ReqCustomer number
A-Number3X(34)ReqA-Number
Product text4XReqProduct text, see Definitions and terms
Quantity5N(5)ReqNumber of products
Unit6N(7),N(2-6)ReqPrice for each product, VAT excluded, can have 2 to 6 decimals.
VAT rate7N(7),N(2)ReqVAT rate
Product_group_Id8N(3)ReqAccording to agreement with PayEx.
From-date9N(8)ReqYYYYMMDD – Date from when the product is active
To-date10N(8)ReqYYYYMMDD – Date from when the product no longer is active
Identification_No11N(5) Group in statistics. 1-99999

Example on the records appearance:
B;12345;4788743; Installationfee1;5;150,00;25,00;1; 20180101;20181001;2

​​​​​​​S - Trailer record

Field nameField noFormatTypeDescription
Transaction type1SReqTrailer record.
Number of records.2N(8)ReqNumber of records, main record and end record included.

Example on the records appearance:
S;10

Example on appearance

H;9999;TestCompany;180919;1002
P;sp000012; Dressing gown; 3;350,00;25,00;3;
P;sp000012;Mug; 3;50,00;25,00;3;
P;sp000302; Dressing gown; 1;350,00;25,00;3;
I;000087;0702402377; Installation: House;9;
I;000087;0702402377; Calculated year consumption: 24795 kWh;9;
I;000087;0702402377; Calculated meter reading: 000731: 28671;9;
A;000087;0702402377; Electricity june;992;0,129;25,00;6;
A;000087;0702402377; Energy tax june;992;0,162;25,00;6;
Q;12345; 12345Football;5;23,50;25,00;2;20020101;20021001;1
B;12345;4788743; Installationfee;5;150,00;25,00;1; 20180101;20181001;2
S;12

Definitions and terms

Main record and end record exists only once. Records of the type P, A, I, Q, K and B can exist a multiply of times.

The maximum length of the product text is depending on which type of invoice layout is used, and is therefore agreed with PayEx.

There are also some limitations regarding what characters can be used in the product text, see below “Characters that can not be used in product text field”.

Characters that can not be used in product text field.

CharacterASCIIFunction
 0NUL
 1SOH
 2STX
 3ETX
 4EOT
 5ENQ
 6ACK
 7BEL
 8BS
 9TAB
 10LF
 11VT
 12FF
 13CR
 14SO
 15SI
 16DLE
 17DC1
 18DC2
 19DC3
 20DC4
 21NAK
 22SYN
 23ETB
 24CAN
 25EM
 26SUB
 27ESC
 28FS
 29GS
 30RS
 31US
;59Semi kolon
|124Vertikal linje
~126Tilde
 127DEL
150En dash

Characters that can not be used in A-number field.

CharacterASCIIFunction
 0NUL
 1SOH
 2STX
 3ETX
 4EOT
 5ENQ
 6ACK
 7BEL
 8BS
 9TAB
 10LF
 11VT
 12FF
 13CR
 14SO
 15SI
 16DLE
 17DC1
 18DC2
 19DC3
 20DC4
 21NAK
 22SYN
 23ETB
 24CAN
 25EM
 26SUB
 27ESC
 28FS
 29GS
 30RS
 31US
 32Mellanslag
$36Dollartecken
*42Asterisk
;59Semi kolon
<60Mindre än
^94Utelämningstecken (Caret)
`96Grav (Acute accent)
|124Vertikal linje
~126Tilde
 127DEL
150Enkel dash
¤164Allmän valuta symbol

 

Created by Anders Göthberg on 2021/05/11 07:34