Wiki source code of CPI
Last modified by Anders Göthberg on 2021/04/15 10:45
1 | = Name convention = |
2 | |
3 | CPI_<CompanyNumber>_<DateTime>_<SEQNO>[Info].DAT |
4 | |
5 | |
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 |
12 | |
13 | **For example: CPI_99999_210102132603_1[XXXXXX].DAT** |
14 | |
15 | |
16 | (% id="HChangelog" %) |
17 | = Change log = |
18 | |
19 | (% border="1" %) |
20 | |=**Version**|=**Date**|=**Description**|=**Created by** |
21 | |1.0|2021-03-01|((( |
22 | Created document |
23 | )))|Daniel Olsson |
24 | |
25 | (% id="HGeneralinformationandexplanationofrecords" %) |
26 | = |
27 | General information and explanation of records = |
28 | |
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 | |
42 | ((( |
43 | == Format description == |
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 | |
50 | |
51 | ((( |
52 | = Record description = |
53 | |
54 | == H - Header record == |
55 | ))) |
56 | |
57 | (% border="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 | |
64 | == == |
65 | |
66 | == P - Provider record == |
67 | |
68 | (% border="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 | |
84 | == == |
85 | |
86 | == A - Access record == |
87 | |
88 | (% border="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 | |
99 | == == |
100 | |
101 | == T - Trailer record == |
102 | |
103 | (% border="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 | |
111 | == == |
112 | |
113 | == Record constraints == |
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 | |
121 | == == |
122 | |
123 | == Example == |
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 | |
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 |
136 | |
137 | |
138 | |
139 |