Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Get exchange rates

Returns the indicative exchange rate Cashela applies for a country and payment type. Use it to show your customer an estimate. The amounts that apply to a deposit are the ones in Get payment methods and in the deposit itself.

POST/api/v1/pay-in/deposit-creation/exchange-rates
AuthenticationHTTP Basic (api_key:api_secret)
Moves moneyNo

Request body

FieldTypeRequiredDescription
payment_typestringYesA payment type available for country (for example BANK_TRANSFER).
countrystringYes3-letter ISO code.
amountnumberNoAmount to convert. Positive, at most two decimals.
Terminal window
curl https://sandbox-api.cashela.com/api/v1/pay-in/deposit-creation/exchange-rates \
-u "$CASHELA_API_KEY:$CASHELA_API_SECRET" \
-H "Content-Type: application/json" -H "Accept: application/json" \
-d '{ "payment_type": "BANK_TRANSFER", "country": "CHL", "amount": 25.50 }'

Response 200

{
"success": true,
"data": {
"country": "CHL",
"amount": 25.5,
"exchange_rates": 940.12
},
"message": "Exchange rates retrieved successfully."
}
FieldDescription
countryThe country you asked for.
amountThe amount you sent.
exchange_ratesIndicative rate for the corridor.

Errors

HTTPWhen
404No method of that payment type is available for the country on your account.
422Missing payment_type, unknown country ("The selected country is invalid."), or a malformed amount.
503The exchange rate is temporarily unavailable for this destination. Retry later.

See Errors.