Main.Invoicing.billing.technical-reference.Product File.3 PR01 - PR01 
Page of - pēdējo reizi mainījis ang laiks 2024/03/27 13:57 
PR01 

ang

2024/03/27 13:57
Satura rādītājs
Name convention
What to avoid
Change log
General information and explanation of records
Standard flow
Soft validation flow
Record Description
H - Header
M - Metadata record
P - Product record
K - Customer number Information record
I - A -number Information record
A - A -number product record
Q - Date product record
B - Date A -number product record
S - Trailer record
Example on appearance
Definitions and terms
Characters that not can be used in product text field.
Characters that not can be used in A-number field.

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 Component	Description	
CompanyNumber	The company number in PayEx ledger system	
DateTime	Date created in format YYMMDDHHMMSS	
SEQNO	Unbroken serial number sequence.	
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
				
1.3	2020-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.4	2023-09-26	Updated 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).

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  instead and simultaneously returned in an .XML file with name .
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.

Response files documentation:
Error log PRxx (BERR007)
ProductResponse (XML)
Receipt PRxx (BRCP007)
Record Description
H - Header
Required record
					
Transaction type	1	H	Req	Header record	
Company number	2	N(5)	Req	The firm number you receive from PayEx	
Company name	3	X(40)	Req	Your firm name	
Date of creation	4	N(6)	Req	YYMMDD – the same date as in the filename.	
Time of creation	5	N(4)	Req	HHMM – the time of creation.	
Example on the records appearance.

M - Metadata record
Required record
					
Transaction type	1	M	Req	Metadata record	
Type of billing	2	N(2)	Req	0 = 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.	
		  	  		
Example on the records appearance

P - Product record
Optional record
					
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 one product, can have 2 to 6 decimals.	
VAT rate	6	N(7),N(2)	Req	VAT rate	
Product_group_Id	7	N(5)	Req	According to agreement with PayEx.	
Identification_No	8	N(10)	  	Id used to group statistics. Required when service Revenue Accounting is active, maximum value 231	
Product_Id	9	N(10)	  	Id for the product, maximum value 231	
Example on the records appearance.

K - Customer number Information record
Optional record
Is not used without agreement
					
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(5)	Req	According to agreement with PayEx.*	
Group_No	5	N(3)	  	Is empty if nothing else is agreed.	
Example on the records appearance:

*Product_group_id is set according to agreement for CustnoInformation record.
I - A -number Information record
Optional record
Is not used without agreement
					
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(5)	Req	According to agreement with PayEx.*	
Group_No	6	N(3)	  	Is left blank if nothing else is agreed.	
Example on the records appearance:

* Product_group_id is set according to agreement for A -no Information record.
A - A -number product record
Optional record
					
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 one product, can have 2 to 6 decimals.	
VAT rate	7	N(7),N(2)	Req	VAT rate	
Product_group_Id	8	N(5)	Req	According to agreement with PayEx.	
Identification_No	9	N(10)	  	Id used to group statistics. Required when service Revenue Accounting is active, maximum value 231	
Product_Id	10	N(10)	  	Id for the product, maximum value 231	
Example on the records appearance:

Q - Date product record
Optional record
Is not used without agreement
					
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 one product, can have 2 to 6 decimals.	
VAT rate	6	N(7),N(2)	Req	VAT rate	
Product_group_Id	7	N(5)	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(10)	  	Id used to group statistics. Required when service Revenue Accounting is active, maximum value 231	
Product_Id	11	N(10)	  	Id for the product, maximum value 231	
Product property 1	12	N(1)	  	Property for product (0-9) ex. for grouping on invoice layout	
Product property 2	13	N(1)	  	Property for product (0-9)	
Product property 3	14	N(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 - Date A -number product record
Optional record
Is not used without agreement
					
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 one product, can have 2 to 6 decimals.	
VAT rate	7	N(7),N(2)	Req	VAT rate	
Product_group_Id	8	N(5)	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(10)	  	Id used to group statistics. Required when service Revenue Accounting is active, maximum value 231	
Product_Id	12	N(10)	  	Id for the product, maximum value 231	
Product property 1	13	N(1)	  	Property for product (0-9) ex. for grouping on invoice layout	
Product property 2	14	N(1)	  	Property for product (0-9)	
Product property 3	15	N(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:

S - Trailer record
Required record
					
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:

Example on appearance

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.
			
  	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	Semicolon	
|	124	Vertical line	
~	126	Tilde	
  	127	DEL	
–	150	Simple dash	
Characters that not can be used in A-number field.
			
  	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	Space	
$	36	Dollarsign	
*	42	Asterisk	
;	59	Semicolon	
<	60	Less then	
^	94	Caret	
`	96	Acute accent	
|	124	Vertical line	
~	126	Tilde	
  	127	DEL	
–	150	Simple dash	
¤	164	General currency symbol