CDF3Overview 17 01
CDF3Overview 17 01
CDF3Overview 17 01
Overview
XML Data Format
26 April 2017
Notices
Following are policies pertaining to proprietary rights, trademarks, translations,
and details about the availability of additional information online.
Proprietary Rights
Trademark notices and symbols used in this document reflect the registration
status of MasterCard trademarks in the United States. Please consult with the
Customer Operations Services team or the MasterCard Law Department for the
registration status of particular product, program, or service names outside
the United States.
If you send or receive files from MasterCard you must review the following
documents describing the CDF 3 Layout:
NOTE
Thoroughly review all documents to gain an understanding of the CDF 3 XML file.
• The XSD file—The XML schema definition for the CDF file you will either
send to or receive from MasterCard. This file completely describes the
XML file.
• The html file—A more user friendly version of the CDF XSD (schema)
document.
• The change notification document—A listing of the specific changes
implemented in the.given specification
The inbound sample file (a sample CDF 3 file)—MasterCard recommends
that the sample file be used as a reference in your analysis and development
process.
NOTE
The content of the sample file is for demonstration purposes only and is
not representative of actual data.
• Outbound Samples—Outbound Cycle demonstrates the record types
anticipated after statementing, or the account has cycled. Outbound Mid
Cycle contains the daily portfolio information.
Common Data Format 3 Overview—XML Data Format 1
Introduction to the Common Data Format
NOTE
Please visit the Global Commercial Product Information Center on MasterCard
Connect to ensure you are using the most current specifications. If you are a
Third Party vendor or a new customer without MasterCard Connect access,
contact [email protected].
Not every field on every record must be populated, but every field for which
data can be obtained by the issuer/processor must be populated.
The CDF layout provides records to specify organizational entities and to
transmit transactions. Transactions require that the organization be specified
before they can be processed.
Example 1
<xs:element name="BillingType" type="BillingType" minOccurs="1"
maxOccurs="1"></xs:element>
This notation implies that the tag BillingType is required. There can be one and only
one entry for this tag.
Example 2
<xs:element name="ProcessingCorporateAccount" type="Id19Type" minOccurs="0"
maxOccurs="1"></xs:element>
This notation implies that the tag ProcessingCorporateAccount is not required. There
can be zero to one entry for this tag.
type = Attribute
Example 1
<xs:element name="AccountNumber" type="Id19Type" minOccurs="0"
maxOccurs="1"></xs:element>
The AccountNumber tag has a type of Id19Type. Find the definition of this type in
the CDFFileTransmission.xsd file.
<xs:simpleType name="Id19Type">
<xs:restriction base="xs:token">
<xs:minLength value="1"></xs:minLength>
<xs:maxLength value="19"></xs:maxLength>
</xs:restriction>
</xs:simpleType>
This Id19Type is a simple data type. In this example, the AccountNumber can have a
length between 1 and 19 characters inclusive.
Valid Example: <AccountNumber>549900000000000</AccountNumber>
Example 2
<xs:element name="TransactionDate" type="MasterCardDateType" minOccurs="1"
maxOccurs="1"></xs:element>
The TransactionDate tag has a type of MasterCardDateType. Find the definition of
this type in the CDFFileTransmission.xsd file.
<xs:simpleType name="MasterCardDateType">
<xs:restriction base="xs:date"></xs:restriction>
</xs:simpleType>
This MasterCardDateType is a simple data type. In this example, the TransactionDate
can be a valid date in the CCYY-MM-DD format.
Valid Example: <TransactionDate>2003-01-31</TransactionDate>
Example 3
<xs:element name="DebitOrCreditIndicator" type="SignCodeType" minOccurs="1"
maxOccurs="1"></xs:element>
The DebitOrCreditIndicator tag has a type of SignCodeType. Find the definition of
this type in the CDFFileTransmission.xsd file.
<xs:simpleType name="SignCodeType">
<xs:restriction base="xs:token">
<xs:enumeration value="C"></xs:enumeration>
<xs:enumeration value="D"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
This SignCodeType is a simple data type with a restriction (list of acceptable values).
In this example, the DebitOrCreditIndicator tag can only contain either a C or a D.
Any other values will be rejected.
Valid Example: <DebitOrCreditIndicator>D</DebitOrCreditIndicator>
Example 4
<xs:element name="AmountInOriginalCurrency" type="CurrencyAmountType"
minOccurs="1" maxOccurs="1"></xs:element
The AmountInOriginalCurrency tag has a type of CurrencyAmountType. Find the
definition of this type in the CDFFileTransmission.xsd file.
<xs:complexType name="CurrencyAmountType">
<xs:simpleContent>
<xs:extension base="CurrencyType">
<xs:attribute name="CurrencyCode" type="CurrencyCodeType" use="re-
quired"></xs:attribute>
<xs:attribute name="CurrencyExponent" type="CurrencyExponentType"
use="required"></xs:attribute>
<xs:attribute name="CurrencySign" type="SignCodeType" use="required"></xs:at-
tribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
NOTE
The CDF v3.0 XML Schema Document (CDFFileTransmission.xsd) states that no
decimals are to be placed in amount fields. The concept of an exponent is used
in the CDF v3.0 document.
XML control characters need to be sent as indicated in the table below. For
example, for a merchant named “Steve & Jose Bookstore” enter this in the XML
file as “Steve & Jose Bookstore.”
Character Reference
& &
< <
> >
" "
' '
The table describes common schema error messages and the reasons for the
messages.
Message Reason
Message: Invalid character (Unicode: This error can occur if the files are being
0x0) sent in ASCII rather than UTF-8. Extended
ASCII characters are not recognized in
UTF-8.
Message: Data type error: When checking the error location in the
Type: InvalidDatatypeValueException, file, it is determined that the field is a
Message:Value 'ON' is not in enumeration. country code and customer populated
State/Province in the location instead.
Message: Invalid document structure The file may have been sent in EBCDIC
and not ASCII/UTF-8.
Schema failure notices will be sent by e-mail to the issuing processor, with
the error log attached.
MasterCard strongly recommends all issuing processors or enhanced data
sources perform schema validation against their files before sending the files to
MasterCard. This process ensures prompt and efficient resolution of any data
errors and eliminates delays in the corporate customer data being available
in SmartData.
With the CDF3 format, inbound CDF3 customers can provide updates to
transactions and addendum records that have already been sent to MasterCard.
Enhanced transaction and addendum information received at a later date can
flow through to applications that support updates.
The only requirement for this is that a unique identifier is maintained for a
transaction between the original and each update. To update a specific
transaction, the financial and each addendum record should contain the same
Processor Transaction ID that was received with the transaction originally
and the Financial Transactions Maintenance Code should be “U.” An update
transaction must always contain the transaction and all addendum records
which belong to the transaction. All previous addenda will be dropped so it is
required that each addendum be resent with the transaction.
The following Financial Transaction record fields are not available for update:
• ICA Number
• Issuer Number
• Corporation Number
• Account Number
• Processor Transaction ID
• Transaction Date
• Posting Date
• Amount in Posting Currency
• Amount in Original Currency
• Credit/Debit Indicator
Initial Setup
When a new issuer is implemented in the Global Data Repository, the issuer
information will be provided and manually entered in the system. The CDF3
Issuer Information Type can be used to update issuer information, but not to
create a new issuer. A hierarchy address record can be used to add or change
address information for an issuer.
NOTE
For every issuer, one hierarchy address record with the “Primary Address Flag”
set to ‘Y’ must be sent in. Other hierarchy addresses should have the “Primary
Address Flag” set to ‘N’.
All companies and accounts must be sent in CFD3 and created in the Global
Data Repository prior to transmission of transactional data.
Record Types
The records that comprise the CDF3 Layout specification have been broken into
sections that describe the general purpose of these records.
Transmission Records
Each exchange of information in the CDF format must be encapsulated between
two Record Types: the Transmission Header Record and the Transmission
Trailer Record.
Record Type
TransmissionHeader_1000
TransmissionTrailer_9999Type
A transmission file will always contain one Transmission Header and one
Transmission Trailer bounding the organizational, transaction, and/or the
summary records. The Transmission Header record and Transmission Trailer
Record maintain information significant to the exchange of data into Smart Data
and out of it. This information includes the Identification of the source of
the data, version of the data format, period covered by the data as well as
count and summary information used to validate the contents of a received
transmission file.
Organization Records
• PassengerTransportDetailGeneralTicketInformation_5020Type—The first
5020 Passenger Transport Addendum record for the transaction must be
related to the preceding 5000 Financial Transaction.
• PassengerTransportDetailTripLegData_5021Type—The first 5021 Passenger
Transport Detail Trip Leg Addendum record for the transaction must be
immediately preceded by a Passenger Transport Detail Addendum record.
• TemporaryServicesDetailAddendum_5080Type—The CorporateCardLineIt-
emDetail_5010 Corporate Card Line Item Detail Addendum record should be
sent in conjunction with the Temporary Services Detail Addendum record.
• GlobalInvoice_5100Type—The line items of a global Invoice are
represented by Corporate Card Line Items linked to a transaction having the
Invoice number as the Unique Invoice Number.
• TaxAddendum_5300Type—A Tax addendum element can be associated at
varying levels of a transaction, from the transaction, to the summary
addendum, to the Line Item detail. There may be zero, one, or many Tax
records related to a specific bankcard transaction. Each Tax record is linked
to a transaction by the Unique processor Reference Number. If a Detail Line
Addendum is present then the Tax Record will follow that record and have
the next Addendum Sequence Number.
• Custom Financial Data Record—The Custom Financial Addendum Record
carries details about a financial transaction for which the issuers have
defined fields to be carried that are not included in a specific addendum
record. It is generally used when new detail is needed for which a specific
addendum record has not yet been created. The first Custom Financial
Addendum record for the transaction must be preceded by a 5000 Financial
Transaction record. These records are frequently seen in outbound file
deliveries for customers who participate in one of the MasterCard Enhanced
Data Programs.
• FinancialAdjustmentRecord_5900Type—The financial adjustment element
is associated to an account just as a financial transaction, and is to be used
for all Issuer related amounts. While the record is not mandatory in each
file, it is required for the card program, to fully reflect payments and other
non merchant amounts.
• AuthorizationTransactionEntity - AuthorizationTransaction_5910–Rep-
resents a declined transaction, and while not used by most Third Party
expense systems, issuers may use this record for other reporting purposes.
• UnmatchedLodgingSummaryAddendumEntity (8003 and 8031)—The
Unmatched Lodging Summary Addendum Record provides the summary
information about a financial transaction associated with lodging
accommodations. The record format is identical to the 5030 Lodging
Summary Addendum Record. The 8031 format is identical to the 5010
Line Item Summary Record. An Unmatched Lodging Summary Addendum
Record will not be preceded by a corresponding 5000 Financial Transaction
record. These records are only available to a few custom programs, and are
outbound only.
The answers to these frequently asked questions may help you understand
Common Data Format 3 (CDF3).
Why is CDF3 an XML file?
The decision to go with an XML format was based on the following factors:
Yes, both the open and close tags (fields) must match exactly to the XML
Schema Document (CDFFileTransmission.xsd).
Example
If the schema states the following:
<xs:element name="TotalNumOfAccounts" type="Numeric10Type" minOccurs="0"
maxOccurs="1"></xs:element>
The following would be rejected (reasons in parentheses)
<TotalnumofAccounts>10</TotalnumofAccounts> (lower case “n” in num)
<TotalNumofAccounts>10</TotalNumofAccount> (missing “s” in closing tag)
The sequence numbering in the sample file does not look sequential.
Does it need to be?
Sequencing is used for error reporting and each instance should be unique
throughout the file. The sequence number of the hierarchyrecordheader may
be a continuation of the Sequence Number in the Financial Record Header.
Is the data in DebitOrCreditIndicator disregarded in a reversal or
adjustment? Is a Retail Sale and Retail Sales Reversal both debit, or is the
first one debit and the other one is credit?
If the transaction increases the amount the cardholder will owe, it is a debit.
If the transaction decreases the amount the cardholder will owe, it is a credit,
regardless of the transaction type.
May we use the AcquirerReferenceData as the ProcessorTransactionID?
No, it is not recommended. AcquirerReferenceData is assigned by the
Acquirer when the transaction is processed by the Merchant’s bank, and is not
guaranteed to be unique among all Acquirers. It is recommended that the
Processor Transaction ID contain enough data to segregate it from all other
MasterCard Transactions in their system, perhaps by incorporating the ICA,
processing date and a timestamp.
In the TelephonyBillingDetail_5121, the tags CallToCountryCode and
CallFromCountryCode are defined as 3 character ISO Country Codes,
but IPM message PDS 0638s3 and 0644s3 are both 40 position fields.
Also, CallToStateProvince and CallFromStateProvince do not match IPM
mapping. Is there a conversion table or should it be consistent with the
IPM definitions?
No, there is no conversion chart. As these are not mandatory tags, if the data
(or a way to convert it) is not available, do not provide the fields.
If the field was established in GDR prior to CDFv3, the field was decimal
aligned and zero filled. The field is now defined as alphanumeric, meaning
that it can handle both numeric and alpha characters, so, to match the field in
the database, the first 16 position must be numeric and the remaining three
characters must be spaces.
If the field is new to the database, configure the field any way you wish, but,
consistency is the key ingredient.
Are there default values for any of the tags?
Many fields have default values identified if not provided. If the data is available
in the card management system, it should be provided in CDF3. Default values
cannot be suggested for processor specific fields such as ICA, IssuerNumber,
AccountNumber and CorporationNumber.
Default values are identified in the schema in the following manner.
<element name="StateProvince" type="StateProvinceType" default="–"
What is the FileReferenceNum?
Beginning with CDF Schema Version 10.01.00.00, MasterCard will append the
EmployeeID to all financial and adjustment transactions. Vendors will need to
store the hierarchy records that contain the employee id for future reference.
How many fraction digits should I provide for the conversion rate in the
CDF3 file?
The Conversion Rate tag is provided in the CDF file to identify the rate used
for conversion from original currency to the other currency. The other currency
can be Posted currency, Billing currency, National currency, etc… Schema
allows a maximum of 9 digits in the exponent of the conversion rate tag.
Mastercard requires at least 7 fraction digits after the decimal to be included in
the conversion rate if conversion between two different currencies is involved.
This requirement is imposed to ensure better data quality and minimum
difference between the amount calculated using the conversion rate and the
amount presented in the CDF file after conversion.
Why does a CDF3 file submitted to the GDR reject due to special
characters when that same data passes through Clearing?
There are differences between what characters the GDR will accept and what
the GCMS system will allow when processing a Clearing file. The GDR and
GCMS are separate systems with different purposes. It is known that the GDR
is more strict than the GCMS when it comes to supporting special characters
and other things that may cause a CDF file to reject such as a line feed or
carriage return in an unexpected place. This is to ensure better quality of the
data which is key to the purpose of the GDR. Entities which submit CDF files
to the GDR were certified and must follow the requirements of the CDF format
regardless of what was submitted through the GCMS Clearing system.
Therefore, it is the responsibility of the issuer/processor to ensure the CDF files
meet the required criteria and specifications.
The issuer/processor can take steps to limit the impact of this situation. They
should refer to CDF schema requirements. They should be careful when
creating the CDF files and possibly add some type of scanning processing to
alert them of problematic characters. They should keep track of the fields and
values that are causing them issues and account for them in process. They
should pay special attention to carriage returns and line feeds.
These are some fields which have the potential to contain problematic
characters: Card Acceptor ID, Card Acceptor Name, Card Acceptor Street
Address, Card Acceptor City, Line Item Description, Customer Code, Unique
Invoice Number.
Appendix B Glossary
This appendix contains the terms related to the Common Data Format 3 Overview and their
definitions.
The table contains the terms related to the Common Data Format 3 Overview
and their definitions.
Term Definition
Global Data Repository (GDR) The Corporate Products data repository. The Global
Data Repository (GDR) receives data from processors
and determines which downstream application to send
the data to.
Smart Data A product suite where corporate card holders can view
and analyze their spending and the data loaded in the
Global Data Repository (GDR)
Term Definition
XML Extensible Markup Language, an industry standard for
data exchange between systems
XML Schema Defines an implementation of XML for representing