Wiki source code of KUB

Last modified by Anders Göthberg on 2025/12/23 14:09
Show last authors
1 (% class="jumbotron" %)
2 (((
3 (% class="container" %)
4 (((
5 Processing KUB-files can be done 24/7 and immediately after processing the file a Response file will be created.
6
7 Please note that your Response files might only utilize and/or contain a subset of all elements described below.
8 )))
9 )))
10
11 ----
12
13
14 (% style="margin:0cm 0cm 6pt" %)
15 KUB file is a customerfile in CSV, and it is used to submit end-user information to PayEx billing. The KUB-file also contains subscriptions och products for end-users. Processing the KUB-files can be done 24/7 and immediately deliver resonse files after processing the file.
16
17 = Name convention =
18
19 KUB_<CompanyNumber>_<DateTime>_<(% style="font-size:14px" %)SEQNO(%%)>.DAT
20
21 (% border="1" %)
22 |=(% style="width: 371px;" %)Names Component|=(% style="width: 1121px;" %)Description
23 |(% style="width:371px" %)CompanyNumber|(% style="width:1121px" %)The company number in PayEx ledger system
24 |(% style="width:371px" %)DateTime|(% style="width:1121px" %)Date created in format YYYYMMDDHHMMSS
25 |(% style="width:371px" %)SEQNO|(% style="width:1121px" %)Unbroken serial number sequence.
26
27 **For example: **KUB_1234_20201001155511_1.DAT
28
29 The file is semicolon-separated.
30
31 (% id="HWhattoavoid" %)
32 == What to avoid ==
33
34 * You cannot use the same serial number more than once. In case something goes wrong during KUB processing, **you need to supply a new serial number - the next number in the number series you are using - when transferring the rectified file to PayEx**.
35
36 == Change log ==
37
38 (% border="1" %)
39 |=**Version**|=(% style="width: 166px;" %)**Date**|=(% style="width: 879px;" %)**Description**|=(% style="width: 328px;" %)**Created by**
40 |1.04|(% style="width:166px" %)2020-04-21|(% style="width:879px" %)Corrected file name included seconds|(% style="width:328px" %)Anders Göthberg
41 |1.05|(% style="width:166px" %)2021-04-20|(% style="width:879px" %)(((
42 Protected identity added to field 7 in C1 (field marked as “not used” in earlier versions)
43
44 ZIP code, in A -record extended to 12 characters
45 )))|(% style="width:328px" %)(((
46 Daniel Olsson
47
48 )))
49 |1.06|(% style="width:166px" %)2022-09-27|(% style="width:879px" %)Legal status added to field 10 in C1 (field marked as “not used” in earlier versions)|(% style="width:328px" %)(((
50 Anders Göthberg
51 )))
52 |(((
53
54
55 1.07
56 )))|(% style="width:166px" %)2022-11-17|(% style="width:879px" %)(((
57 Extended address record for C/O address and street address field 2 and 3 in A record from 1-35 to 1-72.
58
59 Extended datatype PXNameAddressString with diacritical and cyrillic characters.
60 )))|(% style="width:328px" %)Daniel Engström
61 |1.08|(% style="width:166px" %)2025-05-27|(% style="width:879px" %)Change "Field name" and "Character check" in** C:1 -record for Field 5 and Field 12**.
62 Field 5 changed name from "Customer type" to "Legal Entity" to support setup for "Deviating invoice reminder fee for Corporate customers i claim process".
63 Field 12 changed from "Not used" to "Customer category" to support segmentation on customer level for ex. reporting from PayEx system.|(% style="width:328px" %)
64
65 =
66 General information and explanation of records =
67
68 Customerfile to Billing (KUB) is used to submit end-user information to the PayEx Billing System. KUB contains the end customer's customer information together with all of the end customer's subscriptions and products to be processed in the PayEx Billing System.
69
70 The PayEx Billing System processes and stores all correct customers. Incorrect customers will be returned in a detailed error file.
71
72 Updated customers have to be sent in its entirety. The sending party sends a total snapshot of a customer’s data to be processed in the Billing System.
73 If any of the customer's information, for example a subscription not has send it will be deleted in the Billing System.
74
75 Processing KUB files can be done 24/7 and response files will be delivered immediately after processing KUB files.
76
77 === Implementation ===
78
79 Implementation of KUB requires a complete file with all customers. Otherwise it is sufficient to only send updated customers.
80
81 === GDPR (General Data Protection Regulation) ===
82
83 Inactivating a customer can be done by using record C1, field 8 (CustomerStatus). Default is the value = 2 (Active). For inactive value 1 is used.
84
85 The requirement to inactivate a customer is that the customers subscriptions are not active and that all products and usage has been billed.
86
87 As soon as a customer has been send with value 1 (Inactive) no information regarding this customer will be available in any report or api. A final removal of the customers information will be made after x days, where the recommendation is to use the default of 40 days. Within this period it´s possible to reactivate the customer again.This can be done by sending value Active in the customerstatus
88
89 === Restriction invoice period of recurring products ===
90
91 (% class="wikigeneratedid" %)
92 PayEx Billing has a restriction for invoice period of recurring products (record C2, MO and PR) to a maximum of 24 historical month.
93
94 == Response files ==
95
96 If the file contains format errors a general error file will be produced.
97
98 If the file format is correct and the file contains correct and incorrect customers an error file with filename (BERR010..ErrorlogKund) and a receipt file (BRCP010..ReceiptCustomerfile) will be produced.
99
100 If the file format is correct and the file contains only correct customers no error file will be produced, only a receipt file will be produced.
101
102 === Receipt and Error -files ===
103
104 ==== Text format ====
105
106 [[Receipt and Error -file example>>doc:Main.Invoicing.billing.technical-reference.Billing File.Costumer information.2 KUB xml.Example Error file KUB.Text format.WebHome]]
107
108 ==== CSV format ====
109
110 [[Error log (BERR010)>>doc:Main.Invoicing.billing.technical-reference.Billing File.Costumer information.2 KUB xml.Example Error file KUB.Error log (BERR010).WebHome]]
111
112 [[Receipt (BRCP010)>>doc:Main.Invoicing.billing.technical-reference.Billing File.Costumer information.2 KUB xml.Example Error file KUB.Receipt (BRCP010).WebHome]]
113
114 = Record Description =
115
116 == H - Header ==
117
118 (% border="1" %)
119 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
120 |Transaction type|1|H|Req|First record in the file|
121 |Company number|2|N(5)|Req|Company number issued by PayEx. Equal with Owner code in file name|Number
122 |Company name|3|X(1-40)|Req|Your company’s name.|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
123 |Date of creation|4|N(6)|Req|YYMMDD – The same date as in the file name.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
124 |Time of creation|5|N(4)|Req|HHMM – Time when the file was created.|[[Time>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HTime"]]
125
126 Example of the record appearance:
127
128 **H;1234;Company;161213;1220**
129
130 == K - Customer record ==
131
132 (% border="1" %)
133 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
134 |Transaction type|1|K|Req|Customer record. First record per customer.|
135 |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>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HIdentifier"]]
136 |Name|3|X(1-72)|Req|The customer’s name.|[[PXNameAddressString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXNameAddressString"]]
137 |Registration number|4|N(6)-N(4)'|*Req|(((
138 The customer’s **S**ocial **S**ecurity **N**umber /Corporate registration number
139
140 Validation of the SSN will be completed if country code has been set in field 7.
141
142 If field 7 is not used, validation will be done on the ledgers country code.
143
144 *If mediadistibutioncode is set to value 52 in combination with E-invoice B2B
145 )))|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
146 |Telno.|5|X(1-15)| |The customer’s contact telephone number.|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
147 |Language|6|X(2)| |The customer’s language on invoice. Contact PayEx for possibilities.|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
148 |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>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HCountryCode"]]
149
150 Example of the record appearance:
151
152 **K;1234567;Jan Berg;121212-1212;08-1234567**
153
154 == A - Address record ==
155
156 (% border="1" %)
157 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
158 |Transaction type|1|A|Req|The address record follows the customer record (K).|
159 |C/O address|2|X(1-72)| |“Care-of address”.|[[PXNameAddressString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXNameAddressString"]]
160 |Street address|3|X(1-72)| |The customer’s street address.|[[PXNameAddressString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXNameAddressString"]]
161 |ZIP code|4|X(4-12)|Req|(((
162 The customer’s ZIP code.
163
164 For a Zip code outside Sweden requires a country code according to ISO-1366 standard. E.g. NO-3445
165
166 Nordic countries validation is done if it is a valid zip code
167 )))|[[ZipCode>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HZipCode"]]
168 |Postal address|5|X(1-27)|Req|The customer’s postal address.|[[PXNameAddressString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXNameAddressString"]]
169 |E-mail address|6|X(6-60)|*Req|(((
170 The customer’s e-mail address.
171
172 *If “Media distribution” = 11 (C1 -record, field 9)
173
174 or “ENoteDistributionMethod” = 81 (N record, field 2)
175 )))|[[Email>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HEmail"]]
176
177 Example of the record appearance:
178
179 **A;;Gatan 9;SE-12345;Svedala;test@test.se**
180
181 == MB - VAT-exemption record ==
182
183 (% border="1" %)
184 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
185 |Transaction type|1|MB| |(((
186 Billing method concerning tax regulations
187
188 Max one per customer
189 )))|
190 |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>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXVatExemptionCode"]]
191 |VAT number|3|X(7-14)|Req|Used for reverse tax liability (VATNO).|[[VatNumberType>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HVatNumberType"]]
192 |Authorisation code|4|X(1-35)| |The authorisation code can be shown on the invoice as the approved VAT type.|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
193
194 Example of the record appearance:
195
196 **MB;1;SE556677234501;**
197
198 == E - Extra record ==
199
200 (% border="1" %)
201 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
202 |Transaction type|1|E| |Extra record. Max one per customer.|
203 |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>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HInterval:0-99"]]
204 |//Not used//|3| | | |
205 |Payment Method|4|X(2)| |Only Payment Method PG or BG available for new customers|[[PaymentMethod>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPaymentMethod"]]
206 |//Not used//|5| | | |
207 |//Not used//|6| | | |
208 |Verified payment|7|N(1)| |(((
209 Not direct debit = 0 (default), direct debit = 1.
210
211 Contact PayEx for possibilities.
212 )))|[[VerifiedPayment>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HVerifiedPayment"]]
213
214 Example of the record appearance:
215
216 **E;14;;BG;;;0**
217
218 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.
219
220 == AL - Alias record ==
221
222 (% border="1" %)
223 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
224 |Transaction type|1|AL| |Alias record|
225 |Alias Type|2|X(2)|Req|(((
226 1 = Subscription number + Alias
227
228 2 = Cost centre grouping, Alias replaces subscription no.
229
230 3 = Alias replaces subscription Number, also applies for specification files
231 )))|[[AliasType>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HAliasType"]]
232 |Subscriber number|3|X(1-15)|Req|The customer’s subscription number from C2 -record, field 2 or MO -record, field 3|[[Identifier>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HIdentifier"]]
233 |Alias|4|X(1-40)|Req|For Alias Type = 3, empty is permitted|[[PXNameAddressString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXNameAddressString"]]
234
235 Examples of the record appearance:
236
237 **AL;1;0812345678;Bengt Bengtsson**
238
239 **AL;2;0887654321;Accounts Department**
240
241 **AL;3;0707011000;Self service**
242
243 Only one alias record (AL) is permitted per subscription number.
244
245 == C1 - Billing record ==
246
247 (% border="1" %)
248 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
249 |Transaction type|1|C1|Req|Billing information. One record per customer.|
250 |Billing cycle|2|N(1)| |(((
251 Billing frequency determines how often the invoice is sent.
252
253 1,2,3,6 = every 1,2,3,6 month
254
255 8 = every 12 months
256
257 9 = Stop, no invoice.
258
259 If no value is entered, the company’s default value will be applied.
260 )))|[[BillingCycle>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HBillingCycle"]]
261 |Discount rate|3|N(2).N(2)| |Total discount on the invoice in percent, e.g. 23.00|[[DiscountRate>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDiscountRate"]]
262 |Bill type|4|N(1)|Req|(((
263 Invoice type describes the level of detail on the invoice.
264
265 1 = Invoice
266
267 2 = Invoice and summary
268
269 3 = Invoice and specification
270
271 4 = Invoice, summary and specification
272 )))|[[BillType>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HBillType"]]
273 |Legal Entity|5|X(1)| |(((
274 Legal Entity can for example be used to set up deviating invoice reminder -fee for corporate customers in claim process.
275
276 B=Corporate legal entity
277
278 P=Private
279 )))|[[LegalEntity>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HLegalEntity"]]
280 |Retailer number|6|X(1-35)| |Retailer number can be used to generate billing statistics.|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
281 |Protected Identity|7|N(1)| |Value 0 = Normal, Value 1 = Protected Identity|[[ProtectedIdentity>>doc:Main.Invoicing.billing.technical-reference.Costumer information.2 KUB xml.WebHome||anchor="HProtectedIdentity"]]
282 |Customer status|8|X(2)| |(((
283 1 = Inactive customer
284
285 2 or empty (default) = Active customer.
286 )))|[[CustomerStatus>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HCustomerStatus"]]
287 |Media distribution|9|X(2)| |(((
288 Electronic billing = code issued by PayEx.
289
290 1 = Paper
291
292 11 = E-mail
293
294 52 = E-invoice B2B, = true : then [[EDI-post>>path:#_Electronic_invoice_distribution]] = Obl.
295
296 74 = Archiving only. Ex: company with a customer portal and/or my pages
297
298 94 = E-invoice private. Can only be updated by end customer through its bank
299 )))|[[InvoiceDistributionCode>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HInvoiceDistributionCode"]]
300 |Legal Status|10|N(1)| |(((
301 Value 0 or empty/null = Active/Default
302
303 Value 1 = Deceased
304 )))|[[LegalStatus>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HLegalStatus"]]
305 |Chain number|11|X(1-15)| |Connects customers on customer number level. Used for internal rating.|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
306 |Customer category|12|X(1-10)| |Category for reporting from PayEx systems. Contact PayEx for possibilities|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
307 |Product group discount|13|X(2)|*Req|Code that relates to PayEx discount structure. Contact PayEx for possibilities|[[Interval:0-99>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HInterval:0-99"]]
308 |Product group discount rate|14|N(2).N(2)|*Req|Discount rate for the product group discount in percent, e.g. 25.00.|[[DiscountRate>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDiscountRate"]]
309 |(((
310 Inter Company
311
312 Code
313 )))|15|X(1-50)| |Company group code|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
314 |Departments|16|N(2)| |Enables statistics at department level.|[[Interval:0-99>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HInterval:0-99"]]
315
316 Example of the record appearance:
317
318 **C1;;23.00;4;P;af-123;;2;11;;;;;;;**
319
320 **C1;;23.00;4;P;af-123;;2;11;;;B123;;;666;**
321
322 Billing frequency is only used when invoices are issued on a regular basis. If the queue limits are applicable, leave this field empty.
323
324 *Obl. If one is used, the other is obligatory.
325
326 == C2 - Fixed Telephone record ==
327
328 (% border="1" %)
329 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
330 |Transaction type|1|C2| |(((
331 Fixed telephone information at subscription level.
332
333 Max one per subscriber number.
334 )))|
335 |Subscriber number|2|X(1-15)|Req|One of the customer’s active subscriber numbers.|[[Identifier>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HIdentifier"]]
336 |CLI code|3|X(1-15)| |Possible other identifier.|[[Identifier>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HIdentifier"]]
337 |Price list|4|X(1-10)| |Current pricelist for current subscriber number.|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
338 |//Not used//|5| | | |
339 |Start date subscription|6|N(6)|Req|Date from when the subscription is active YYMMDD.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
340 |End date subscription|7|N(6)| |Date when the subscription ends YYMMDD.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
341 |First product|8|X(1-5)| |Code for the first product for current subscriber number.|[[Identifier>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HIdentifier"]]
342 |Start date P1|9|N(6)|1)|Date from when product1 should be billed.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
343 |End date P1|10|N(6)|2)|Date when product1 ends.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
344 |Second product|11|X(1-5)| |Code for the second product for current subscriber number|[[Identifier>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HIdentifier"]]
345 |Start date P2|12|N(6)|1)|Date from when product2 should be billed.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
346 |End date P2|13|N(6)|2)|Date when product2 ends.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
347 |Next product …| | | |Up to 35 products can be entered.|
348
349 Examples of the record appearance:
350
351 //C2 record with product without end date~://
352
353 **C2;0812345678;;A1;;160212;;P1;160215;;P2;160210;**
354
355 //C2 record with price list product~://
356
357 **C2;0812345678;;;;160212;;P1;160215;;P2;160210;**
358
359 //C2 record with end date for product~://
360
361 **C2;0812345679;;A2;;150502;160205;P1;150215;160205;P2;150210;160205**
362
363 1) If there are products, start date is obligatory.
364
365 2) If the subscription has an end date, the products must also have an end date, no later than the subscriptions end date.
366
367 Subscription details can occur for different customers if the subscription periods (controlled with start and end date, position 6 and 7) do not overlap.
368
369 == MO - Mobile Telephone record ==
370
371 (% border="1" %)
372 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
373 |Transaction type|1|MO| |Mobile telephone information about a subscription. Max one per IMSI number.|
374 |IMSI number|2|N(1-15)|Req|The subscription’s IMSI number, which identifies the subscription in the CDR files.|[[Identifier>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HIdentifier"]]
375 |Subscriber number|3|X(1-15)|Req|The customer’s mobile subscription number.|[[Identifier>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HIdentifier"]]
376 |//Not used//|4| | | |
377 |Start date subscription|5|N(6)|Req|Date when the subscription starts. Format: YYMMDD.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
378 |End date subscription|6|N(6)| |Date when the subscription ends. Format: YYMMDD.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
379 |Price list|7|X(10)| |Current mobile price list for subscriber number in field 3.|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
380 |First product|8|X(1-5)| |Code for the first product for current subscriber number.|[[Identifier>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HIdentifier"]]
381 |Start date P1|9|N(6)|1)|Date from when product1 should be billed.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
382 |End date P1|10|N(6)|2)|Date when product1 ends.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
383 |Second product|11|X(1-5)| |Code for the second product for current subscriber number.|[[Identifier>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HIdentifier"]]
384 |Start date P2|12|N(6)|1)|Date from when product2 should be billed.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
385 |End date P2|13|N(6)|2)|Date when product2 ends.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
386 |Next product.| | | |Up to 35 products can be entered.|
387
388 Examples of the record appearance:
389
390 //MO record with product without end date~://
391
392 **MO;12345678901235;070123123;;160201;;A1;P1;160215;;P2;160810;**
393
394 //MO //record// with end date for product~://
395
396 **MO;12345678901234;07092345678;;160501;;A1;P1;160215;;P2;160210;160831**
397
398 //MO //record// without product~://
399
400 **MO;12345678901234;07092345678;;160501;;A1**
401
402 1) If there are products, a start date is obligatory.
403
404 2) If the subscription has an end date, the products must also have an end date.
405
406 == ==
407
408 == C3 - Special price record ==
409
410 (% border="1" %)
411 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
412 |Transaction type|1|C3| |Special price information at customer level.|
413 |Destination code|2|X(1-15)|Req|Destination code must be found in the DP file.|[[DestinationCode>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDestinationCode"]]
414 |Special price|3|N(3).N(3)|Req|The special price for mentioned destination in field 2|[[SpecialPrice>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HSpecialPrice"]]
415 |Start date|4|N(6)|Req|Date from when the special price will be valid.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
416 |End date|5|N(6)| |Date until the special price will be valid.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
417
418 Example of the record appearance:
419
420 **C3;45;1.035;160601;**
421
422 If the end date is empty, the price is considered to apply until further notice.
423
424 The start date must be (earlier) than the end date.
425
426 The same destination code can only occur once per customer.
427
428 == C6 - Call type price record ==
429
430 (% border="1" %)
431 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
432 |Transaction type|1|C6| |Call type price info at customer level.|
433 |Call type|2|N(3)|Req|Relates to the call types which have been set up for the company|[[CallType>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HCallType"]]
434 |Prices|3|N(4).N(3)|Req|Price for all calls belonging to call types mentioned in field 2.|[[Price>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPrice"]]
435 |Start date|4|N(6)|Req|Date from when the price will applied|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
436 |End date|5|N(6)| |Date until the special price will be applied..|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
437
438 Example of the record appearance:
439
440 **C6;19;10.000;160601;**
441
442 If no date is given, the price will apply until further notice.
443
444 The start date must be (earlier) than the end date.
445
446 == C7 - Family and friends record ==
447
448 (% border="1" %)
449 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
450 |Transaction type|1|C7| |Information about family and friends’ number.|
451 |Subscriber number|2|X(1-15)|Req|The customer’s subscription number.|[[Identifier>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HIdentifier"]]
452 |B number 1|3|X(1-15)|Req|Family and friends no 1.|[[PXNameAddressString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXNameAddressString"]]
453 |B number 2-10|4-12|X(1-15)| |Family and friends no 2-10.|[[PXNameAddressString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXNameAddressString"]]
454
455 Example of the record appearance:
456
457 **C7;08123456;070112233;073112233**
458
459 An MO record or C2 record must contain the subscriber number mentioned in field 2.
460
461 == PR - Product record ==
462
463 (% border="1" %)
464 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
465 |Transaction type|1|PR| |Information about recurring products at customer level. Max one record per customer.|
466 |Product 1|2|X(1-5)|Req|Code for product 1.|[[Identifier>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HIdentifier"]]
467 |Start date|3|N(6)|Req|Date from when the product will be valid.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
468 |End date|4|N(6)| |Date when the product ends.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
469 |Product 2|5|X(1-5)| |Code for product 2.|[[Identifier>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HIdentifier"]]
470 |Start date|6|N(6)|**1)**|Date from when the product will be valid.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
471 |End date|7|N(6)| |Date when the product ends.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
472 |Product n| | | |up to a maximum of 35 products per customer.|
473
474 Example of the record appearance:
475
476 **PR;A39;160601;160815;A40;160615;**
477
478 **1)** If there are products, the start date is obligatory.
479
480 The start date must be (earlier) than the end date.
481
482 No more separators are permitted after the position for the end date on the last product. See the example above.
483
484 == B3 - Special discount record ==
485
486 (% border="1" %)
487 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
488 |Transaction type|1|B3| |Special discount information at customer level. Max one per destination code and customer.|
489 |Destination code|2|X(1-15)|Req|Destination code must be found in the DP file.|[[DestinationCode>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDestinationCode"]]
490 |Special discount|3|N(3).N(2)|Req|Discount in percent e.g. 23.00.|[[Discount>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDiscount"]]
491 |Start date|4|N(6)|Req|Date from when the special discount will be valid.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
492 |End date|5|N(6)| |Date until the special discount will be valid.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
493
494 Example of the record appearance:
495
496 **B3;45;23.00;160601;**
497
498 If the end date is empty, the discount is considered to apply until further notice.
499
500 The start date must be (earlier) than the end date.
501
502 The discount can be calculated on minute price, or minute price plus the start fee for the given destination.
503
504 == B4 - Call type discount record ==
505
506 (% border="1" %)
507 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
508 |Transaction type|1|B4| |Call type discount information at customer level. Max one per call type and customer.|
509 |Call type|2|N(3)|Req|Relates to the call types which have been set up for the company|[[CallType>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HCallType"]]
510 |Discount|3|N(3).N(2)|Req|Discount in percent e.g. 23.29.|[[Discount>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDiscount"]]
511 |Start date|4|N(6)|Req|Date from when the discount will be valid.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
512 |End date|5|N(6)| |Date until the discount will be valid.|[[Date>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HDate"]]
513
514 Examples of the record appearance:
515 **B4;35;5.00;161004
516 B4;40;15.00;161004;161101**
517
518 Different discount rates are permitted for the same call types if the periods do not overlap.
519
520 == N - Electronic-message record ==
521
522 (% border="1" %)
523 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
524 |Transaction type|1|N| |E-message information at customer level. Max one per customer.|
525 |Enote|2|N(2)| |Distribution method for message, code issued by PayEx.|[[ENoteDistributionCode>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HENoteDistributionCode"]]
526 |Choice of text|3|N(2)| |Default = 1|[[Interval:0-99>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HInterval:0-99"]]
527
528 Example of the record appearance:
529
530 **N;81;1**
531
532 == EDI - Electronic invoice distribution B2B ==
533
534 (% border="1" %)
535 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
536 |Transaction type|1|EDI| |Electronic distribution details. Max one record per customer.|
537 |Van|2|X(1-255)| |Name of VAN -Company|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
538 |InterChangeRecipient|3|X(1-13)| |General buyers GLN-number (EAN)|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
539 |SellerId|4|X(1-13)|Req|The Seller´s GLN -number (EAN)|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
540 |BuyerId|5|X(1-13)|Req|The Buyers GLN -number (EAN)|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
541 |InvoiceAddressee|6|X(1-255)| |Invoice Addressee|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
542 |InvoiceRecipient|7|X(1-255)| |Invoice Recipient|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
543 |DeliveryAddressee|8|X(1-255)| |Delivery Addressee|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
544 |DeliveryRecipient|9|X(1-255)| |Delivery Recipient|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
545 |InvoiceReference|10|X(1-255)| |Invoice Reference|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
546 |AgreementReference|11|X(1-255)| |Agreement Reference|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
547 |BuyerReference1|12|X(1-255)| |Buyer Reference 1|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
548 |BuyerReference2|13|X(1-255)| |Buyer Reference 2|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
549
550 Example of the record appearance:
551
552 **EDI;INEXCHANGE;7369167123;73500042123;736556123;;Company Ltd;;;54550123;54550002;;**
553
554 == SI - Subscription information record ==
555
556 Note: This record type should not be combined with AL record
557
558 (% border="1" %)
559 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
560 |Transaction type|1|SI| |Subscription Information record type|
561 |Subscriber number|2|X(1-15)|Req|Subscription number/identifier|[[Identifier>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HIdentifier"]]
562 |Alias|3|X(1-100)|Req|Alias replaces subscriber number on invoice|[[PXNameAddressString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXNameAddressString"]]
563 |Current subscription/price plan description|4|X(1-100)| |To be used only for presentation on invoice|[[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
564 |Sort order|5|N(2)|Req|Sort order value, used for ordering subscriptions on the invoice if there are multiple subscriptions|[[Interval:0-99>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HInterval:0-99"]]
565
566 Only one record (SI) is permitted per subscription number.
567
568 Examples of the record appearance:
569
570 **SI;070123456;070-123456 - Bengt Bengtsson;Subscription ABC;1**
571
572 **SI;070123457;070-123457 - Blenda Bengtsson;Subscription CDE;2**
573
574 == S - Trailer ==
575
576 (% border="1" %)
577 |=**Field name**|=**Field no**|=**Format**|=**Type**|=**Description**|=**Character check**
578 |Transaction type|1|S|Req|Final record. The last record in the file|
579 |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
580 |Number of customers|3|N(1-10)|Req|The total of number of customer records in the file.|Number
581
582 Example of the record appearance:
583
584 **S;13;3**
585
586 = Explanations / other =
587
588 == Examples of appearance ==
589
590 H;1234;Company;161213;1220
591 K;123456789;Nils Nilsson;121212-1212;08-12345678
592 A;;Street 9;123 45;Svedala;test@test.se
593 E;14;;PG;;
594 C1;;23.59;4;;af-123;;;;;;;;
595 C2;0812345678;;A1;--;--160212;;P1;160215;;P2;160210;
596 C2;0812345679;;A2;;160102;160205;P1;160215;160805;P2;160210;160805
597 MO;12345678901234;07092345678;;160501;;A1;P1;160215;;P2;160210;
598 MO;12345678901235;070123123;;160201;;A2;P1;160215;;P2;160210;
599 C3;4523;1.035;160601;
600 C3;4599;1.035;160601;160801
601 C6;19;1.035;160601;
602 C7;08123456;070112233;073112233;
603 PR;A39;160101;160215;A40;160115;
604 B3;45;23.29;160601;
605 B3;46;23.30;160801;
606 B4;19;10.00;160801;
607 EDI;INEXCHANGE;7369167123;73500042123;736556123;;Company Ltd;;;54550123;54550002;;
608 SI;070123456;070-123456 - Bengt Bengtsson;Subscription ABC;1
609 SI;070123457;070-123457 - Blenda Bengtsson;Subscription CDE;2
610 S;21;1
611
612 = Regular Expressions =
613
614 == Identifier ==
615
616 * [a-zA-Z0-9]*
617
618 == PXString ==
619
620 * [a-zA-Z0-9_:!&quot;#&lt;&gt;=?\[\]@{}´ %-/À-ÖØ-öø-ú]*
621
622 == PXNameAddressString ==
623
624 * [a-zA-Z0-9À-ɏЀ-ӿḀ-ỿ_:!;&quot;#&lt;&gt;=?\[\]@{}´ %'-/&amp;]*
625
626 == ZipCode ==
627
628 * [A-Z0-9\-]+
629
630 == Email ==
631
632 * [^@]+@[^\.]+\..+
633 ** [[PXString>>doc:Main.billing.technical-reference.Costumer information.2 KUB xml.Record description.WebHome||anchor="HPXString"]]
634
635 == VatNumberType ==
636
637 * [A-Z]{2}.*
638
639 == DestinationCode ==
640
641 * ^[a-zA-Z0-9@$]*$
642
643 == CountryCode ==
644
645 * ISO-3166 standard
646
647 = Enums and intervals =
648
649 == PXVatExemptionCode ==
650
651 ”0”,”1”,”2”,”3”
652
653 == Interval:0-99 ==
654
655 ”0” – ”99” (Number)
656
657 == CallType ==
658
659 ”1” – ”999”
660
661 == SpecialPrice ==
662
663 “0.000 – 999.999”
664
665 == Price ==
666
667 “0.000 – 9999.999”
668
669 == PaymentMethod ==
670
671 “PG”, "BG", "BA”
672
673 == VerifiedPayment ==
674
675 ”0”,”1”
676
677 == AliasType ==
678
679 ”1”,”2”,”3”
680
681 == CustomerStatus ==
682
683 ”1”,”2”
684
685 == BillingCycle ==
686
687 ”1”,”2”,”3”,”6”,”8”,”9”
688
689 == DiscountRate ==
690
691 Range from ”0.01” to ”99.99” with two decimal
692
693 == Discount ==
694
695 Range from ”0.00” to ”100.00” with two decimal
696
697 == BillType ==
698
699 ”1”,”2”,”3”,”4”
700
701 == InvoiceDistributionCode ==
702
703 ”1”,”11”,”52”,”74”,”94”
704
705 == Date ==
706
707 Valid date in format “YYMMDD” between date “700101” and date “371231”
708
709 == Time ==
710
711 Valid time in format “HHMM”
712
713 == ENoteDistributionCode ==
714
715 ”81”
716
717 == ProtectedIdentity ==
718
719 ”0”,”1”
720
721 == LegalStatus ==
722
723 ”0”,”1”
724
725 == LegalEntity ==
726
727 ”F”,”P”