Name convention
PR_<CompanyNumber>_<DateTime>_<SEQNO>.DAT
Names Component | Description |
---|---|
CompanyNumber | The company number in PayEx ledger system |
DateTime | Date created in format YYMMDDHHMMSS |
SEQNO | Unbroken 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
Version | Date | Description | Created by |
---|---|---|---|
1.0 | 2018-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 name | Field no. | Format | Type | Description |
Transaction type | 1 | H | Req | Header record |
CompanyNumber | 2 | N(4) | Req | The company number you receive from PayEx |
CompanyName | 3 | X(40) | Req | Your company name |
Created date | 4 | N(6) | Req | YYMMDD – the same date as in the filename. |
Created time | 5 | N(4) | Req | HHMM – the time of creation. |
Example on the records appearance.
H;1234;CompanyName;180923;1220
P - Product record
Field name | Field no. | Format | Type | Description |
Transaction type | 1 | P | Product record. | |
Customer number | 2 | X(15) | Req | Customer number |
Product text | 3 | X(73) | Req | Product text, see Definitions and terms |
Quantity | 4 | N(5) | Req | Number of products |
Unit | 5 | N(7),N(2-6) | Req | Price for each product, VAT excluded, can have 2 to 6 decimals. |
VAT rate | 6 | N(7),N(2) | Req | VAT rate |
Product_group_Id | 7 | N(3) | Req | According to agreement with PayEx. |
Identification_No | 8 | N(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ältnamn | Fältnr | Format | Typ | Beskrivning |
Transaction type | 1 | K | Product record. | |
Customer number | 2 | X(15) | Req | Customer number |
Product text | 3 | X | Req | Product text, see Definitions and terms |
Product_group_Id | 4 | N(3) | Req | According to agreement with PayEx.* |
Group_No | 5 | N(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 name | Field no | Format | Type | Description |
Transaction type | 1 | I | Product record. | |
Customer number | 2 | X(15) | Req | Customer number |
A-number | 3 | X(34) | Req | A-number |
Product text | 4 | X | Req | Product text, see Definitions and terms |
Product_group_Id | 5 | N(3) | Req | According to agreement with PayEx.* |
Group_No | 6 | N(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 name | Field no | Format | Type | Description |
Transaction type | 1 | A | Product record. | |
Customer number | 2 | X(15) | Req | Customer no. |
A-number | 3 | X(34) | Req | A-Number |
Product text | 4 | X | Req | Product text, see Definitions and terms |
Quantity | 5 | N(5) | Req | Number of products |
Unit | 6 | N(7),N(2-6) | Req | Price for each product, VAT excluded, can have 2 to 6 decimals. |
VAT rate | 7 | N(7),N(2) | Req | VAT rate |
Product_group_Id | 8 | N(3) | Req | According to agreement with PayEx. |
Identification_No | 9 | N(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 name | Field no | Format | Type | Description |
Transaction type | 1 | Q | Product record. | |
Customer number | 2 | X(15) | Req | Customer number |
Product text | 3 | X | Req | Product text, see Definitions and terms |
Quantity | 4 | N(5) | Req | Number of products |
Unit | 5 | N(7),N(2-6) | Req | Price for each product, VAT excluded, can have 2 to 6 decimals. |
VAT rate | 6 | N(7),N(2) | Req | VAT rate |
Product_group_Id | 7 | N(3) | Req | According to agreement with PayEx. |
From-date | 8 | N(8) | Req | YYYYMMDD – Date from when the product is active |
To-date | 9 | N(8) | Req | YYYYMMDD – Date from when the product no longer is active |
Identification_No | 10 | N(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 name | Field no | Format | Type | Description |
Transaction type | 1 | B | Product record. | |
Customer number | 2 | X(15) | Req | Customer number |
A-Number | 3 | X(34) | Req | A-Number |
Product text | 4 | X | Req | Product text, see Definitions and terms |
Quantity | 5 | N(5) | Req | Number of products |
Unit | 6 | N(7),N(2-6) | Req | Price for each product, VAT excluded, can have 2 to 6 decimals. |
VAT rate | 7 | N(7),N(2) | Req | VAT rate |
Product_group_Id | 8 | N(3) | Req | According to agreement with PayEx. |
From-date | 9 | N(8) | Req | YYYYMMDD – Date from when the product is active |
To-date | 10 | N(8) | Req | YYYYMMDD – Date from when the product no longer is active |
Identification_No | 11 | N(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 name | Field no | Format | Type | Description |
Transaction type | 1 | S | Req | Trailer record. |
Number of records. | 2 | N(8) | Req | Number 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.
Character | ASCII | Function |
0 | NUL | |
1 | SOH | |
2 | STX | |
3 | ETX | |
4 | EOT | |
5 | ENQ | |
6 | ACK | |
7 | BEL | |
8 | BS | |
9 | TAB | |
10 | LF | |
11 | VT | |
12 | FF | |
13 | CR | |
14 | SO | |
15 | SI | |
16 | DLE | |
17 | DC1 | |
18 | DC2 | |
19 | DC3 | |
20 | DC4 | |
21 | NAK | |
22 | SYN | |
23 | ETB | |
24 | CAN | |
25 | EM | |
26 | SUB | |
27 | ESC | |
28 | FS | |
29 | GS | |
30 | RS | |
31 | US | |
; | 59 | Semi kolon |
| | 124 | Vertikal linje |
~ | 126 | Tilde |
127 | DEL | |
– | 150 | En dash |
Characters that can not be used in A-number field.
Character | ASCII | Function |
0 | NUL | |
1 | SOH | |
2 | STX | |
3 | ETX | |
4 | EOT | |
5 | ENQ | |
6 | ACK | |
7 | BEL | |
8 | BS | |
9 | TAB | |
10 | LF | |
11 | VT | |
12 | FF | |
13 | CR | |
14 | SO | |
15 | SI | |
16 | DLE | |
17 | DC1 | |
18 | DC2 | |
19 | DC3 | |
20 | DC4 | |
21 | NAK | |
22 | SYN | |
23 | ETB | |
24 | CAN | |
25 | EM | |
26 | SUB | |
27 | ESC | |
28 | FS | |
29 | GS | |
30 | RS | |
31 | US | |
32 | Mellanslag | |
$ | 36 | Dollartecken |
* | 42 | Asterisk |
; | 59 | Semi kolon |
< | 60 | Mindre än |
^ | 94 | Utelämningstecken (Caret) |
` | 96 | Grav (Acute accent) |
| | 124 | Vertikal linje |
~ | 126 | Tilde |
127 | DEL | |
– | 150 | Enkel dash |
¤ | 164 | Allmän valuta symbol |