Records
H - Header
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | H | Req | First record in the file | |
Company number | 2 | N(5) | Req | Company number issued by PayEx. Equal with Owner code in file name | Number |
Company name | 3 | X(1-40) | Req | Your company’s name. | PXString |
Date of creation | 4 | N(6) | Req | YYMMDD – The same date as in the file name. | Date |
Time of creation | 5 | N(4) | Req | HHMM – Time when the file was created. | Time |
Example of the record appearance:
H;1234;Company;161213;1220
K - Customer record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | K | Req | Customer record. First record per customer. | |
Customer number | 2 | X(1-15) | Req | Customer number. The customer number must be unique. If the customer has direct debit as payment method, the customer number format cannot start with more than 5 zeros. | Identifier |
Name | 3 | X(1-72) | Req | The customer’s name. | PXNameAddressString |
Registration number | 4 | N(6)-N(4)' | *Req | The customer’s Social Security Number /Corporate registration number Validation of the SSN will be completed if country code has been set in field 7. If field 7 is not used, validation will be done on the ledgers country code. *If mediadistibutioncode is set to value 52 in combination with E-invoice B2B | PXString |
Telno. | 5 | X(1-15) | The customer’s contact telephone number. | PXString | |
Language | 6 | X(2) | The customer’s language on invoice. Contact PayEx for possibilities. | PXString | |
Country code for Registration number | 7 | X(2) | Country code for customer with a registration number that not is equal to the country code for the ledger. Used for validation of the registration number in each nordic country. | CountryCode |
Example of the record appearance:
K;1234567;Jan Berg;121212-1212;08-1234567
A - Address record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | A | Req | The address record follows the customer record (K). | |
C/O address | 2 | X(1-72) | “Care-of address”. | PXNameAddressString | |
Street address | 3 | X(1-72) | The customer’s street address. | PXNameAddressString | |
ZIP code | 4 | X(4-12) | Req | The customer’s ZIP code. For a Zip code outside Sweden requires a country code according to ISO-1366 standard. E.g. NO-3445 Nordic countries validation is done if it is a valid zip code | ZipCode |
Postal address | 5 | X(1-27) | Req | The customer’s postal address. | PXNameAddressString |
E-mail address | 6 | X(6-60) | *Req | The customer’s e-mail address. *If “Media distribution” = 11 (C1 -record, field 9) or “ENoteDistributionMethod” = 81 (N record, field 2) |
Example of the record appearance:
A;;Gatan 9;SE-12345;Svedala;test@test.se
MB - VAT-exemption record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | MB | Billing method concerning tax regulations Max one per customer | ||
VAT type | 2 | N(1) | Type of VAT reporting, 0 = normal, 1 = reverse tax liability, 2 = No VAT (inside EU), 3 = No VAT (outside EU) | PXVatExemptionCode | |
VAT number | 3 | X(7-14) | Req | Used for reverse tax liability (VATNO). | VatNumberType |
Authorisation code | 4 | X(1-35) | The authorisation code can be shown on the invoice as the approved VAT type. | PXString |
Example of the record appearance:
MB;1;SE556677234501;
E - Extra record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | E | Extra record. Max one per customer. | ||
Terms of payment | 2 | N(2) | Number of days. For Sweden the minimum number of days is according Swedish law for now 7 days. | Interval:0-99 | |
Not used | 3 | ||||
Payment Method | 4 | X(2) | Only Payment Method PG or BG available for new customers | PaymentMethod | |
Not used | 5 | ||||
Not used | 6 | ||||
Verified payment | 7 | N(1) | Not direct debit = 0 (default), direct debit = 1. Contact PayEx for possibilities. | VerifiedPayment |
Example of the record appearance:
E;14;;BG;;;0
The extra record is used if some of its values deviate from the company’s default values. The company’s default values are stored in PayEx database.
AL - Alias record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | AL | Alias record | ||
Alias Type | 2 | X(2) | Req | 1 = Subscription number + Alias 2 = Cost centre grouping, Alias replaces subscription no. 3 = Alias replaces subscription Number, also applies for specification files | AliasType |
Subscriber number | 3 | X(1-15) | Req | The customer’s subscription number from C2 -record, field 2 or MO -record, field 3 | Identifier |
Alias | 4 | X(1-40) | Req | For Alias Type = 3, empty is permitted | PXNameAddressString |
Examples of the record appearance:
AL;1;0812345678;Bengt Bengtsson
AL;2;0887654321;Accounts Department
AL;3;0707011000;Self service
Only one alias record (AL) is permitted per subscription number.
C1 - Billing record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | C1 | Req | Billing information. One record per customer. | |
Billing cycle | 2 | N(1) | Billing frequency determines how often the invoice is sent. 1,2,3,6 = every 1,2,3,6 month 8 = every 12 months 9 = Stop, no invoice. If no value is entered, the company’s default value will be applied. | BillingCycle | |
Discount rate | 3 | N(2).N(2) | Total discount on the invoice in percent, e.g. 23.00 | DiscountRate | |
Bill type | 4 | N(1) | Req | Invoice type describes the level of detail on the invoice. 1 = Invoice 2 = Invoice and summary 3 = Invoice and specification 4 = Invoice, summary and specification | BillType |
Customer type | 5 | X(1) | Customer type can be used to define different customer groups. F=Corporate legal entity I=Has active subscription O=Unspecified P=Private U=No active subscription | PXString | |
Retailer number | 6 | X(1-35) | Retailer number can be used to generate billing statistics. | PXString | |
Protected Identity | 7 | N(1) | Value 0 = Normal, Value 1 = Protected Identity | ProtectedIdentity | |
Customer status | 8 | X(2) | 1 = Inactive customer 2 or empty (default) = Active customer. | CustomerStatus | |
Media distribution | 9 | X(2) | Electronic billing = code issued by PayEx. 1 = Paper 11 = E-mail 52 = E-invoice B2B, = true : then EDI-post = Obl. 74 = Archiving only. Ex: company with a customer portal and/or my pages 94 = E-invoice private. Can only be updated by end customer through its bank | InvoiceDistributionCode | |
Legal Status | 10 | N(1) | Value 0 or empty/null = Active/Default Value 1 = Deceased | LegalStatus | |
Chain number | 11 | X(1-15) | Connects customers on customer number level. Used for internal rating. | PXString | |
Not used | 12 | X(1-50) | |||
Product group discount | 13 | X(2) | *Req | Code that relates to PayEx discount structure. Contact PayEx for possibilities | Interval:0-99 |
Product group discount rate | 14 | N(2).N(2) | *Req | Discount rate for the product group discount in percent, e.g. 25.00. | DiscountRate |
Inter Company Code | 15 | X(1-50) | Company group code | PXString | |
Departments | 16 | N(2) | Enables statistics at department level. | Interval:0-99 |
Example of the record appearance:
C1;;23.00;4;P;af-123;;2;11;;;;;;;
C1;;23.00;4;P;af-123;;2;11;;;B123;;;666;
Billing frequency is only used when invoices are issued on a regular basis. If the queue limits are applicable, leave this field empty.
*Obl. If one is used, the other is obligatory.
C2 - Fixed Telephone record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | C2 | Fixed telephone information at subscription level. Max one per subscriber number. | ||
Subscriber number | 2 | X(1-15) | Req | One of the customer’s active subscriber numbers. | Identifier |
CLI code | 3 | X(1-15) | Possible other identifier. | Identifier | |
Price list | 4 | X(1-10) | Current pricelist for current subscriber number. | PXString | |
Not used | 5 | ||||
Start date subscription | 6 | N(6) | Req | Date from when the subscription is active YYMMDD. | Date |
End date subscription | 7 | N(6) | Date when the subscription ends YYMMDD. | Date | |
First product | 8 | X(1-5) | Code for the first product for current subscriber number. | Identifier | |
Start date P1 | 9 | N(6) | 1) | Date from when product1 should be billed. | Date |
End date P1 | 10 | N(6) | 2) | Date when product1 ends. | Date |
Second product | 11 | X(1-5) | Code for the second product for current subscriber number | Identifier | |
Start date P2 | 12 | N(6) | 1) | Date from when product2 should be billed. | Date |
End date P2 | 13 | N(6) | 2) | Date when product2 ends. | Date |
Next product … | Up to 35 products can be entered. |
Examples of the record appearance:
C2 record with product without end date:
C2;0812345678;;A1;;160212;;P1;160215;;P2;160210;
C2 record with price list product:
C2;0812345678;;;;160212;;P1;160215;;P2;160210;
C2 record with end date for product:
C2;0812345679;;A2;;150502;160205;P1;150215;160205;P2;150210;160205
1) If there are products, start date is obligatory.
2) If the subscription has an end date, the products must also have an end date, no later than the subscriptions end date.
Subscription details can occur for different customers if the subscription periods (controlled with start and end date, position 6 and 7) do not overlap.
MO - Mobile Telephone record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | MO | Mobile telephone information about a subscription. Max one per IMSI number. | ||
IMSI number | 2 | N(1-15) | Req | The subscription’s IMSI number, which identifies the subscription in the CDR files. | Identifier |
Subscriber number | 3 | X(1-15) | Req | The customer’s mobile subscription number. | Identifier |
Not used | 4 | ||||
Start date subscription | 5 | N(6) | Req | Date when the subscription starts. Format: YYMMDD. | Date |
End date subscription | 6 | N(6) | Date when the subscription ends. Format: YYMMDD. | Date | |
Price list | 7 | X(10) | Current mobile price list for subscriber number in field 3. | PXString | |
First product | 8 | X(1-5) | Code for the first product for current subscriber number. | Identifier | |
Start date P1 | 9 | N(6) | 1) | Date from when product1 should be billed. | Date |
End date P1 | 10 | N(6) | 2) | Date when product1 ends. | Date |
Second product | 11 | X(1-5) | Code for the second product for current subscriber number. | Identifier | |
Start date P2 | 12 | N(6) | 1) | Date from when product2 should be billed. | Date |
End date P2 | 13 | N(6) | 2) | Date when product2 ends. | Date |
Next product. | Up to 35 products can be entered. |
Examples of the record appearance:
MO record with product without end date:
MO;12345678901235;070123123;;160201;;A1;P1;160215;;P2;160810;
MO record with end date for product:
MO;12345678901234;07092345678;;160501;;A1;P1;160215;;P2;160210;160831
MO record without product:
MO;12345678901234;07092345678;;160501;;A1
1) If there are products, a start date is obligatory.
2) If the subscription has an end date, the products must also have an end date.
C3 - Special price record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | C3 | Special price information at customer level. | ||
Destination code | 2 | X(1-15) | Req | Destination code must be found in the DP file. | DestinationCode |
Special price | 3 | N(3).N(3) | Req | The special price for mentioned destination in field 2 | SpecialPrice |
Start date | 4 | N(6) | Req | Date from when the special price will be valid. | Date |
End date | 5 | N(6) | Date until the special price will be valid. | Date |
Example of the record appearance:
C3;45;1.035;160601;
If the end date is empty, the price is considered to apply until further notice.
The start date must be (earlier) than the end date.
The same destination code can only occur once per customer.
C6 - Call type price record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | C6 | Call type price info at customer level. | ||
Call type | 2 | N(3) | Req | Relates to the call types which have been set up for the company | CallType |
Prices | 3 | N(4).N(3) | Req | Price for all calls belonging to call types mentioned in field 2. | Price |
Start date | 4 | N(6) | Req | Date from when the price will applied | Date |
End date | 5 | N(6) | Date until the special price will be applied.. | Date |
Example of the record appearance:
C6;19;10.000;160601;
If no date is given, the price will apply until further notice.
The start date must be (earlier) than the end date.
C7 - Family and friends record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | C7 | Information about family and friends’ number. | ||
Subscriber number | 2 | X(1-15) | Req | The customer’s subscription number. | Identifier |
B number 1 | 3 | X(1-15) | Req | Family and friends no 1. | PXNameAddressString |
B number 2-10 | 4-12 | X(1-15) | Family and friends no 2-10. | PXNameAddressString |
Example of the record appearance:
C7;08123456;070112233;073112233
An MO record or C2 record must contain the subscriber number mentioned in field 2.
PR - Product record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | PR | Information about recurring products at customer level. Max one record per customer. | ||
Product 1 | 2 | X(1-5) | Req | Code for product 1. | Identifier |
Start date | 3 | N(6) | Req | Date from when the product will be valid. | Date |
End date | 4 | N(6) | Date when the product ends. | Date | |
Product 2 | 5 | X(1-5) | Code for product 2. | Identifier | |
Start date | 6 | N(6) | 1) | Date from when the product will be valid. | Date |
End date | 7 | N(6) | Date when the product ends. | Date | |
Product n | up to a maximum of 35 products per customer. |
Example of the record appearance:
PR;A39;160601;160815;A40;160615;
1) If there are products, the start date is obligatory.
The start date must be (earlier) than the end date.
No more separators are permitted after the position for the end date on the last product. See the example above.
B3 - Special discount record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | B3 | Special discount information at customer level. Max one per destination code and customer. | ||
Destination code | 2 | X(1-15) | Req | Destination code must be found in the DP file. | DestinationCode |
Special discount | 3 | N(3).N(2) | Req | Discount in percent e.g. 23.00. | Discount |
Start date | 4 | N(6) | Req | Date from when the special discount will be valid. | Date |
End date | 5 | N(6) | Date until the special discount will be valid. | Date |
Example of the record appearance:
B3;45;23.00;160601;
If the end date is empty, the discount is considered to apply until further notice.
The start date must be (earlier) than the end date.
The discount can be calculated on minute price, or minute price plus the start fee for the given destination.
B4 - Call type discount record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | B4 | Call type discount information at customer level. Max one per call type and customer. | ||
Call type | 2 | N(3) | Req | Relates to the call types which have been set up for the company | CallType |
Discount | 3 | N(3).N(2) | Req | Discount in percent e.g. 23.29. | Discount |
Start date | 4 | N(6) | Req | Date from when the discount will be valid. | Date |
End date | 5 | N(6) | Date until the discount will be valid. | Date |
Examples of the record appearance:
B4;35;5.00;161004
B4;40;15.00;161004;161101
Different discount rates are permitted for the same call types if the periods do not overlap.
N - Electronic-message record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | N | E-message information at customer level. Max one per customer. | ||
Enote | 2 | N(2) | Distribution method for message, code issued by PayEx. | ENoteDistributionCode | |
Choice of text | 3 | N(2) | Default = 1 | Interval:0-99 |
Example of the record appearance:
N;81;1
EDI - Electronic invoice distribution B2B
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | EDI | Electronic distribution details. Max one record per customer. | ||
Van | 2 | X(1-255) | Name of VAN -Company | PXString | |
InterChangeRecipient | 3 | X(1-13) | General buyers GLN-number (EAN) | PXString | |
SellerId | 4 | X(1-13) | Req | The Seller´s GLN -number (EAN) | PXString |
BuyerId | 5 | X(1-13) | Req | The Buyers GLN -number (EAN) | PXString |
InvoiceAddressee | 6 | X(1-255) | Invoice Addressee | PXString | |
InvoiceRecipient | 7 | X(1-255) | Invoice Recipient | PXString | |
DeliveryAddressee | 8 | X(1-255) | Delivery Addressee | PXString | |
DeliveryRecipient | 9 | X(1-255) | Delivery Recipient | PXString | |
InvoiceReference | 10 | X(1-255) | Invoice Reference | PXString | |
AgreementReference | 11 | X(1-255) | Agreement Reference | PXString | |
BuyerReference1 | 12 | X(1-255) | Buyer Reference 1 | PXString | |
BuyerReference2 | 13 | X(1-255) | Buyer Reference 2 | PXString |
Example of the record appearance:
EDI;INEXCHANGE;7369167123;73500042123;736556123;;Company Ltd;;;54550123;54550002;;
SI - Subscription information record
Note: This record type should not be combined with AL record
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | SI | Subscription Information record type | ||
Subscriber number | 2 | X(1-15) | Req | Subscription number/identifier | Identifier |
Alias | 3 | X(1-100) | Req | Alias replaces subscriber number on invoice | PXNameAddressString |
Current subscription/price plan description | 4 | X(1-100) | To be used only for presentation on invoice | PXString | |
Sort order | 5 | N(2) | Req | Sort order value, used for ordering subscriptions on the invoice if there are multiple subscriptions | Interval:0-99 |
Only one record (SI) is permitted per subscription number.
Examples of the record appearance:
SI;070123456;070-123456 - Bengt Bengtsson;Subscription ABC;1
SI;070123457;070-123457 - Blenda Bengtsson;Subscription CDE;2
S - Trailer
Field name | Field no | Format | Type | Description | Character check |
---|---|---|---|---|---|
Transaction type | 1 | S | Req | Final record. The last record in the file | |
Number of records | 2 | N(1-15) | Req | The total of number of records in the file including the header and the trailer record. | Number |
Number of customers | 3 | N(1-10) | Req | The total of number of customer records in the file. | Number |
Example of the record appearance:
S;13;3
Explanations / other
Examples of appearance
H;1234;Company;161213;1220
K;123456789;Nils Nilsson;121212-1212;08-12345678
A;;Street 9;123 45;Svedala;test@test.se
E;14;;PG;;
C1;;23.59;4;;af-123;;;;;;;;
C2;0812345678;;A1;;160212;;P1;160215;;P2;160210;
C2;0812345679;;A2;;160102;160205;P1;160215;160805;P2;160210;160805
MO;12345678901234;07092345678;;160501;;A1;P1;160215;;P2;160210;
MO;12345678901235;070123123;;160201;;A2;P1;160215;;P2;160210;
C3;4523;1.035;160601;
C3;4599;1.035;160601;160801
C6;19;1.035;160601;
C7;08123456;070112233;073112233;
PR;A39;160101;160215;A40;160115;
B3;45;23.29;160601;
B3;46;23.30;160801;
B4;19;10.00;160801;
EDI;INEXCHANGE;7369167123;73500042123;736556123;;Company Ltd;;;54550123;54550002;;
SI;070123456;070-123456 - Bengt Bengtsson;Subscription ABC;1
SI;070123457;070-123457 - Blenda Bengtsson;Subscription CDE;2
S;21;1
Regular Expressions
Identifier
- [a-zA-Z0-9]*
PXString
- [a-zA-Z0-9_:!"#<>=?\[\]@{}´ %-/À-ÖØ-öø-ú]*
PXNameAddressString
- [a-zA-Z0-9À-ɏЀ-ӿḀ-ỿ_:!;"#<>=?\[\]@{}´ %'-/&]*
ZipCode
- [A-Z0-9\-]+
- [^@]+@[^\.]+\..+
VatNumberType
- [A-Z]{2}.*
DestinationCode
- ^[a-zA-Z0-9@$]*$
CountryCode
- ISO-3166 standard
Enums and intervals
PXVatExemptionCode
”0”,”1”,”2”,”3”
Interval:0-99
”0” – ”99” (Number)
CallType
”1” – ”999”
SpecialPrice
“0.000 – 999.999”
Price
“0.000 – 9999.999”
PaymentMethod
“PG”, "BG", "BA”
VerifiedPayment
”0”,”1”
AliasType
”1”,”2”,”3”
CustomerStatus
”1”,”2”
BillingCycle
”1”,”2”,”3”,”6”,”8”,”9”
DiscountRate
Range from ”0.01” to ”99.99” with two decimal
Discount
Range from ”0.00” to ”100.00” with two decimal
BillType
”1”,”2”,”3”,”4”
InvoiceDistributionCode
”1”,”11”,”52”,”74”,”94”
Date
Valid date in format “YYMMDD” between date “700101” and date “371231”
Time
Valid time in format “HHMM”
ENoteDistributionCode
”81”
ProtectedIdentity
”0”,”1”
LegalStatus
”0”,”1”