Please note that your Response files might only utilize and/or contain a subset of all elements described below. See the Record description for your response files to learn more.

Name convention

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

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

For example: PR01_1234_201001155511_1.DAT

The file is semicolon-separated.

What to avoid

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

Change log

VersionDateDescriptionCreated by
1.32020-06-10

Updated Q- and B -record with three new fields that can be used to manage different events on layout or in Billing process.

Daniel Olsson
1.42023-09-26Updated with "Soft validation"Daniel Olsson


General information and explanation of records

Product files to Billing (PR01) are used to add fees for end-user in the PayEx Billing System. PR01-files can contain products on customer level and/or subscription level.

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

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

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

Standard flow

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).

1686896352935-981.png

Response files documentation:

Receipt and Error -file example

Soft validation flow

Some type of errors can be configured as "soft" errors. Meaning that customer numbers with certain preconfigured errors can be excluded from the PR-file while processing. These mentioned “soft” errors will be presented as a warning (W) in BERR007_ErrorlogProductfile instead and simultaneously returned in an .XML file with name PRRESPONSE.
This response file needs actions to be taken before resending the incorrect data of the customer in a new PR file after finalizing the original billing process.

1686896663842-265.png

Response files documentation:

Error log PRxx (BERR007)
ProductResponse (XML)
Receipt PRxx (BRCP007)

Record Description

H - Header

Required record

Field nameField no.FormatTypeDescription
Transaction type1HReqHeader record
Company number2N(5)ReqThe firm number you receive from PayEx
Company name3X(40)ReqYour firm name
Date of creation4N(6)ReqYYMMDD – the same date as in the filename.
Time of creation5N(4)ReqHHMM – the time of creation.

Example on the records appearance.

H;99999;Company AB;180919;1220

M - Metadata record

Required record

Field nameFiled no.FormatTypeDescription
Transaction type1MReqMetadata record
Type of billing2N(2)Req0 = ordinary invoicing (default). 1 – n = test invoicing. Support for test invoicing and the different codes to be used are set up in cooperation with PayEx.
Reserved3  Reserved for future use

Example on the records appearance

M;0;

P - Product record

Optional 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 one product, can have 2 to 6 decimals.
VAT rate6N(7),N(2)ReqVAT rate
Product_group_Id7N(5)ReqAccording to agreement with PayEx.
Identification_No8N(10) Id used to group statistics. Required when service Revenue Accounting is active, maximum value 231
Product_Id9N(10) Id for the product, maximum value 231

Example on the records appearance.

P;12345;Football1;5;23,50;25,00;2;;
P;12345;Football2;5;23,50;25,00;2;1;12365487

K - Customer number Information record

Optional record

**Is not used without agreement

Field nameField no.FormatTypeDescription
Transaction type1K Product record.
Customer number2X(15)ReqCustomer number
Product text3XReqProduct text, see Definitions and terms
Product_group_Id4N(5)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 - A -number Information record

Optional record

**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(5)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 A -no Information record.

A - A -number product record

Optional 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 one product, can have 2 to 6 decimals.
VAT rate7N(7),N(2)ReqVAT rate
Product_group_Id8N(5)ReqAccording to agreement with PayEx.
Identification_No9N(10) Id used to group statistics. Required when service Revenue Accounting is active, maximum value 231
Product_Id10N(10) Id for the product, maximum value 231

Example on the records appearance:

A;12345;4788743;Installation fee1;5;150,00;25,00;1;2;
A;12345;4788743;Installation fee3;5;150,00;25,00;1;2;123456

Q - Date product record

Optional 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 one product, can have 2 to 6 decimals.
VAT rate6N(7),N(2)ReqVAT rate
Product_group_Id7N(5)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(10) Id used to group statistics. Required when service Revenue Accounting is active, maximum value 231
Product_Id11N(10) Id for the product, maximum value 231
Product property 112N(1) Property for product (0-9) ex. for grouping on invoice layout
Product property 213N(1) Property for product (0-9)
Product property 314N(1) Property for product (0-9)

Note! When service Revenue Accounting is active, the dates must be within revenue month. It is only allowed to use from- and to-date within a calendar month. Use of “Product property” field is set up in agreement with PayEx

Example on the records appearance:

Q;12345;Football1;5;23,50;25,00;2;20180101;20181001;1;;;;
Q;12345;Football2;5;23,50;25,00;2;20180101;20181001;1;1234567;1;2;8

B - Date A -number product record

Optional 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 one product, can have 2 to 6 decimals.
VAT rate7N(7),N(2)ReqVAT rate
Product_group_Id8N(5)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(10) Id used to group statistics. Required when service Revenue Accounting is active, maximum value 231
Product_Id12N(10) Id for the product, maximum value 231
Product property 113N(1) Property for product (0-9) ex. for grouping on invoice layout
Product property 214N(1) Property for product (0-9)
Product property 315N(1) Property for product (0-9)

Note! When service Revenue Accounting is active, the dates must be within revenue month. It is only allowed to use from- and to-date within a calendar month. Use of “Product property” field is set up in agreement with PayEx

Example on the records appearance:

B;12345;4788743;Installationfee1;5;150,00;25,00;1;20180101;20181001;2;;;;
B;12345;4788743;Installationfee2;5;150,00;25,00;1;20180101;20181001;2;123456;1;2;8

S - Trailer record

Required 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;99999;Company AB;180919;1002
M;0;
P;sp000012;Dressing gown; 3;350,00;25,00;3;;
P;sp000012;Mug; 3;50,00;25,00;3;;134567
P;sp000302;Dressing gown; 1;350,00;25,00;3;214;
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;147;
A;000087;0702402377;Energy tax june;992;0,162;25,00;6;;123456
Q;12345Football;5;23,50;25,00;2;20180101;20181001;1;1;2;8
B;12345;4788743;Installfee;5;150,00;25,00;1;20180101;20181001;212;125478;1;2;8
S;12

Definitions and terms

Header record and Trailer record exists only once. Records of the type P, A, I, Q, K and B can exist a multiply of times for a single customer number.

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 which characters can be used in the product text. See below “Characters that can not be used in product text field”.

Characters that not can 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
;59Semicolon
|124Vertical line
~126Tilde
 127DEL
150Simple dash

Characters that not can 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
 32Space
$36Dollarsign
*42Asterisk
;59Semicolon
<60Less then
^94Caret
`96Acute accent
|124Vertical line
~126Tilde
 127DEL
150Simple dash
¤164General currency symbol
Created by David Persson on 2021/01/29 09:26