Open API >Information Service >Country Code Inquiry
Country Code Inquiry
Information Service Developer Merchant Acquirer Issuer
Inquire country related information through the three digit country code
API Introduction
API Introduction
What is it?

Inquire country full name, abbreviation and the corresponding the legal currency information of the country through the three digit country code

Key Features

Periodic Update

This code refers to ISO 3166. UnionPay international will maintain the code content and update it regularly.

Integration Convenience

The data code wil be displayed as the real meaning content, which is more user-friendly.


When to Use it?

It can be applied to user interface or user voucher, and is closely combined with the display scene of displaying code as string information.

Who Use it?
Issuer, Acquirer, Merchant, Developer
Where to Use it?
This API is available globally
Flow Chart
Flow Chart

数据调用类流程图.png

Access Flow:

1. API Caller apply to use APIs

2. UPI approve application, update white list and generate key pair, then provide API Caller the public key and user ID (appID)


Call Flow:

3. API Caller uses the public key to encrypt the request message which include caller’s user identity information

4. UPI verify API Caller’s identity, decrypt request message, and return response data encrypted by using private key.


API Reference
API Reference
  • Country Code Inquiry
Interface description
It can be applied to user interface or user voucher, and is closely combined with the display scene of displaying code as string information.
Request Method
HTTP POST
Request Parameter
Field name Identifier Type Length Request Default value Note
Numeric Country Code numericcountryCode N 3 M:Mandatory "156" A 3-digit numeric value, as defined by [ISO 3166], that indicates the country code.
Synchronous Response parameters
Filed name Identifier Type Length Request Default value Note
Message Response  msgResponse Object M:Mandatory
Response Code responseCode AN 2 M:Mandatory "00" It contains a code that defines the response to a request.
Response Message responseMsg S 1-100 M:Mandatory "Approved" It contains the request result and the rejection reason if the request fails. The value of this field can be displayed by the Gateway to notify the user of the request outcome.
Error Details errorDetail S 1-255 O:Optional “The Issuer response is time out.” It contains additional detail regarding the problem identified in the message. The information is only for debug purpose. It shall not be displayed to the user.
Alpha Country Code alphacountryCode AN 3 M:Mandatory “CHN” A 3-digit alpha value, as defined by [ISO 3166], that indicates the country code.
Alpha2 Country Code alpha2countryCode AN 2 M:Mandatory “CN” A 2-digit alpha value, as defined by [ISO 3166], that indicates the country code.
Country Name countryName S 1-20 M:Mandatory “China” The name of the country, as defined by [ISO 3166].
Currency Data currencyData array M:Mandatory The inquired currency data, which is in line with ISO 4217.
Numeric Code numericCode N 3 M:Mandatory "156" A 3-digit numeric value, as defined by [ISO 4217], that indicates the currency code.
Alpha Code alphaCode AN 3 M:Mandatory “CHY” A 3-digit alpha value, as defined by [ISO 4217], that indicates the currency code.
Decimal Digit decimalDigit N 1 M:Mandatory “2” The decimal digit of the currency.
Currency Name currencyName S 1-20 M:Mandatory “Yuan Renminbi” The name of the currency, as defined by [ISO 4217].
Security Requirement
Security Requirement

UnionPay International has adopted unified security requirement, please refer to UPI Server-based API General Requirements  for signature and encryption guide.

Steps to Launch
Steps to Launch

If you are UPI member, you need to fill in the Application Form of API Service Product with Terms and Conditions.

If not, you need to sign the Protocol of API Usage and fill in the Application Form of API Service Product.


  • Contact Us
  • If you have any further questions, please register and submit order in your user center.