Login expired. Please log in again.

Feedback

0/300

Feedback

Submitted successfully

ok

Feedback

Network exception, please try again later

ok

Query Exchange Rate API

Latest update time:2019.11.20 Release notes


The interface could inquiry the exchange rate which Wechat Payment used in real time. The rate is updated once each day at 10 a.m. in the time zone (GMT+8).

API Intro

Request Url:https://api.mch.weixin.qq.com/pay/queryexchagerate

Request Method:POST

Certificate Requirements: No certificate is required.

Applicable Object:Common modeInstitutional mode

Request Parameters

Name ID Type Required Description
Official Account ID appid String(32) Yes Specifies Official Account ID assigned by WeChat
Example: wx8888888888888888
Merchant ID mch_id String(32) Yes Specifies Merchant ID assigned by WeChat
Example: 1900000109
Sub Merchant ID sub_mch_id String(32) No Specifies Sub Merchant ID assigned by WeChat
Specifies Sub merchant ID of institution's sub-merchant assigned by WeChat Pay
Note: Only for Institutional mode
Example: 1230000100
Currency Type fee_type String(10) Yes Foreign currency type. ISO-4217 standard compliant and be described by three characters based code.
Example: USD
Date date String(14) Yes In the format of yyyyMMdd. For example, December 25, 2009 is expressed as 20091225 in the time zone (GMT+8).
Example: 20150807
Signature sign String(64) Yes Specifies a signature. For more information, see Signature Algorithm.
Example: C380BEC2BFD727A4B6845133519F3AD6

Example:

 
<xml>
   <appid>wx2421b1c4370ec43b</appid>
   <mch_id>10000100</mch_id>
   <fee_type>CNY</fee_type> 
   <date>20150807</date>
   <sign>FDD167FAA73459FD921B144BAF4F4CA2</sign>
</xml>
							  

Return Data

Name ID Type Required Description
Return Status Code return_code String(16) Yes SUCCESS or FAIL
Specifies communicating label instead of transaction label. The status of a transaction is determined by the value of result_code.
Example: SUCCESS
Return Data return_msg String(128) No If not empty, this is the error description
Signature failure
Parameter format checking error
Example: Signature failure

If return_code is SUCCESS, return data will also include the following fields:


Name ID Type Required Description
Official Account ID appid String(32) Yes The Official Account ID submitted when calling the interface
Example: wx8888888888888888
Merchant ID mch_id String(32) Yes The Merchant ID submitted when calling the interface
Example: 1900000109
Sub Merchant ID sub_mch_id String(32) No The Sub Merchant ID submitted when calling the interface
Specifies Sub merchant ID of institution's sub-merchant assigned by WeChat Pay
Note: Only for Institutional mode
Example: 1230000100
Currency Type fee_type String(10) Yes Foreign currency type. ISO-4217 standard compliant and be described by three characters based code.
Example: USD
Exchange Rate Time rate_time String(14) Yes In the format of yyyyMMdd. For example, December 25, 2009 is expressed as 20091225 in the time zone (GMT+8).
Example: 20150807
Exchange Rate rate String(32) Yes The value is 10 to the 8th power times of the exchange rate from foreign currency to RMB. For example, the exchange rate from foreign currency to RMB is 6.5, the value will be 650000000
Example: 650000000
Signature sign String(64) Yes Specifies a signature. For more information, see Signature Algorithm.
Example: C380BEC2BFD727A4B6845133519F3AD6

Example:


<xml>
   <appid>wx2421b1c4370ec43b</appid>
   <mch_id>10000100</mch_id>
   <fee_type>USD</fee_type> 
   <rate_time>20150807</rate_time>
   <rate>650000000</rate> 
   <sign>FDD167FAA73459FD921B144BAF4F4CA2</sign>
</xml> 
  


Release notes

关闭
V1.0
2019.11.20
1. Query Exchange Rate API released online

About  WeChat  Pay

Powered By Tencent & Tenpay Copyright©

2005-2019 Tenpay All Rights Reserved.

Contact Us
Wechat Pay Global

Wechat Pay Global

ICP证

粤B1.B2-20090295