API Documentation
Alipay Global - Query Exchange Rate

Allow merchant’s system can retreive the exchange rate of CNY in a foreign currency. The exchange rate is provided by Alipay and keep update around every hour.

Request Parameters

URL: https://pay.ionlinepay.com/gateway/

Request Method: POST Form-Data

Name ID Required Type Description
API Name service Yes String(40) ionline.pay.alipay.forexrate.query
API Version version No String(8) Default value: 1.0
Charset charset No String(8) Default value: UTF-8
Signature Type sign_type No String(8) Default value: MD5
Merchant ID (MID) mch_id Yes String(32) Specifies Merchant ID assigned by iOnline Pay
Currency Type fee_type Yes String(3) Support Currencies: HKD,USD,EUR
Random String nonce_str Yes String(32) 32 characters or fewer.
Signature sign Yes String(32) Signature Hash. For more information, see "Security Specification"


Response Parameters

Response Format: JSON

Name ID Required Type Description
API Version version Yes String(8) Default value: 1.0
Charset charset Yes String(8) Default value: UTF-8
Signature Type sign_type Yes String(8) Default value: MD5
Return Status Code status Yes String(16) This parameters indicates whether the API call is successful or not but this doesn't indicate to have a successful transaction.
If the value is 0, then it indicates sucecssful. Otherwise, it indicates failure.
Return Message message No String(128) The description of the Return Status Code if the value of parameter "status" is not 0.
The below parameters will be returned if the value of the parameter "status" is 0.
Service Result result_code Yes String(16) If the value is 0, then it indicates sucecssful. Otherwise, it indicates failure.
Merchant ID (MID) mch_id Yes String(32) Specifies Merchant ID assigned by iOnline Pay
Random String nonce_str Yes String(32) 32 characters or fewer.
Error Code err_code No String(32) Error code
Error Message err_msg No String (128) The description of error code
Signature sign Yes String(32) Signature Hash. For more information, see "Security Specification"
The below parameters will be returned if the value of the both parameters "status" and "result_code" are 0.
Currency Type fee_type Yes String(3) Support Currencies: HKD,USD,EUR
Exchange Rate forex_rate Yes String(10) The exchange rate from foreign currency to CNY.
Exchange Rate Last Update Time time_update Yes String(14) Specifies the last update time of exchange rate in the format yyyyMMddHHmmss, such as 20170520094130 for May 20, 2017 09:41:30 (GMT+8).