Part II Extended Purchase Specification Based On Contactless Low-Value Payment Application
Part II Extended Purchase Specification Based On Contactless Low-Value Payment Application
— Product Specifications
Version 2014
THIS PAGE IS INTENTIONALLY LEFT BLANK.
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Table of Contents
SUMMARY OF REVISIONS.................................................................................................... 1
2 REFERENCES ...................................................................................................................... 3
UPI Confidential i
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
A.1 READ CAPP DATA (read extended application data) Command ...................................... 38
UPI Confidential ii
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
A.2 UPDATE CAPP DATA CACHE (Update Data Cache) Command .................................... 40
A.4 GET TRANS PROVE (Get Offline Transaction Application Cryptogram) Command ...... 45
UPI Confidential iv
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Summary of Revisions
UPI Confidential 1
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
1 Application Scope
UPI Confidential 2
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
2 References
UPI Confidential 3
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
3.2 Command
A message that the terminal sent to the card. This message initiate an operation or
request for a response.
Comprehensive application cyclic file is loop-structured file used to store log data.
The “UPDATE CAPP DATACACHE” command only update the first record at
each transaction..
3.5 Cryptogram
Deposit deduction is a mechanism in which the issuer gives the cardholder a certain
deposit amount. And this amount is not accounted for the available electronic cash
balance. But when the available electronic cash balance is not sufficient to
complete a transaction, the cardholder can choose to use the deposit amount to
finish the transaction
The upper limit of electronic cash balance available for offline purchase.
UPI Confidential 4
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
3.12 Load
A method to increase the electronic cash balance. There are several ways to
implement load transaction. Money can be transferred to the electronic cash from
the master account of the card, cash, or the account of other cards. But electronica
cash balance after load transaction is still bounded by the electronic cash funds
limit
3.13 Response
The message returned to the terminal after the IC cards finish the processing of
received command
An estimated amount is sent to the card alongside the other parts of the transaction
command. The card approves the transaction after risk analysis and balance check.
And then the estimated amount will be frozen in the current electronic cash
balance.
The transaction command is sent to the card before the pre-authorization expiry
date. And then the card will approve the transaction after risk analysis and balance
check. And the corresponding amount is deducted from the electronic cash balance.
3.16 Script
This is a variation of standard qUICS transaction flow chart to satisfy the need for
deduction by segment or deduction by time in the quick offline low-value payment
application.
3.18 Terminal
UPI Confidential 5
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
AC Application Cryptogram
DDA Dynamic Data Authentication, prevents false card in offline authentication, card
generates RSA signature for specific data in transaction which could be used in
terminal verification.
UPI Confidential 6
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Dynamic Dynamic signature is a signature generated by the card from the dynamic data of
Signature a card and a terminal, and the terminal will prove the authenticity of the card by
verifying the signature. Dynamic application data (Tag '9F4B ') of signatures
shall be referred when using
End Sentinel It is the indicator in the end position of magnetic track 1 and magnetic track 2 of
the magnetic stripe. It will be followed by a longitudinal redundancy check code
- see "LRC". "
FCI File Control Information, responded and returned by card when reader or
terminal selects card application (using SELECT command)
fDDA Fast DDA, a fast DDA in line with EMV and UICSUICS definition of norms.
Used in qUICS transactions, allowing reader to give READ RECORD command
to obtain dynamic data authentication related data from card and execute DDA
calculation after card leaves induction zone.
Hex Hexadecimal
IAC Issuer Action Code. In case it’s determined that an offline transaction is rejected
(IAC Denial), then it will be sent online (IAC Online); if online is infeasible,
then return to offline rejection (IAC Default) conditions
IC IC (Integrated Circuit)
UPI Confidential 7
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
LRC Longitudinal Redundancy Check. It’s used to validate the data to ensure that the
data will not be lost when being read from the physical magnetic stripe
MDK Master key (Master DEA Key), is a double length DES key used to derive a
unique key for the card (for online card authentication)
MSI Magnetic Stripe Image, can not be used for contactless magnetic stripe
technology
MSD Magnetic Stripe Data refers to the contactless payment using equivalent data of
magnetic track 2. Magnetic track 1can be built within the equivalent data of
magnetic track 2 and self-defined data of magnetic track 1 and is used for
contactless transactions or online message
MSD Path When a transaction is done through a contactless interface, MSD path is an
application path adopted by the Card, to make the Card action meet the MSD
requirements. The path will be used in case that the Reader supports MSD, the
Card supports MSD, and qUICS is not supported.
P1 Parameter 1
P2 Parameter 2
PDOL Processing Options Data Object List A list of terminal data objects required by
card.
UPI Confidential 8
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
UDK Sub-key (Unique DEA Key) is the only double-length DES key of a Card
derived from the master key, and is used for online certification of the Card
UPI Confidential 9
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
With the continuous spread of financial IC card applications, more and more
industries are beginning to accept financial IC cards. Its security, fast, and offline
payment features are more and more favored by the market.
Due to the special nature of related industries, new requirements have been raised
for quick offline low-value payment applications: billing by time and billing by
segment, where the Cardholder does not know the amount of purchase in advance,
the amount of purchase calculated according to the environmental parameters
before being deducted when the purchase action is completed. Typical scenarios
include subway, highway (billing by segment) and parking meters (billing by time).
As the standard contactless quick payment cannot meet the new demands of these
industries, adjustments and extensions are required for the existing procedures to
accommodate the characteristics of these scenarios.
Based on the original standard qUICS transaction process, UPDATE CAPP DATA
CACHE command is added between the GPO command processing and READ
RECORD command processing to update the extended application data.
In deduction by segment transaction mode, issuers may choose to select the deposit
deduction function, which needs to add the two tags, i.e. deduction limit of
deduction by segment (DF62) and the deducted amount of deduction by segment
(DF63) during personalization.
UPI Confidential 10
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Terminal Card
SELECT Command
Return PDOL, request terminal transaction property
Select applied AID
SELECT Return Value 9F66, which also incl.CAPP transaction indicator bit
PDOL contains
CAPP transaction
indicator bit?
Y
Y
Read Capp Data Command
Read the specified
Return error N
extended application Return error
status code
N file
Y
Return Read Capp Data Command Contents of returned file
Is contents of
extended
application file Receive GPO instruction,
returned by Card process as per standard
correct? qPBOC transaction
If CAPP
transaction
indicator bit is 2 or
Calculate e- 3, conduct offline
Receive returned value from GET GET PROCESSING OPTIONS cash pre-authorization
Y transaction,
PROCESSING OPTINS balance and
Returned value return otherwise, return
to standard
qPBOC
transaction
Update CAPP record contents, update
instruction is protected by security
messages
UPI Confidential 11
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Terminal Card
pass
Conduct off-line
data verification fail
(fDDA test)
pass
Transaction
Record related off-line is
transaction uploading rejected
data
Transaction is
approved
The terminal will send SELECT PPSE command to select PPSE following qUICS.
According the application information and AID returned from the card. The
terminal will send a SELECT command to select the application, and the card will
return File Control Information (FCI). FCI also includes extension-function
indicator (tag DF61). For example, the first bit of the first byte of DF61 is set as
“1”, it indicates the cards support deduction by segment. If the eighth bit of the
first byte is set as “1”, it indicates the card support R-MAC protection of the
extended application records.
UPI Confidential 12
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
If PDOL data required by FCI data contains CAPP transaction indicator bit, the
terminal will process in order as follows:
For a terminal supporting deposit deduction transaction, it may get electronic cash
balance (9F79) according to actual needs. When the acquired electronic cash
balance (9F79) is greater than or equal to 0, the terminal can select to continue or
terminate the transaction according to business needs.
The terminal will send a GPO command to the card, and data in the command will
be organized according to the returned PDOL data when the application is selected,
and it is required to contain a CAPP transaction indicator bit.
When a GPO command is received, the card will be process in the following order:
UPI Confidential 13
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
During deduction by segment transaction, the terminal will perform the following
processing:
—— Organize and update the contents recorded in CAPP and the terminal will
conduct security protection to the UPDATE CAPP DATA CACHE
command by calculating corresponding MAC with the security module.
—— Send an UPDATE CAPP DATA CACHE command. It’s allowed to send
multiple UPDATE CAPP DATA CACHE commands according to the actual
application.
—— The terminal will send a READ RECORD command to the card according to
the GPO returned AFL, and read corresponding record contents.
UPI Confidential 14
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
—— After the last record is successfully read, the card will simultaneously
complete low-value payment deduction and actually update CAPP records,
and the transaction is completed normally.
—— If the card supports the deposit deduction function, and the electronic cash
balance (9F79) is less than the current transaction amount, then a deposit
deduction will be carried out. Then after the last record is successfully read,
the deducted amount of the deduction by segment after the transaction (DF63)
= the deducted amount of the deduction by segment before the transaction
(DF63) + transaction amount - electronic cash balance before transaction
(9F79 ), while the electronic cash balance after the transaction (9F79) is set to
zero; the transaction is completed.
1. Loading operation
When the card receives a script command regarding the modifying balance sent by
the Issuer, First of all, the card does a subtraction to get the difference between the
amount in command “PUT DATA 9F79” and the deducted amount (DF63) after
UPI Confidential 15
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
When the amount specified in the modified balance script is greater than the
deducted amount in the deduction by segment (DF63), the loaded electronic cash
balance (9F79) = the amount specified in the modified balance script - the deducted
amount in the deduction by segment (DF63). Meanwhile, the deducted amount in
the deduction by segment (DF63) shall be cleared to zero;
When the amount specified in the modified balance script is less than or equal to
the deducted amount in the deduction by segment (DF63), the deducted amount in
the deduction by segment (DF63) after loading = the deducted amount in the
deduction by segment (DF63) before loading - the specified amount in the modified
balance script, while the electronic cash balance (9F79) will remain unchanged;
—— If the current electronic cash balance (9F79) is greater than 0, then it will be
handled according to the standard loading process.
2. Query Operation
UPI Confidential 16
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
This section only describes the differences between the second-currency deduction
by segment and standard deduction by segment. With respect to the other parts,
please refer to the description of standard deduction by segment transaction
process.
low-value
The card starts risk management after receiving GPO command. In the first step of
card risk management (set the indicator of whether the currency is matched or not),
the card will match the transaction currency code, and select the corresponding data
elements. Illustrated as follows:
Terminal CARD
Select AID Select command Return PDOL
Request for three key elements inPDOL
Select the first
Is 5F2A and
Terminal transaction properties, authorized set of data
Send GPO 9F51matched YES
amount, transaction currency code(5F2A) elements
?
NO
NO
After receiving GPO command, the card will compare the transaction currency
code (tag 5F2A) with the application currency code (tag 9F51). If they are matched,
a set of the first-currency data elements will be used for the following processing. If
not matched, the transaction currency code (tag 5F2A) will be compared with
second-currency code (tag DF71). If they are matched, a set of the second-currency
data elements will be used for the following processing. Otherwise, a set of the
first-currency data elements will be used following the currency mismatch situation
defined in qUICS.
After completing the card risk management, the card follows the rules below to
respond to GPO command.
—— If the available balance for offline purchase (tag 9F5D) is required in the
response data, “9F5D” shall be calculated using either electronic cash
balance (tag 9F79) or the second-currency electronic cash balance (tag
UPI Confidential 17
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
DF79),in accordance with the currency comparison result in the card risk
management.
—— If the electronic cash balance (tag 9F79) or the available balance for offline
purchase (tag 9F5D) is required in the response data, the card shall calculate
it using “9F79” or “DF79” , in accordance with the currency comparison
result in the card risk management.
—— the second-currency deduction by segment is only compliant with the option
of “support small-amount balance check”, while it’s not applicable to either
the option of “support small-amount balance check and CTTA check” or the
option of “support small-amount balance check or CTTA check”. When the
option of “support small-amount balance check and CTTA check” or the
option of “support small-amount balance check or CTTA check” is used, the
card shall disable the second-currency deduction by segment.
—— The card shall return the second-currency electronic cash balance (tag DF79)
in response to the terminal’s “GET DATA” command which is intended to
get electronic cash balance (tag 9F79)
—— The card shall return the second-currency electronic cash reset threshold
value (tag DF76) in response to the terminal’s “GET DATA” command
which is intended to get electronic cash reset threshold value (tag 9F6D)
—— The card shall return the second-currency electronic cash funds limit (tag
DF77) in response to the terminal’s “GET DATA” command which is
intended to get electronic cash funds limit (tag 9F77)
—— The card shall return the second-currency electronic cash single transaction
limit (tag DF78) in response to the terminal’s “GET DATA” command which
is intended to get electronic cash single transaction limit (tag 9F78)
—— The card receives no GPO command, or the transaction currency code in the
GPO command does not match with the second currency code (tag DF71) in
the card’s application, the card will process the “GET DATA” command
following qUICS procedure.
This aim of this design is to make the terminal able to identify and get the
corresponding data elements in accordance with the transaction currency without
making modification to the current transaction procedure of the terminal.
UPI Confidential 18
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
template. In the meanwhile, special handling is also applied to the card supporting
deposit deduction in parts of the second-currency deduction by segment or
deduction by time transaction process.
1) Select Application
The terminal supporting the second-currency deduction by segment should get the
second-currency electronic cash balance (DF79) before transaction. If the
second-currency electronic cash balance (DF79) is greater than 0, the terminal can
continue to start the transaction, if it’s equal to 0(that’s the balance is 0. Or it has
completed a deduction by segment transaction), the terminal can choose to continue
or terminate the transaction according to its own logic.
2) Initiate Application
After receiving the GPO command, if the card also supports deduction by segment,
the current available electronic cash balance can be calculated as follows:
The current available electronic cash balance = the second-currency electronic cash
balance (DF79) + the second-currency deduction limit (DF7A) – the
second-currency deducted amount (DF7B).
If the card does not support deduction by segment transaction, The current
available electronic cash balance = the second-currency electronic cash balance
(DF79).
After receiving the AFL from the card, the terminal sends “READ RECORD”
command to the card. If the card supports deposit deduction and the
second-currency electronic cash balance (DF79) is less than the transaction amount,
the deposit deduction is conducted. And the rules below are followed.
After receiving “PUT DATA DF79” command, the card will carry out the
following procedure:
UPI Confidential 19
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
second-currency electronic cash funds limit (DF77), then a status word “6A80” will
be returned in response to the “PUT DATA” command.
5) Inquiry Operation
When the card receives the script to change the second-currency deduction limit
(DF7A), the card will make comparison between the deduction limit in the
updating script and the second-currency electronic cash deducted amount in the
card. If the deduction limit in the updating script is less than the deducted amount
in the card, the card will return “6A80”. Otherwise, the updating script will be
executed. And the deduction limit in the card will be set as the deduction limit in
the updating script.
UPI Confidential 20
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
UPI Confidential 21
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Terminal
Card
Conduct standard
Does terminal support Does it support specific off-
qUICS transaction or N Read Capp Data
CAPP transaction? line pre-authorization file?
terminate transaction
Y
Y
Retrieve specific
extended application Return error
offline pre-authorization Return error N
status code
file Return file contents
Y
Read Capp Data
Receive GPO instruction,
Is specific file contents process as per risk
returned by Card management rules
normal? regulated for qPBOC
transactions
UPI Confidential 22
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Terminal Card
Read Record
Retrieve record acc.to GPO returned Retrieve and return
AFL Read Record corresponding record contents
Read Record
Card interaction process ends Anti-pull treatment,
Enter terminal verification process process
pass
pass
Transaction is approved
The following is the transaction process for the offline pre-authorization transaction
based on contactless low-value payment:
The terminal will send a SELECT command to select the application, and the card
will return File Control Information (FCI).
UPI Confidential 23
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
If PDOL data required by FCI data contains CAPP transaction indicator bit, the
terminal will process in order as follows:
Otherwise, the terminal will perform the standard qUICS transaction or terminate
the transaction as required.
UPI Confidential 24
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
The card requests the CAPP transaction indicator bit to the terminal through PDOL
in the returned File Control Information (FCI), indicating that the selected
application supports the deduction by segment transaction or the offline
pre-authorization transaction based on contactless low-value payment.
The terminal will send a GPO command to the card, and data in the command will
be organized according to the returned PDOL data when the application is selected,
and it is required to contain a CAPP transaction indicator bit. When a GPO
command is received, the card will be processed in the following order:
UPI Confidential 25
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
—— If CAPP is of other value, then it will enter into the standard qUICS
transaction process;
—— If the transaction is an offline pre-authorization transaction, the card will not
return TC in case that offline transaction is approved; if it is an offline
pre-authorization completion transaction, the card will return TC in case that
the offline transaction is approved.
Table 6-1 GPO response necessities and conditional data based on the extended
application transaction of contactless low-value payment
Mandatory (M) or
Tag Data Elements
conditional (C)
‘82’ M AIP
‘94’ M AFL
‘9F36’ M ATC
C If it is supported fDDA
and the ICC key length is
'9F4B ' Signed Dynamic Application Data
less than or equal to 1024
bits
UPI Confidential 26
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Mandatory (M) or
Tag Data Elements
conditional (C)
Once offline pre-authorization transaction is entered, the terminal will perform the
following processing:
UPI Confidential 27
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
—— The terminal will send a READ RECORD command to the card according to
the GPO returned AFL, and read corresponding record contents.
—— The balance is not allowed to be updated by the card until the MAC in the
UPDATE CAPP DATA CACHE command is successfully verified.
—— When the last record is read, the card will check and ensure that the file
updated by current UPDATE CAPP DATA CACHE must be consistent with
the file of the last READ CAPP DATA (the same SFI and the same ID), after
the successful update, the card will update the new electronic cash balance,
and clear the corresponding pre-authorization amount at the same.
—— The card will update the CAPP record contents. The above data update
process is an atomic operation.
If the card's fDDA version number is "01", then before generating the dynamic
signature, the card shall dynamically fill the 8th byte of the card verification related
data (9F69) with the value of the card top-up function indicator (DF61) then
making dynamic signature calculations. After fDDA verification is successful, the
terminal shall compare the 8th byte of the card verification related data (9F69) with
the card top-up function indicator (DF61) in the FCI data returned by the card upon
UPI Confidential 28
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
selecting an application, if there is any mismatch, then it shall indicate that the
translation failed.
Fill the 8th byte of 9F69 with value of ‘DF61’ if 'DF61' is personalized and fill
with zero if 'DF61' is not personalized. Terminal should check the 8th byte of
'9F69' based on if FCI contains 'DF61'.
—— Load Operation
Issuer backend load process remains consistent with existing process;
When the card receives the PUT DATA 9F79 command, the following processing
should occur:
—— The card first determines the difference between the amount in the PUT
DATA 9F79 command and the deducted amount of deduction by segment
(DF63), checks whether it is greater than the electronic cash funds limit
(9F77), and if so, then the card sends response code '6A80' for the PUT
DATA command;
—— The card determines the amount in the PUT DATA 9F79 command, adds the
not-yet-completed offline pre-authorization transaction amount (or total
amount of multiple such transactions) on the card, then subtract the deducted
UPI Confidential 29
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
UPI Confidential 30
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Description
Single deduction discount transactions have the following basic flow: read
extended application custom file, determine whether the card supports discount
application, if so, determine whether the discount period has expired; if not,
calculate the purchase amount according to the discount rules, then continue with
the other steps of the discount transaction.
UPI Confidential 31
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Flow Chart
Terminal Card
SELECT command Return the application data and AID
Select PPSE SELECT command return value saved in PPSE
Yes Is discount
No application CAPP Yes
file supported?
Are there other
Return error status Return file content
records to read
code
No
Proceed with other Determine whether the
transaction or No card supports discount
terminate transaction application
Yes
No
Yes
Are there other
Cache the CAPP record content to
variable length
be updated
records to update?
No
As needed, send UPDATE CAPP DATA CACHE Based on file record, search for
command, update the first record in the CAPP log record security key, verify secure
file with the corresponding circular record structure UPDATE CAPP DATA CACHE command message
UPI Confidential 32
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Terminal Card
A
Yes
No
Yes
Terminal Did the terminal
abnormal No authentication No
processing Complete deduction, CAPP
pass?
data update, and store TC
Yes
Complete transaction
Return record content
Note: Single deduction discounts may involve checking the last or the last several
transaction records (as in the case of bus transfers), so besides the CAPP variable
length record file used by discount applications for general records, an additional
CAPP log record file that uses circular record file structure may be added. By using
the two files in conjunction, various discount plans could be realized.
Flow Description
When the cardholder uses contactless financial IC card for single deduction
discount transactions in a discount application environment, the terminal will
process it as follows:
—— Terminal first selects and activates the card, then through response data
determine whether the card supports extended application transactions based
on contactless micro-payments.
—— The terminal sends a READ CAPP RECORD command to check the variable
length structure discount application CAPP custom file, to determine whether
the card supports discount applications. If supported, the terminal sends one
or more READ CAPP RECORD commands to read record content as needed
from the circular record structure log record CAPP custom file: if the
discount rules requires checking the recent several transactions, then the
terminal must read the last several records from the circular file, as the basis
UPI Confidential 33
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
of the purchase amount calculation, otherwise only read the last log record as
basis; if this does not meet discount conditions, then transaction amount is
the non-discounted standard amount, otherwise, calculate purchase amount
based on discount rules, then enter the deduction transaction flow.
—— Terminals that support discounts can calculate discount purchase amount by
checking the recent several purchases. But avoid making the design overly
complex, to limit impact on transaction speed.
Note: If the card supports extended application record R-MAC protection, then the
terminal shall check and verify R-MAC. Specific methods are described in the fee
deduction by segment and offline pre-authorization transaction flows.
UPI Confidential 34
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
8 Security Requirements
Note 1: The derived generation mechanism of application access key must ensure
that the access key for each extended application file is unique.
Note 2: The generation and management of governance key for industry application
shall be defined by the industry partner.
The terminal uses the APPEND RECORD command to add new application
records in the extended application file of specified industry application, i.e. open a
new industry application. The commands of using the APPEND RECORD
command to add a new application in a variable-length record file, and the
UPDATE CAPP DATA CACHE command to update the application file data are
mandatory to contain security messages, so that the card is able to determine that
the command is from a legitimate terminal.
The security message uses '00 '| | '00' | | '00 '| | '00' | | '00 '| | '00' | | ATC as the initial
vector to participate in the MAC calculation. For MAC calculation method, please
refer to the description on message authentication codes in UnionPay Integrated
Circuit Card Specifications 0025.7. Before sending the APPEND RECORD and
UPDATE CAPP DATA CACHE command, the ATC can be obtained either by
GET DATA, or through the returned value of GPO.
UPI Confidential 35
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
In APPEND RECORD command, the settings of governance keys for the industry
applications are attached. After the opening of an industry application, the
authorization to modify the application data of this industry application shall be
controlled by the corresponding industry application governance key in the manner
of security message. The terminal modifies industry application data with the
UPDATE CAPP DATA CACHE command. The extended application supports the
deletion function, i.e., the application validity identification shall be set to zero by
the industry terminal when updating the industry data.
UPI Confidential 36
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
For cards only supporting deduction by segment applications, when the data is
personalized, the Issuer should write a deduction by segment identifier (DF61) =
0x01 in the issuer discretionary data (BF0C) in the file control information (FCI)
returned by SELECT AID.
The issuer will create ahead of time a extended application file during
personalization, and write in the initial key. Before using, it shall be opened by the
cardholder on the industry devices, i.e., the industry will create a record
corresponding to the file, and write in the read-write key of the industry to the
record.
For cyclic record files, the files shall be created ahead of time by the Issuer in
personalization process. If the industry needs to use the cyclic record file, a new
record can be added with the APPEND RECORD command when opening the
business by the cardholders, and then records in the file will be updated through
UPDATE CAPP DATA CACHE. This file corresponds to one industry key.
UPI Confidential 37
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
The terminal will determine the specified record of certain extended application file
to be read through specifying the ID number of the extended application (generally
the area code) and the industry type of extended application.
Once the card receives a READ CAPP DATA command, it will perform the
following operations:
—— Select the corresponding EF file according to SFI specified by P2. If the file
does not exist, the card will return the status code '6A82 '(file not found).
—— If EF file is not a variable length record file, the card will return a status word
'6981' (file type does not match).
Code Value
CLA '80'
INS 'B4'
P1 '00'
Lc '02'
Data ID #
Le Not exist
Table 7-2 Definition of the reference control parameter P2 in READ CAPP DATA
command message
UPI Confidential 38
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
B8 B7 B6 B5 B4 B3 B2 B1 Meaning
0 0 0 0 0 - - - RFU
X X X X X - - - SFI
1 1 1 1 1 - - - RFU
- - - - - X X X RFU
Error status codes that may be returned by the IC card are as follows:
Command not allowed (it is not the current EF; directly read or update the next
'69' '86'
record)
UPI Confidential 39
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
UPDATE CAPP DATA CACHE command is used to update the application data
cache in the extended application purchase transactions. Cached data will be used
by the last READ RECORD command to rewrite related records in the proprietary
files of the extended application. After the card receives the UPDATE CAPP
DATA CACHE command, it will perform the following operations:
—— Select the corresponding EF file according to SFI specified by P2. If the file
does not exist, the card will return the status code '6A82' (file not found), and
the terminal shall terminate the extended application purchase transaction.
—— Check the condition for using the proprietary file of the extended application,
if the previous command of this command is not a GPO command or is
another UPDATE CAPP DATA CACHE command, it will return status code
'6985' (the using conditions are not met). The terminal shall terminate this
extended application purchase transaction.
—— If the proprietary file of the extended application pending for updating is a
variable length record file, according to the ID number in the command data
field, check whether there is a record of the same ID number in the
proprietary file of the extended application. If it does not exist, return a status
code '6A83 '(No Record found). The terminal shall terminate this extended
application purchase transaction.
—— Check whether the data field length of command is greater than the
corresponding length recorded in the proprietary file of the extended
application. If it’s greater, return a status code '6A84' (file storage space is
not enough). If it’s less, return the state '6A80' (data field is not correct). The
terminal shall terminate this extended application purchase transaction.
After passing the above-mentioned checks, the card shall temporarily save the SFI,
record number and data field in the command. This command can't be used to
update the corresponding data recorded in the proprietary file of the extended
application.
UPI Confidential 40
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Code Value
CLA '84'
INS 'DE'
P1 '00'
B8 B7 B6 B5 B4 B3 B2 B1 Meaning
0 0 0 0 0 - - - RFU
X X X X X - - - SFI
1 1 1 1 1 - - - RFU
UPI Confidential 41
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
B8 B7 B6 B5 B4 B3 B2 B1 Meaning
- - - - - X X X RFU
Command message data field contains record content and security message.
If the current file is a variable-length record file, the record contents shall contain
the ID number, record length, and other extended application information and data;
if the current file is a cyclic record file, the command message data field shall
contain the extended application data.
Error status codes that may be returned by the IC card are as follows:
Command not allowed (it is not the current EF; directly read
'69' '86'
or update the next record)
UPI Confidential 42
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
After the card receives the APPEND RECORD command, it will perform the
following processing:
—— Determine whether the newly added record length exceeds the maximum
length of file record, if it exceeds, the card will return the status word
"6A80";
—— Determine whether remaining space of the file is sufficient, if the space is
insufficient, the card will return status word "6A84";
Through the above determinations, the card will allocate the record spaces
according to the record data length of the command data field, and write new
record data into the file.
Code Value
CLA '04'
INS 'E2'
P1 '0'
UPI Confidential 43
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
B8 B7 B6 B5 B4 B3 B2 B1 Meanings
0 0 0 0 0 - - - RFU
X X X X X - - - SFI
1 1 1 1 1 - - - RFU
- - - - - X X X RFU
Status code for successful performing of the command is '9000'. Error status codes
that may be returned by the IC card are as follows:
It does not meet the conditions for performing the command (is
'69' '86'
not current EF)
UPI Confidential 44
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Code Value
CLA '80'
INS '5A'
P1 '00'
P2 '00'
Lc '02'
Le '08'
Status code for successfully performing of command is '9000'. Error status codes
that may be returned by the IC card are shown in the following table:
UPI Confidential 45
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
65 81 Memory failure
67 00 Length error
UPI Confidential 46
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Maximum length of
Self-defined
a single record
Read Open
File authorization
Update Protected
Record Coding
For specific definition of short file identifier of extended application, please refer to
Appendix B.
UPI Confidential 47
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Cyclic record file for extended application is of cyclic record structure. For each
transaction, UPDATE CAPP DATACACHE command can only update the first
record, and is only stored as logging data record. It’s suggested to create a
proprietary file for extended application according to the information in below
table.
This document can also be used for other self-defined applications of the industry.
Read Open
File authorization
Update Protected
Record Coding
The application supporting transfer discount should record the details of this
transaction in the cyclic record file for extended application. For transfer discount,
it is required to read the contents in cyclic record file as the basis for discount
transfer.
UPI Confidential 48
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Extended application
Extended application type Access key
file SFI
UPI Confidential 49
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Those data elements referred to in this Specification, but not defined or modified in
UICSUICS specifications will be defined in this Appendix.
Format
Name Tag Requirements Description Retrieve Value
Length
UPI Confidential 50
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
If the card
It indicates the
supports the
Deduction F: n12 maximum
deduction by It can be
limit of deductible
T: DF62 segment returned
deduction by amount for
L: 6 deduction through the
segment for deduction by
Format: function, it will Get Data
electronic segment
cn support the Get command
cash transactions
Data and Put
Data commands.
If the card
supports the
deduction
The deducted F: n12 function of It can be
amount of Indicates the
T: DF63 deduction by returned
electronic current deducted
L: 6 segment, it will through the
cash amount of the
support the Get Get Data
deduction by Format: card
Data command, command
segment cn
but not the Put
Data command.
Note2: If ‘DF61’ indicator doesn’t support R-MAC, but when terminal request
R-MAC, card is allowed to return R-MAC to complete transaction.
UPI Confidential 51
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Note: The following example description has the pre-condition that the terminal
supports the specified deduction by segment transaction application.
Description
The basic flow for the gate-entry transaction is: Select the PPSE payment
environment, then select the qUICS application, read the extended application
custom file, then determine whether the last transaction was completed successfully.
If the last transaction was completed successfully, then engage in purchasing and
update the file; otherwise return an error prompt, to show that the cardholder is not
permitted to enter the toll zone.
UPI Confidential 52
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Flow Chart
Terminal Card
SELECT command
Select PPSE Return the application data and AID saved in PPSE
SELECT return value
Read designated
READ CAPP DATA command
CAPP file
Yes
Is subway CAPP file
supported?
Are there other No Yes
records to read?
Yes
Yes
Receive GPO command,
Send GET PROCESSING OPTIONS command process according to standard
No 注:交易金额必须为0 qPBOC transaction
Yes
No Yes
No
No
Yes Yes
完成实际扣款和 No
Did the terminal
authentication pass? CAPP数据更新
Yes
Return record
Permit toll zone exit, and prompt cardholder content
UPI Confidential 53
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Flow Description
When the cardholder uses contactless financial IC card for gate-entry transactions
in a subway toll application environment, the terminal will process it as follows:
—— Terminal first selects and activates the card, then through response data
determine whether the card supports extended application transactions based
on contactless micro-payments through AID selection.
—— Terminal sends READ CAPP RECORD command inquiry, to determine
whether the card supports subway toll application. If supported, the terminal
shall read this specified custom data, and process according to the data, for
determining whether the last transaction was leaving the toll zone, etc. If the
processing result is that the gate-entry transaction is not permitted, then the
terminal shall notify the cardholder. If the processing result permits the
gate-entry transaction, the terminal proceeds to fee deduction by segment
transaction, with transaction amount of 0.
—— Based on its particular circumstances, the terminal, in UPDATE CAPP
DATA CACHE, updates the subway toll custom data, fills in the city code,
operator code, record format version number, transaction label, toll zone
entry transaction time, toll zone entry line code, toll zone entry transaction
station code, toll zone entry transaction gate code, toll zone entry transaction
serial number, custom TAC, and other fields, and save the toll zone exit
transaction time, toll zone exit transaction line code, toll zone exit transaction
station code, toll zone exit transaction gate code, toll zone exit transaction
amount, toll zone exit transaction serial number, and other original record
values.
—— At the end of the transaction, the terminal applies dynamic data
authentication on the card based on the data returned by the card during the
transaction process. Only after the card passes authentication would the
terminal permit the cardholder to enter the toll zone.
Description
Gate-exit transaction has the basic flow: Select the PPSE payment environment,
then select the qUICS application, read the extended application custom file,
determine whether file content is correct, if so, based on gate-entry data, calculate
the toll amount. Then proceed to deduct the toll, and update the extended
application custom file, indicate normal transaction completion, while also
prompting the cardholder to exit the toll zone.
UPI Confidential 54
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Flow Chart
Terminal Card
SELECT command
Select PPSE Return the application data and AID saved in PPSE
SELECT return value
Read designated
READ CAPP DATA command
CAPP file
Yes
Was the last READ CAPP DATA
No transaction a normal command response
toll zone entry?
Yes
Yes
No
No
Is it the last
record?
Is it the last record
Yes
Yes
Complete deduction,
CAPP data update, No
and store TC
Is it the last
record
Return record
Yes content
UPI Confidential 55
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Flow Description
When the cardholder uses contactless financial IC card for gate-exit transactions in
a subway toll application environment, the terminal will process it as follows:
—— Terminal first selects and activates the card, then through response data
determine whether the card supports extended application transactions based
on contactless micro-payments through AID selection.
—— Terminal sends READ CAPP RECORD command inquiry, to determine
whether the card supports subway toll application. If supported, the terminal
shall read the subway toll custom data, and process according to the data, to
determine whether the last transaction was a normal toll zone entry, etc, if so,
then calculate the toll amount based on the gate-entry data in the extended
application custom file. If the processing result is that the gate-exit
transaction is not permitted, then the terminal shall notify the cardholder. If
the processing result is that toll zone exit transaction is permitted, the
terminal proceeds with deduction by segment transaction, and updates the
extended application custom file, with the transaction amount being the toll
amount calculated.
—— Based on its particular circumstances, the terminal, in UPDATE CAPP
DATA CACHE, updates the subway toll custom data, fills in the toll zone
exit transaction time, toll zone exit line code, toll zone exit transaction station
code, toll zone exit transaction gate code, toll zone exit transaction amount,
toll zone exit transaction serial number, custom TAC, and other fields, and
saves the city code, operator code, record format version number, transaction
label, toll zone entry transaction time, toll zone entry transaction line code,
toll zone entry transaction station code, toll zone entry transaction gate code,
toll zone entry transaction serial number, and other original record values.
—— At the end of the transaction, the terminal applies dynamic data
authentication on the card based on the data returned by the card during the
transaction process. Only after the card passes authentication would the
terminal permit the cardholder to exit the toll zone.
Inter-city rail toll / expressway toll applications use the same transaction flow as
subway toll applications, also dividing the transaction into gate-entry transaction
and gate-exit transaction, with the only difference being the toll standard. Each of
them charges based on route segment, so at the time of gate-entry transaction, the
recording of gate-entry transaction gate code and gate-entry transaction line code is
very important, as these data are the basis for calculating toll amount at gate-exit.
Parking meter application transaction flow is the same as that of the subway toll
application, with the transaction divided into parking transaction and toll collection
UPI Confidential 56
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Description
Extended applications include the following two types in the public transportation
day/month pass domain: limited-use type and unlimited-use type. Whereby,
limited-use type means limiting the number of uses of the day/month pass during
the day/month, engaging in equal amount tolls, with the toll amount being the
proportional value of the day/month pass total amount and the limited number of
uses; unlimited-use type means there is no limit to the number of uses for the
day/month pass during the day/month, and deducts the entire day/month amount on
the first use, thereafter engaging in 0 amount tolls on subsequent uses.
The basic flow for the day/month pass transaction is: Read the extended application
custom file, determine whether the card supports public transportation day/month
pass application, if yes, determine whether the public transportation day/month pass
has been used already; if not yet used, then proceed to day/month pass toll
transaction; if already used, then based on initial usage time and (/or) number of
uses, determine whether the day/month pass has already expired, if expired, then
notify the cardholder that the day/month pass has expired, otherwise continue with
day/month pass toll transaction.
UPI Confidential 57
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Flow Chart
Terminal Card
SELECT command Return the application data and AID
Select PPSE
SELECT return value saved in PPSE
Read designated
READ CAPP DATA command
CAPP file
Yes
Is day/month pass
CAPP file supported?
No
Are there other Yes
records to read?
No
Prompt
cardholder
that day/ No Receive GPO command,
month pass Calculate toll amount according to rules
GET PROCESSING OPTIONS command process according to standard
has expired Send GET PROCESSING OPTIONS command qPBOC transaction
Yes
Yes
Cache the CAPP
Are there other
UPDATE CAPP DATA CACHE command response record content to be
records to update?
updated
No
No
Is it the last
Is it the last
record?
record
Yes Yes
Not permitted
Complete deduction, No
CAPP data update, and
to board, and Did the terminal store TC
prompt No authentication pass?
cardholder
Yes
Return record content
Permitted to board, and prompt cardholder
UPI Confidential 58
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Flow Description
When the cardholder uses contactless financial IC card for public transportation
day/month pass transactions in a day/month pass application environment, the
terminal will process it as follows:
—— Terminal first selects and activates the card, then through response data
determine whether the card supports extended application transactions based
on contactless micro-payments.
—— Terminal sends READ CAPP RECORD command to inquire the industry file,
to determine whether the card supports public transportation day/month pass
application. If supported, the terminal shall read the public transportation
day/month pass custom data, then process based on the data: first determine
whether the public transport day/month pass has already been used: if not
used, then based on the rules, calculate the toll amount and proceed with
day/month pass toll transaction; if already used, then based on the initial
usage time and (/or) number of uses, determine whether the day/month pass
has expired, if expired, then terminate the transaction and notify the
cardholder that the day/month pass has expired, if not expired then calculate
the toll amount based on the rules and continue with day/month pass toll
transaction.
—— For day/month pass applications, the extended application custom file must
record the day/month pass type, day/month pass effective period, initial usage
time, number of times used, and other relevant data, as the basis for
subsequent transactions.
—— If the day/month pass must be used on specific day/month, then the CAPP
file can be updated during card top-up/issuance.
UPI Confidential 59
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
—— Issuer generates the industry application setup master key with its IC card
key management system.
—— When the issuer is preparing the IC card data, the industry application setup
master key is derived with the financial application PAN number and PAN
serial number to obtain the IC card industry application setup key.
—— During issuer personalization, extended application file is preemptively
created, setting up the corresponding IC card industry application setup key.
—— The cardholder, on the designated terminal and under the protection of the
industry application setup key, adds industry application record through the
APPEND RECORD command to setup the industry application.
UPI Confidential 60
Part II Extended Purchase Specification
Based on Contactless Low-value Payment Application
Through the newly added IDD ID, the issuer can undertake special processing for
not-yet-completed offline pre-authorization transactions. This processing requires
support from the corresponding issuer backend system.
UPI Confidential 61