Skip to main content

Token

TokenInquiry

This API is used to retrieve a list of tokens associated with a given card.

Request:

Data ElementField NameDescriptionFormatLengthM/ORemark
1Card TokencardTokenCard TokenStringMaximum 19 characterRequired

Response:

Data ElementField NameDescriptionFormatLengthM/ORemark
1Record NumberrecordNumRecord NumberStringMaximum 8 characterRequired
2Record ListrecordListeach element is a complex element that includes the following sub-elements:
2.1sub-elements of each element in the listappUserIdThe ID of the teller who initiated the tokenStringMaximum 32 charactersRequired
2.2deviceIdThe ID of the terminal which initiated the tokenStringMaximum 64 charactersRequiredDevice ID, it shall be IMEI for Android mobile or IDFV for iOS mobile
2.3cardMaskNumberCard Mask NumberStringMaximum 19 charactersRequired
2.4cardTokenCard Token NumberStringMaximum 19 charactersRequired
2.5cardTokenStateCard Token StateStringMaximum 15 charactersRequiredValid values: "ACTIVE", "SUSPENDED", "DELETED"
2.6cardTokenExpiryDateCard Token ExpiryDateStringYYYYMMDDHHMISSRequiredGMT+8 time zone
2.7hceCardInfoHCE Card InformationStringMaximum 4096 charactersOptional

TokenRequest

This API is used to request a token associated with a given card. After generating UnionPay Virtual PAN based on issuer’s mobile APP Account, this API is used to initialize Token for the Virtual PAN.

Request:

Data ElementField NameDescriptionFormatLengthM/ORemark
1Card TokencardTokenCard TokenStringMaximum 19 charactersRequired
2Card ExpiryDateexpiryDateCard ExpiryDateStringYYMMRequired
3CVV2CVV2CVV2StringMaximum 3 charactersRequired
4Use Case IndicatoruseCaseIndicatorUse Case IndicatorArrayMaximum 100 charactersRequiredValid values: "QRC", "HCE", "SE", "COF"
5Cardholder Verification MethodcvmCardholder Verification MethodArrayMaximum 225 charactersRequiredValid values: "expiryDate", "cvn2", "name", "idType", "idNo", "mobileNo", "otp". Fixed fill in ["expiryDate","cvn2"] for unee
6HCE SDK PropertieshecSdkPropertiesHCE SDK PropertiesStringMaximum 4096 charactersOptionalReturned from HCE SDK.

Response:

Data ElementField NameDescriptionFormatLengthM/ORemark
1Card Mask NumbercardMaskNumberCard Mask NumberStringMaximum 19 charactersRequired
2Card Token NumbercardTokenCard Token NumberStringMaximum 19 charactersRequired
3Card Token StatecardTokenStateCard Token StateStringMaximum 15 charactersRequiredValid value: "ACTIVE"
4Card Token ExpiryDatecardTokenExpiryDateCard Token ExpiryDateStringYYYYMMDDHHMISSRequiredGMT+8 time zone
5HCE Card InformationhceCardInfoHCE Card InformationStringMaximum 4096 charactersOptional

TokenStateNotification

This API is used to notify the change of token status to mobile application. When the UMPS suspends, resumes, or deletes the card, the UMPS will send the Token State Notification request to notify the mobile application.

Request:

Data ElementField NameDescriptionFormatLengthM/ORemark
1Card Token cardTokenCard TokenStringMaximum 19 charactersRequired
2Card Number cardNumberCard Number StringMaximum 19 charactersRequiredMasked Card Number
3Token Reference IdtokenRefIdToken Reference IdStringMaximum 32 charactersRequired
4Token Requestor IdtokenReqIdToken Requestor IdStringMaximum 11 charactersRequired
5Scheme TokenschemeTokenScheme TokenStringMaximum 19 charactersRequired
6Token TypetokenTypeToken TypeStringMaximum 16 charactersRequired
7Token StatustokenStatusToken StatusStringMaximum 11 charactersRequired
8Token Expiry DatetokenExpiryDateToken Expiry DateStringMaximum 6 charactersRequired
9Token Assurance MethodtokenAssureMethodToken Assurance MethodStringMaximum 2 charactersRequired
10Active Tokens For PANactiveTokensActive Tokens For PANNumberMaximum 4 charactersRequired
11Inactive Tokens For PANinactiveTokensInactive Tokens For PANNumberMaximum 4 charactersRequired
12Suspended Tokens For PANsuspendedTokensSuspended Tokens For PANNumberMaximum 4 charactersRequired
13Message Reason CodereasonCodeMessage Reason CodeStringMaximum 32 charactersRequired
14Notification TimedateTimeNotification TimeStringMaximum 17 charactersRequired
15Client Wallet Account IDclientWalletAccountIDClient Wallet Account IDStringMaximum 32 charactersConditional
16Wallet Account EmailwalletAccountEmail AddressHashWallet Account Email Address HashStringMaximum 64 charactersConditional
17Device IDdeviceIdDevice IDStringMaximum 48 charactersConditional
18Pan SourcepanSourceSource of PanStringEnumRequiredFormat: It is one of the following values:
● KEY_ENTERED
● ON_FILE
● MOBILE_BANKING_APP
● TOKEN
● CHIP_DIP
● CONTACTLESS_TAP
19Address Verification ResultaddressVerification ResultCodeVisa-defined code that describes the result of an address verificationStringMaximum 1 characterOptionalBilling Address Verification Result
20CVV2 Result Codecvv2ResultsCodeCard verification value 2 (CVV2) verification resultStringEnumOptionalFormat: It is one of the following values:
● M— CVV2 Match, indicates that Visa was able to verify the CVV2 value provided by the wallet provider.
● N— CVV2 No Match, indicates that Visa was not able to verify the CVV2 value provided by the wallet provider.
● P— Not processed, indicates that Visa was unable to verify the CVV2 value provided by the wallet provider. This applies for Issuers opting for CVV2 Bypass only.
● S — CVV2 should be on the card: Indicates that V.I.P. or the issuer was unable to perform CVV2 verification and notifies the merchant that the card should contain a CVV2 value.
● U — Issuer is not available, does not participate in the CVV2 Service, or participates but has not provided Visa with encryption keys: Indicates that the issuer is notparticipating in the CVV2 Service or has not provided Visa with encryption keys needed to perform verification, or that STIP has responded to an issuer-unavailable response.
21Consumer Entry ModeconsumerEntryModeMethod of consumer entryStringEnumOptionalFormat: It is one of the following values: ● KEY_ENTERED ● CAMERA_CAPTURED ● UNKNOWN
22LocalelocaleLocaleStringMaximum 5 characterOptionalISO format for language (ISO 639-1) and alpha-2 country code (ISO 3166-1 alpha-2)
23Device Language CodedeviceLanguageCodeDevice Language CodeStringMaximum 3 characterOptionalISO 639-3 Language Code Used for retrieving Terms & Conditions
24Device TypedeviceTypeDevice TypeStringEnumOptionalFormat: It is one of the following values:
● UNKNOWN
● MOBILE_PHONE, which is equivalent to value 01 in Field 125
● TABLET, which is equivalent to value 02 in Field 125
● WATCH
● MOBILEPHONE_OR_TABLET, which is equivalent to value 04 in Field 125
● PC
● HOUSEHOLD_DEVICE
● WEARABLE_DEVICE
● AUTOMOBILE_DEVICE
25Device NamedeviceNameDevice NameStringMaximum 128 charactersOptional
26Device NumberdeviceNumberDevice NumberStringMaximum 13 charactersOptional
27OS TypeosTypeOperating System TypeStringEnumOptionalFormat: It is one of the following values
● ANDROID
● IOS
● WINDOWS
● BLACKBERRY
● TIZEN
● OTHER
28OS VersionosVersionOperating System VersionStringMaximum 32 charactersOptionalVersion of OS (e.g., 4.4.4)
29OS Build IDosBuildIDOperating System Build IDStringMaximum 32 characters Optional
30Device ID TypedeviceIDTypeDevice ID TypeStringMaximum 32 characters Optional
31Device BranddeviceBrandDevice BrandStringMaximum 32 charactersOptional
32Device ModeldeviceModelDevice ModelStringMaximum 32 charactersOptional
33Device LocationdeviceLocationDevice LocationStringMaximum 25 charactersOptional
34Device IndexdeviceIndexDevice IndexNumberMaximum 2 charactersConditionalVisa-assigned index of deviceID
35Device IP Address V4deviceIPAddressV4Device IPv4 AddressString Maximum 15 charactersOptionalIPv4 format(no leading zeros)
36Location SourcelocationSourceLocation SourceStringEnumOptionalFormat: It is one of the following values:
● WIFI
● CELLULAR
● GPS
● OTHER
37Token Protection MethodtokenProtectionMethodToken Protection MethodStringEnumOptionalSOFTWARE TRUSTED_EXECUTION_ENVIRONMENT SECURE_ELEMENT CLOUD

Response:

N/A. HTTP 200 response only.

TokenStateUpdate

This API is used to notify the change of the state of a given token to Coshine system. When the cardholder or the mobile application suspends, resumes, or deletes the card, the mobile application shall send the Token State Update request to change the state of the Token.

Request:

Data ElementField NameDescriptionFormatLengthM/ORemark
1Card Token NumbercardTokenCard Token NumberStringMaximum 19 charactersRequired
2Token Reference IDtokenRefIdSecheme Token Reference IdStringMaximum 32 charactersConditionalIf update the status of specific token
3Token Requestor IDtokenRequestorIdToken Requestor IDStringMaximum 11 charactersConditional
4Scheme Token ActionschemeTokenActionCard Token ActionStringMaximum 15 characterRequiredValid values:
• "ACTIVATE" – not supported yet
• "SUSPEND"
• "RESUME"
• "DELETE"
5Description of Other ReasonreasonDescDescription of other reasonStringMaximum 30 charactersOptional
6Enrollment IDenrollmentIdEnrollment IDStringMaximum 16 charactersOptionalIt is used to match the message sets within an enrollment process.

Response:

N/A. HTTP 200 response only.

TokenMetadataUpdate

This API is used to update the metadata of a token, such as token expiry date. The token metadata, e.g., token expiry date, needs to be updated from the mobile application’s side if the PAN expiry date has already been renewed.

Request:

Data ElementField NameDescriptionFormatLengthM/ORemark
1Card Token cardTokenCard TokenStringMaximum 19 charactersRequired
2Token Reference IdtokenReferenceIDToken Reference IdStringMaximum 32 charactersConditional If update specific token
3Token Requestor IdtokenRequstorIDToken Requestor IdStringMaximum 11 charactersConditional
4Card IssuercardIssuerCard issuer name.StringMaximum length 128 charactersOptional
5Foreground ColorforegroundColorForeground color of the Digital Wallet entry for the card.StringMaximum length 32 charactersOptional
6Background ColorbackgroundColorBackground color of the Digital Wallet UI entry.StringMaximum length 32 charactersOptional
7Label ColorlabelColorLabel color of the Digital Wallet entry.StringMaximum length 32 charactersOptional
8Short DescriptionshortDescriptionShort description of the card.StringMaximum length 32 charactersOptional
9Long DescriptionlongDescriptionLonger description of the card.StringMaximum length 64 charactersOptional
9Profile IDprofileIDProfile ID associated with the card.StringLowercase hex; Maximum 32Conditional
10Card ArtcardArtDataCard art data.StringArray of card art reference IDsOptional
11Terms and Conditions IDtermsAndConditionsIDGUID filename for T&C text.StringMaximum 64 charactersOptional
12Privacy policy URLprivacyPolicyURLPrivacy policy URL.StringMaximum 128 charactersOptional
13Terms and Conditions URLtermsAndConditionsURLT&C URL.StringMaximum 128 charactersOptional
14ContactcontactInfoContact information.StringContact Information structureOptional
15Application InfoapplicationInfoApplication information.StringApplication Information structureOptional
16Card Art Reference IDcardArtRefIDGUID filenames for Card Art images.StringArray of GUID-based filenames. Maximum 32 charactersConditional
17Supports token notificationssupportsTokenNotificationsSupports token notifications.BooleanTrue/FalseOptional
18Supports FPAN notificationssupportsFPANNotificationsSupports FPAN notifications.BooleanTrue/FalseOptional
19Transaction history URLtransactionServiceURLTransaction history URL.StringMaximum 128 charactersOptional
20Message/offer service URLmessageServiceURLMessage/offer service URL.StringMaximum 128 charactersOptional
21Transaction Push TopicstransactionPushTopicPush topic for new transactions.StringMaximum 128 charactersConditional
22Message Push TopicsmessagePushTopicPush topic for new messages.StringMaximum 128 charactersConditional
23App Launch URLappLaunchURLURL passed to issuer app when launching.StringMaximum 128 charactersOptional
24App Launch URL SchemeappLaunchURLSchemeURL scheme registered for deep linking.StringMaximum 32 charactersOptional
25Associated StoreassociatedStoreIdentifiersMobile app store item IDs.StringMaximum 20 charactersOptional
26Associated ApplicationsassociatedApplicationIdentifiersAssociated application IDs.StringMaximum 128 charactersOptional
27Contact WebsitecontactWebsiteCustomer Service website.StringMaximum 128 charactersOptional
28Contact EmailcontactEmailCustomer Service email address.StringMaximum 32 charactersOptional
29Contact NumbercontactNumberCustomer Service phone number.StringMaximum 32 charactersOptional
30Contact NamecontactNameName of issuing bank.StringMaximum 32 charactersRequired

Response:

N/A. HTTP 200 response only.

ReplenishTokenLUK

Mobile application will call SDK API “tokenValidForProcessing” to check if there are available LUKs in SDK before payment for a given Token identified by the Token ID.

Request:

Data ElementField NameDescriptionFormatLengthM/ORemark
1Card Token NumbercardTokenCard Token NumberStringMaximum 19 charactersRequired
2LUK SecretlukSecretLUK SecretStringMaximum 4096 characterRequiredReturned from HCE SDK.

Response:

Data ElementField NameDescriptionFormatLengthM/ORemark
1Card Token NumbercardTokenCard Token NumberStringMaximum 19 charactersRequired
2Card Token KeycardTokenKeyCard Token KeyArrayMaximum 4096 characterRequired