Record description

Records

H - Header

Field nameField noFormatTypeDescriptionCharacter check
Transaction type1HObl.First record in the file 
Company number2N(5)Obl.Company number issued by PayEx. Equal with Owner code in file nameNumber
Company name3X(1-40)Obl.Your company’s name.PXString
Date of creation4N(6)Obl.YYMMDD – The same date as in the file name.Date
Time of creation5N(4)Obl.HHMM – Time when the file was created.Time

Example of the record appearance:

H;1234;Company;161213;1220

K - Customer record

Field nameField noFormatTypeDescriptionCharacter check
Transaction type1KObl.Customer record. First record per customer. 
Customer number2X(1-15)Obl.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
Name3X(1-72)Obl.The customer’s name.PXNameAddressString
Registration number4N(6)-N(4)*Obl

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.5X(1-15) The customer’s contact telephone number.PXString
Language6X(2) The customer’s language on invoice. Contact PayEx for possibilities.PXString
Country code for Registration number7X(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 nameField noFormatTypeDescriptionCharacter check
Transaction type1AObl.The address record follows the customer record (K). 
C/O address2X(1-35) “Care-of address”.PXNameAddressString
Street address3X(1-35) The customer’s street address.PXNameAddressString
ZIP code4X(4-9)Obl.

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 address5X(1-27)Obl.The customer’s postal address.PXNameAddressString
E-mail address6X(6-60)*Obl.

The customer’s e-mail address.

*If “Media distribution” = 11 (C1 -record, field 9)

or “ENoteDistributionMethod” = 81 (N record, field 2)

Email

Example of the record appearance:

A;;Gatan 9;SE-12345;Svedala;test@test.se

MB - VAT-exemption record

Field nameField noFormatTypeDescriptionCharacter check
Transaction type1MB 

Billing method concerning tax regulations

Max one per customer

 
VAT type2N(1) Type of VAT reporting, 0 = normal, 1 = reverse tax liability, 2 = No VAT (inside EU), 3 = No VAT (outside EU)PXVatExemptionCode
VAT number3X(7-14)Obl.Used for reverse tax liability (VATNO).VatNumberType
Authorisation code4X(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 nameField noFormatTypeDescriptionCharacter check
Transaction type1E Extra record. Max one per customer. 
Terms of payment2N(2) Number of days. For Sweden the minimum number of days is according Swedish law for now 7 days.Interval:0-99
Not used3    
Payment Method4X(2) Only Payment Method PG or BG available for new customersPaymentMethod
Not used5    
Not used6    
Verified payment7N(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 nameField noFormatTypeDescriptionCharacter check
Transaction type1AL Alias record 
Alias Type2X(2)Obl.

1 = Subscription number + Alias

2 = Cost centre grouping, Alias replaces subscription no.

3 = Alias replaces subscription Number, also applies for specification files

AliasType
Subscriber number3X(1-15)Obl.The customer’s subscription number from C2 -record, field 2 or MO -record, field 3Identifier
Alias4X(1-40)Obl.For Alias Type = 3, empty is permittedPXNameAddressString

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 nameField noFormatTypeDescriptionCharacter check
Transaction type1C1Obl.Billing information. One record per customer. 
Billing cycle2N(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 rate3N(2).N(2) Total discount on the invoice in percent, e.g. 23.00DiscountRate
Bill type4N(1)Obl.

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 type5X(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 number6X(1-35) Retailer number can be used to generate billing statistics.PXString
Not used7    
Customer status8X(2) 

1 = Inactive customer

2 or empty (default) = Active customer.

CustomerStatus
Media distribution9X(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
Not used10    
Chain number11X(1-15) Connects customers on customer number level. Used for internal rating.PXString
Not used12X(1-50)   
Product group discount13X(2)*Obl.Code that relates to PayEx discount structure. Contact PayEx for possibilitiesInterval:0-99
Product group discount rate14N(2).N(2)*Obl.Discount rate for the product group discount in percent, e.g. 25.00.DiscountRate

Inter Company

Code

15X(1-50) Company group codePXString
Departments16N(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 nameField noFormatTypeDescriptionCharacter check
Transaction type1C2 

Fixed telephone information at subscription level.

Max one per subscriber number.

 
Subscriber number2X(1-15)Obl.One of the customer’s active subscriber numbers.Identifier
CLI code3X(1-15) Possible other identifier.Identifier
Price list4X(1-10) Current pricelist for current subscriber number.PXString
Not used5    
Start date subscription6N(6)Obl.Date from when the subscription is active YYMMDD.Date
End date subscription7N(6) Date when the subscription ends YYMMDD.Date
First product8X(1-5) Code for the first product for current subscriber number.Identifier
Start date P19N(6)1)Date from when product1 should be billed.Date
End date P110N(6)2)Date when product1 ends.Date
Second product11X(1-5) Code for the second product for current subscriber numberIdentifier
Start date P212N(6)1)Date from when product2 should be billed.Date
End date P213N(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 nameField noFormatTypeDescriptionCharacter check
Transaction type1MO Mobile telephone information about a subscription. Max one per IMSI number. 
IMSI number2N(1-15)OblThe subscription’s IMSI number, which identifies the subscription in the CDR files.Identifier
Subscriber number3X(1-15)OblThe customer’s mobile subscription number.Identifier
Not used4    
Start date subscription5N(6)OblDate when the subscription starts. Format: YYMMDD.Date
End date subscription6N(6) Date when the subscription ends. Format: YYMMDD.Date
Price list7X(10) Current mobile price list for subscriber number in field 3.PXString
First product8X(1-5) Code for the first product for current subscriber number.Identifier
Start date P19N(6)1)Date from when product1 should be billed.Date
End date P110N(6)2)Date when product1 ends.Date
Second product11X(1-5) Code for the second product for current subscriber number.Identifier
Start date P212N(6)1)Date from when product2 should be billed.Date
End date P213N(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 nameField noFormatTypeDescriptionCharacter check
Transaction type1C3 Special price information at customer level. 
Destination code2X(1-15)Obl.Destination code must be found in the DP file.DestinationCode
Special price3N(3).N(3)Obl.The special price for mentioned destination in field 2SpecialPrice
Start date4N(6)Obl.Date from when the special price will be valid.Date
End date5N(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 nameField noFormatTypeDescriptionCharacter check
Transaction type1C6 Call type price info at customer level. 
Call type2N(3)Obl.Relates to the call types which have been set up for the companyCallType
Prices3N(4).N(3)Obl.Price for all calls belonging to call types mentioned in field 2.Price
Start date4N(6)Obl.Date from when the price will appliedDate
End date5N(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 nameField noFormatTypeDescriptionCharacter check
Transaction type1C7 Information about family and friends’ number. 
Subscriber number2X(1-15)Obl.The customer’s subscription number.Identifier
B number 13X(1-15)Obl.Family and friends no 1.PXNameAddressString
B number 2-104-12X(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 nameField noFormatTypeDescriptionCharacter check
Transaction type1PR Information about recurring products at customer level. Max one record per customer. 
Product 12X(1-5)Obl.Code for product 1.Identifier
Start date3N(6)Obl.Date from when the product will be valid.Date
End date4N(6) Date when the product ends.Date
Product 25X(1-5) Code for product 2.Identifier
Start date6N(6)1)Date from when the product will be valid.Date
End date7N(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 nameField noFormatTypeDescriptionCharacter check
Transaction type1B3 Special discount information at customer level. Max one per destination code and customer. 
Destination code2X(1-15)Obl.Destination code must be found in the DP file.DestinationCode
Special discount3N(3).N(2)Obl.Discount in percent e.g. 23.00.Discount
Start date4N(6)Obl.Date from when the special discount will be valid.Date
End date5N(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 nameField noFormatTypeDescriptionCharacter check
Transaction type1B4 Call type discount information at customer level. Max one per call type and customer. 
Call type2N(3)Obl.Relates to the call types which have been set up for the companyCallType
Discount3N(3).N(2)Obl.Discount in percent e.g. 23.29.Discount
Start date4N(6)Obl.Date from when the discount will be valid.Date
End date5N(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 nameField noFormatTypeDescriptionCharacter check
Transaction type1N E-message information at customer level. Max one per customer. 
Enote2N(2) Distribution method for message, code issued by PayEx.ENoteDistributionCode
Choice of text3N(2) Default = 1Interval:0-99

Example of the record appearance:

N;81;1

EDI - Electronic invoice distribution B2B

Field nameField noFormatTypeDescriptionCharacter check
Transaction type1EDI Electronic distribution details. Max one record per customer. 
Van2X(1-255) Name of VAN -CompanyPXString
InterChangeRecipient3X(1-13) General buyers GLN-number (EAN)PXString
SellerId4X(1-13)Obl.The Seller´s GLN -number (EAN)PXString
BuyerId5X(1-13)Obl.The Buyers GLN -number (EAN)PXString
InvoiceAddressee6X(1-255) Invoice AddresseePXString
InvoiceRecipient7X(1-255) Invoice RecipientPXString
DeliveryAddressee8X(1-255) Delivery AddresseePXString
DeliveryRecipient9X(1-255) Delivery RecipientPXString
InvoiceReference10X(1-255) Invoice ReferencePXString
AgreementReference11X(1-255) Agreement ReferencePXString
BuyerReference112X(1-255) Buyer Reference 1PXString
BuyerReference213X(1-255) Buyer Reference 2PXString

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 nameField noFormatTypeDescriptionCharacter check
Transaction type1SI Subscription Information record type 
Subscriber number2X(1-15)Obl.Subscription number/identifierIdentifier
Alias3X(1-100)Obl.Alias replaces subscriber number on invoicePXNameAddressString
Current subscription/price plan description4X(1-100) To be used only for presentation on invoicePXString
Sort order5N(2)Obl.Sort order value, used for ordering subscriptions on the invoice if there are multiple subscriptionsInterval: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 nameField noFormatTypeDescriptionCharacter check
Transaction type1SObl.Final record. The last record in the file 
Number of records2N(1-15)Obl.The total of number of records in the file including the header and the trailer record.Number
Number of customers3N(1-10)Obl.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\-]+

Email

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”

Created by David Persson on 2021/01/29 09:26