Documentation/API Reference

API REFERENCE

Query Exchange Rate

POSThttps://mapi.yabandpay.com/Payments
Live API
API PLAYGROUND · Live API

Query Exchange Rate

POSThttps://mapi.yabandpay.com/Payments
Automatically signed with your credentials

Request parameters2

Required fields first

Query Exchange Rate

settlement_currencyRequiredstringdata.settlement_currencyCurrency; see the currency details below
sub_methodRequiredstringdata.sub_methodWeChat Pay,Alipay

Credentials stay on this page. Your secret key is never stored or sent to the documentation server.

Use this API to query real-time conversion rates for WeChat Pay and Alipay. Exchange rates fluctuate between 09:00 and 11:00. CNY is the settlement currency.

ParameterTypeDescriptionRequired
userStringCashier account UIDRequired
signStringSignatureRequired
methodStringv3.QueryExchangeRateRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
settlement_currencyStringCurrency; see the currency details belowRequired
sub_methodStringWeChat Pay,AlipayRequired
  • Currencies
CurrencyCurrency codeNotes
SingaporeSGD
Norwegian kroneNOK
UAE dirhamAEDQueries are not supported by WeChat Pay
Philippine pesoPHPQueries are not supported by WeChat Pay
Swedish kronaSEK
New Zealand dollarNZD
Czech korunaCZKQueries are not supported by WeChat Pay
MalaysiaMYRQueries are not supported by WeChat Pay
Pound sterlingGBP
Danish kroneDKK
EuroEUR
Indonesian rupiahIDRQueries are not supported by WeChat Pay
Sri Lankan rupeeLKRQueries are not supported by WeChat Pay
Thai bahtTHB
South AfricaZARQueries are not supported by WeChat Pay
US dollarUSD
Macao, ChinaMOPQueries are not supported by WeChat Pay
Canadian dollarCAD
Japanese yenJPY
Russian rubleRUB
South KoreaKRW
Saudi ArabiaAUD
Taiwan, ChinaTWDQueries are not supported by WeChat Pay
Swiss francCHF
Hong Kong dollarHKD

Signature example:

Sorted parameters concatenated into a URL-style query string

"method=v3.QueryExchangeRate&settlement_currency=EUR&sub_method=Alipay&time=1546588959&user=YOUR_CASHIER_UID"

Sign stringA using secret_key

The resulting signature is:

"YOUR_SIGNATURE"

Request example:

{
    "user": "YOUR_CASHIER_UID",
    "sign": "YOUR_SIGNATURE",
    "method": "v3.QueryExchangeRate",
    "time": 1546588959,
    "data": {
        "settlement_currency": "EUR",
        "sub_method": "Alipay"
    }
}

Response example:

{
    "status": true,
    "code": "200",
    "data": {
        "exchange_rate": "7.850000"
    },
    "message": ""
}