Skip to main content
POST
/
v1
/
fee-calculation
Calculate Exchange Rates
curl --request POST \
  --url https://sandbox.api.fin.com/v1/fee-calculation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source_currency": "USD",
  "source_amount": 3508679,
  "destination_amount": 59456,
  "destination_currency": "CAD",
  "beneficiary_id": "ceb7e6c9-ef2a-41c2-8459-38d67ec3c655"
}
'
{
  "data": {
    "source_currency": "USD",
    "destination_currency": "CAD",
    "source_amount": 3508679,
    "exchange_rate": 1.45,
    "destination_amount": 508679,
    "valid_till": "2026-01-19T09:59:29Z",
    "fee": {
      "fixed": 25,
      "percentage": 4,
      "total": 29,
      "is_fee_applied": true
    }
  }
}
You can use this API to:
  • Calculate the source amount to transact with based on destination amount you are required to send
  • Calculate the destination amount based on the source amount you want to transact with
  • Calculate the developer fees (your fees) based on the beneficiary id you intend to send to
With respect to the above capabilities, you can either pass source_amount or destination_amount and the API will calculate the other based on the exchange rate. If you want to make the calculation developer fee aware, you may pass in beneficiary_id instead of destination_currency (the beneficiary model already has destination currency information). The response will contain the developer fee if based on the values set when creating the beneficiary. When using beneficiary_id, source_currency and destination_currency are optional as the beneficiary model already contains this information.

Authorizations

Authorization
string
header
required

Bearer token authentication. Obtain token from /v1/oauth/token endpoint

Body

application/json
source_currency
string

ISO 4217 source currency code

Pattern: ^[A-Z]{3}$
Example:

"USD"

source_amount
number

Amount in source currency

Example:

3508679

destination_amount
number

Amount in destination currency

Example:

59456

destination_currency
string

ISO 4217 destination currency code

Pattern: ^[A-Z]{3}$
Example:

"CAD"

beneficiary_id
string<uuid>

Unique identifier for the beneficiary

Example:

"ceb7e6c9-ef2a-41c2-8459-38d67ec3c655"

Response

Fee calculation completed successfully

data
object