{
"name": "Euro",
"iso3Code": "EUR",
"symbol": "€",
"decimalPlaces": 2,
"roundDirection": "STANDARD"
}
The currency object is designed to provide as much necessary information as possible for processing and displaying currency values.
Currencies associated with an amount
"sendAmount": {
"value": 1500,
"currency": {
"name": "US Dollar",
"iso3Code": "USD",
"symbol": "$",
"decimalPlaces": 2,
"roundDirection": "STANDARD"
}
}
In the example above the value
is returned as the integer 1500
. The value
property will always be returned as an integer. The decimalPlaces
property of the currency
object can be used to determine what the final value is using the formula below:
Real amount = value / 10^(decimal places)
In the example above this would be 1500 / 10^2 = 15.00.
Some currencies have three decimal places like the Tunisian or Libyan dinar. Others have zero decimal places like the Japanese yen or the Indonesian rupiah. For example, the following send amount represents 2500 Japanese Yen.
"sendAmount": {
"value": 2500,
"currency": {
"name": "Japanese yen",
"iso3Code": "JPY",
"symbol": "¥",
"decimalPlaces": 0,
"roundDirection": "STANDARD"
}
}
Sending currency values to ReadyRemit
The same principle applies when sending currency values to ReadyRemit. For example, when retrieving a quote, the amount
property is required. Prior to sending the amount to the ReadyRemit API it needs to be converted to a "decimal normalized" amount based on the applied currency. For example, if the user typed "25.00" in your "send amount" field and the send currency was set to "USD", then the amount
property sent to ReadyRemit should be formatted as "2500". The calculation for this is
send amount = value * 10^(decimal places)
An example of a cURL request sending this amount would be:
curl --location --request GET 'https://sandbox-api.readyremit.com/v1/quote?dstCountryIso3Code=MEX&srcCurrencyIso3Code=USD&dstCurrencyIso3Code=MXN&transferMethod=BANK_ACCOUNT"eBy=SEND_AMOUNT&amount=2500' \
--header 'Content-Type: application/json' \
--header 'Accept-Language: en-US' \