inquireExchangeRate
The inquireExchangeRate API is used to inquire about the exchange rates between payment currencies and all supported currencies.
Request parameters
productCode String REQUIRED
Represents the payment product that is being used, which is stipulated in the contract. The valid values include:
CASHIER_PAYMENT: indicates the payment product that is being used is One-time Payments.AGREEMENT_PAYMENT: indicates the payment product that is being used is Auto Debit.
More information:
- Maximum length: 64 characters
buyCurrency String
The purchase currency, that refers to the currency used to price the goods during the buyer's payment process to the merchant. The value is a 3-letter currency code that follows the ISO 4217 standard.
More information:
- Maximum length: 3 characters
sellCurrency String
The sell currency, that refers to the currency used by the buyer to make payments to the merchant during the transaction process. The value is a 3-letter currency code that follows the ISO 4217 standard.
More information:
- Maximum length: 3 characters
rateType String
Exchange rate type. The default value is TRADE when not provided by the merchant. Valid values include:
TRADE: Indicates that the exchange rate type is payment exchange rate.REFERENCE_TRADE: Indicates that the exchange rate type is reference payment exchange rate.-
REFERENCE:Indicates that the exchange rate type is reference exchange rate.
More information:
- Maximum length: 64 characters
currencyPairs Array<CurrencyPair>
List of currency pairs, supporting up to 100 at a time.
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.
paymentQuotes Object REQUIRED
A list of exchange rates that can be directly used in multiplication calculations, supporting multiple currency pairs.
Request
Response
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. |