Wiki source code of CPI
Last modified by Anders Göthberg on 2021/04/15 10:45
5.1 | 1 | = Name convention = | |
4.1 | 2 | ||
6.1 | 3 | CPI_<CompanyNumber>_<DateTime>_<SEQNO>[Info].DAT | |
4.1 | 4 | ||
5 | |||
5.1 | 6 | (% border="1" %) | |
7 | |=Names Component|=Description | ||
8 | |CompanyNumber|The company number in PayEx ledger system | ||
9 | |DateTime|Date created in format YYYYMMDDHHMMSS | ||
10 | |SEQNO|Unbroken serial number sequence. | ||
11 | |Info|Provider specific code supplied by Payex | ||
4.1 | 12 | ||
6.1 | 13 | **For example: CPI_99999_210102132603_1[XXXXXX].DAT** | |
4.1 | 14 | ||
15 | |||
5.1 | 16 | (% id="HChangelog" %) | |
17 | = Change log = | ||
4.1 | 18 | ||
5.1 | 19 | (% border="1" %) | |
20 | |=**Version**|=**Date**|=**Description**|=**Created by** | ||
6.1 | 21 | |1.0|2021-03-01|((( | |
5.1 | 22 | Created document | |
23 | )))|Daniel Olsson | ||
24 | |||
25 | (% id="HGeneralinformationandexplanationofrecords" %) | ||
26 | = | ||
6.1 | 27 | General information and explanation of records = | |
5.1 | 28 | ||
4.1 | 29 | Due to regulations, premium services are obligated to present name and contact information of the service provider on the invoice. | |
30 | |||
31 | The purpose of the CPI file is to provide content provider information to the PayEx Billing system. | ||
32 | |||
33 | The content provider information data is an addition to the data sent in the CDRs. | ||
34 | |||
35 | In the CDR, the ID to a service provider is expected for premium services. | ||
36 | |||
37 | The data will be stored in one single source in the PayEx Billing system and may be used by all usage groups within a ledger. | ||
38 | |||
39 | Multiple ledgers can use information from this single source. The file should always be completed and contain all entries ever made for a certain provider code. | ||
40 | |||
41 | |||
6.1 | 42 | ((( | |
43 | == Format description == | ||
4.1 | 44 | ))) | |
45 | |||
46 | All fields are separated with semicolons ”;”. | ||
47 | |||
48 | The format field is written in the way that numerical values are written as N and alphanumerical characters are written as X. where ”n” is the maximum number of characters/digits or in certain cases number of characters that must exist. | ||
49 | |||
7.1 | 50 | ||
6.1 | 51 | ((( | |
52 | = Record description = | ||
4.1 | 53 | ||
6.1 | 54 | == H - Header record == | |
4.1 | 55 | ))) | |
56 | |||
6.1 | 57 | (% border="1" %) | |
4.1 | 58 | |**Field name**|**Field no.**|**Format**|**Type**|**Description** | |
59 | |Record type|1|H|Req.|Header record | ||
60 | |File provider code|2|X(15)|Req.|File provider specific code supplied by Payex | ||
61 | |File creation date|3|X(19)|Req.|Date on format yyyy-MM-dd HH:mm:ss | ||
62 | |Version|4|N(2)|Req.|File format version, currently 1 | ||
63 | |||
10.1 | 64 | == == | |
7.1 | 65 | ||
6.1 | 66 | == P - Provider record == | |
4.1 | 67 | ||
6.1 | 68 | (% border="1" %) | |
4.1 | 69 | |**Field name**|**Field no.**|**Format**|**Type**|**Description** | |
70 | |Record type|1|P|Req.|Provider | ||
71 | |Content provider id|2|X(15)|Req.|Unique identifier for a specific content provider | ||
72 | |Organization number|3|X(12)| |Organization number for the content provider | ||
73 | |Contact phone|4|X(60)| |Phone number to the content provider help center | ||
74 | |Contact email|5|X(30)| |Email address to the content provider help center | ||
75 | |Contact url|6|X(30)| |URL to the content provider help center | ||
76 | |VAT number|7|X(15)| |Swedish VAT registration number | ||
77 | |Legal name|8|X(50)| |Content provider company name | ||
78 | |Address line 1|9|X(55)| |Address | ||
79 | |Address line 2|10|X(55)| |Address cont. | ||
80 | |Zip code|11|X(16)| |Postal zip code | ||
81 | |City|12|X(30)| |City | ||
82 | |Country|13|X(30)| |Country | ||
83 | |||
10.1 | 84 | == == | |
4.1 | 85 | ||
6.1 | 86 | == A - Access record == | |
4.1 | 87 | ||
6.1 | 88 | (% border="1" %) | |
4.1 | 89 | |**Field name**|**Field no.**|**Format**|**Type**|**Description** | |
90 | |Record type|1|A|Req.|Access | ||
91 | |Content provider id|2|X(15)|Req.|Must be present in the provider section of the file | ||
92 | |Access Id|3|X(8)| |Unique identifier for a specific access | ||
93 | |B number|4|X(32)| |Phone number connected to the access | ||
94 | |Start date|5|X(19)|Req.|Valid-from date for the access, format yyyy-MM-dd HH:mm:ss | ||
95 | |End date|6|X(19)| |Valid-to date for the access, format yyyy-MM-dd HH:mm:ss | ||
96 | |Description|7|X(50)| |Textual description of the content | ||
97 | |Destination code|8|X(5)| |Destination Code for mapping to Payex DP-file | ||
98 | |||
10.1 | 99 | == == | |
4.1 | 100 | ||
6.1 | 101 | == T - Trailer record == | |
4.1 | 102 | ||
6.1 | 103 | (% border="1" %) | |
4.1 | 104 | |**Field name**|**Field no.**|**Format**|**Type**|**Description** | |
105 | |Record type|1|T|Req.|Trailer record | ||
106 | |Number of | ||
107 | provider records|2|N(8)|Req.|Number of provider records | ||
108 | |Number of | ||
109 | access records|3|N(8)|Req.|Number of access records | ||
110 | |||
10.1 | 111 | == == | |
7.1 | 112 | ||
6.1 | 113 | == Record constraints == | |
4.1 | 114 | ||
115 | Header- and Trailer-record are allowed only once. | ||
116 | |||
117 | Provider records are allowed any number of times and should be written directly after the header record. All Provider records should be written before any Access record. | ||
118 | |||
119 | Access records are allowed any number of times and should be written after the provider records. Please note that all access records must reference a valid provider record. | ||
120 | |||
10.1 | 121 | == == | |
7.1 | 122 | ||
6.1 | 123 | == Example == | |
4.1 | 124 | ||
125 | Please note that this is a very simple example using a one-to-one relationship between provider and access where Content Provider Id is the reference between the two | ||
126 | records. | ||
127 | |||
128 | File name: CPI_210101120000_1[XXXXXX].DAT | ||
129 | |||
9.1 | 130 | H;XXXXX;2021-02-01 12:00:00;1 | |
131 | P;P00234;5770523124;08-123456;contact@company.se;www.company.se;12378944;The Company;;;;; | ||
132 | P;P00235;5705231245;;customer.support@sales.se;www.sales.se;987445;Sales;;;;; | ||
133 | A;P00234;;;2008-01-01 00:00:00;;Ringtones; | ||
134 | A;P00235;;;2007-01-01 00:00:00;;Tunes; | ||
135 | T;2;2 | ||
4.1 | 136 | ||
137 | |||
138 | |||
139 |