Main.Invoicing.billing.technical-reference.Usage.CPI.CPI - CPI 
Page of - pēdējo reizi mainījis Anders Göthberg laiks 2021/04/15 10:45 
CPI 

Anders Göthberg

2021/04/15 10:45
Satura rādītājs
Name convention
Change log
General information and explanation of records
P - Provider record
A - Access record
T - Trailer record
Record constraints
Example

Name convention
CPI_<CompanyNumber>_<DateTime>_<SEQNO>[Info].DAT
Names Component | Description
CompanyNumber | The company number in PayEx ledger system
DateTime | Date created in format YYYYMMDDHHMMSS
SEQNO | Unbroken serial number sequence.
Info | Provider specific code supplied by Payex

Change log
1.0 | 2021-03-01 | Created document | Daniel Olsson

General information and explanation of records
Due to regulations, premium services are obligated to present name and contact information of the service provider on the invoice.
The purpose of the CPI file is to provide content provider information to the PayEx Billing system.
The content provider information data is an addition to the data sent in the CDRs.
In the CDR, the ID to a service provider is expected for premium services.
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.
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.
Format description
All fields are separated with semicolons ”;”.
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.
Record description
H - Header record
Record type | 1 | H | Req. | Header record
File provider code | 2 | X(15) | Req. | File provider specific code supplied by Payex
File creation date | 3 | X(19) | Req. | Date on format yyyy-MM-dd HH:mm:ss
Version | 4 | N(2) | Req. | File format version, currently 1
P - Provider record
Record type | 1 | P | Req. | Provider
Content provider id | 2 | X(15) | Req. | Unique identifier for a specific content provider
Organization number | 3 | X(12) | | Organization number for the content provider
Contact phone | 4 | X(60) | | Phone number to the content provider help center
Contact email | 5 | X(30) | | Email address to the content provider help center
Contact url | 6 | X(30) | | URL to the content provider help center
VAT number | 7 | X(15) | | Swedish VAT registration number
Legal name | 8 | X(50) | | Content provider company name
Address line 1 | 9 | X(55) | | Address
Address line 2 | 10 | X(55) | | Address cont.
Zip code | 11 | X(16) | | Postal zip code
City | 12 | X(30) | | City
Country | 13 | X(30) | | Country
A - Access record
Record type | 1 | A | Req. | Access
Content provider id | 2 | X(15) | Req. | Must be present in the provider section of the file
Access Id | 3 | X(8) | | Unique identifier for a specific access
B number | 4 | X(32) | | Phone number connected to the access
Start date | 5 | X(19) | Req. | Valid-from date for the access, format yyyy-MM-dd HH:mm:ss
End date | 6 | X(19) | | Valid-to date for the access, format yyyy-MM-dd HH:mm:ss
Description | 7 | X(50) | | Textual description of the content
Destination code | 8 | X(5) | | Destination Code for mapping to Payex DP-file
T - Trailer record
Record type | 1 | T | Req. | Trailer record

Number of
provider records

2

N(8)

Req.

Number of provider records

Number of
access records

3

N(8)

Req.

Number of access records

Record constraints
Header- and Trailer-record are allowed only once.
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.
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.
Example
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
records.
File name: CPI_210101120000_1[XXXXXX].DAT
H;XXXXX;2021-02-01 12:00:00;1
P;P00234;5770523124;08-123456;contact@company.se;www.company.se;12378944;The Company;;;;;
P;P00235;5705231245;;customer.support@sales.se;www.sales.se;987445;Sales;;;;;
A;P00234;;;2008-01-01 00:00:00;;Ringtones;
A;P00235;;;2007-01-01 00:00:00;;Tunes;
T;2;2