Documentation/Référence API

API REFERENCE

Consulter le taux de change

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

Consulter le taux de change

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

Request parameters2

Required fields first

汇率查询

settlement_currencyRequiredstringdata.settlement_currency币种,详细参数说明
sub_methodRequiredstringdata.sub_methodWeChat Pay,Alipay

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

Paramètres

ParameterTypeDescriptionObligatoire
data.settlement_currencystring币种,详细参数说明✓
data.sub_methodstringWeChat Pay,Alipay✓

Utilisez cette API pour consulter les taux de conversion en temps réel de WeChat Pay et Alipay. Les taux de change fluctuent entre 09:00 and 11:00. Le CNY est la devise de règlement.

ParamètreTypeDescriptionObligatoire
userStringCashier account UIDObligatoire
signStringSignatureObligatoire
methodStringv3.QueryExchangeRateObligatoire
timeLongTimestampObligatoire
  • Parameters
ParamètreTypeDescriptionObligatoire
settlement_currencyStringCurrency; see the currency details belowObligatoire
sub_methodStringWeChat Pay,AlipayObligatoire
  • Devises
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

Le champ resulting signature is:

"YOUR_SIGNATURE"

Exemple de requête:

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

Exemple de réponse:

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