inquireExchangeRate
The inquireExchangeRate API is used to inquire about the exchange rates between payment currencies and all supported currencies.
Structure
A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:
Note: Set the data type of each field (except array) as String. This means that you must use double quotation marks (" ") to enclose the field value. Examples:
- If the data type of a field is Integer and its value is 20, set it as "20".
- If the data type of a field is Boolean and its value is true, set it as "true".
Request parameters
merchantAccountId string REQUIRED
A unique identifier for a specific merchant account.
More information:
- Maximum length: 64 characters
paymentCurrency string REQUIRED
The payment currency, which is a 3-letter currency code that follows the ISO 4217 standard.
More information:
- Maximum length: 3 characters
Response parameters
result Result REQUIRED
Information about the request calling result.
Note: This field doesn't indicate the exchange rate result. This field only indicates whether the inquireExchangeRate API is called successfully.
quotes Array<Quote > REQUIRED
Indicates the exchange rate list.
Note: This parameter may return the empty set.
API Explorer
Request
URL
Method
POST
{
"merchantAccountId": "2188120139128033",
"paymentCurrency": "THB"
}Response
{
"result": {
"resultStatus": "S",
"resultCode": "SUCCESS",
"resultMessage": "success."
},
"quotes": [
{
"quotePrice": 24.39,
"quoteExpiryTime": "2032-01-17T03:08:57Z",
"quoteCurrencyPair": "SGD/THB",
"quoteId": "692440"
}
]
}Result/Error codes
| Code | Value | Message | Further action |
|---|---|---|---|
| SUCCESS | S | Success | No further action is needed. |
| PROCESS_FAIL | F | A general business failure occurred. | Do not retry. Human intervention is usually needed. It is recommended that you contact Antom Technical Support to troubleshoot the issue. |
| UNKNOWN_EXCEPTION | U | An API call has failed, which is caused by unknown reasons. | Call the API again to resolve the issue. If not resolved, contact Antom Technical Support. |
| PARAM_ILLEGAL | F | The required parameters are not passed, or illegal parameters exist. For example, a non-numeric input, an invalid date, or the length and type of the parameter are wrong. | Check and verify whether the required request fields (including the header fields and body fields) of the current API are correctly passed and valid. |
| CURRENCY_NOT_SUPPORT | F | The currency is not supported. | Contact Antom Technical Support for detailed reasons. |