getTransferQuote

The mutation will also return the fee required for the payment.

Sandbox rates do not represent real world pricing

If you need to update the transfer amount, you may send an updated source_amount or destination_amount. However, you cannot send both amounts simultaneously. Upon executing the mutation, it will return the other amount based on the exchange rate and the fee, which will always be in the source_currency of the transfer.

An exchange rate represents the value relationship between two currencies. For example, if 1 USD equals 0.83 EUR, it means 1 USD has the equivalent value of 0.83 EUR in the market.

rate vs inverse rate

The rate, i.e. the 'forward' rate and the inverted_rate, i.e. the 'inverse' rate, describe the currency direction of the rate. In the paragraph above we stated that 1 USD is equivalent to 0.83 EUR.

This means if you were paying a beneficiary in EUR and funding the payment with USD the forward rate would be 0.83 whereas the inverse rate would be 1.2048192.

The forward rate is always the value of the destination currency relative to 1 unit of the source currency.

The inverse rate is the value of the source currency relative to 1 unit of the destination currency.

Parameters

Parameter Type Required
transfer_id UUID false*
wallet_transfer_id UUID false*
source_amount String false
destination_amount String false

query

string

Defaults to {}

``200 200

object

data

object

getTransferQuote

object

getTransferQuote object

``400 400

var axios = require('axios');

var data = JSON.stringify({

query: `mutation getTransferQuote ($transfer_id: UUID!) {

getTransferQuote (transfer_id: $transfer_id) {

rate

inverted_rate

source_amount

destination_amount

}

}`,

variables: {"transfer_id":"18ea46e5-2c36-4862-9eac-adc44364df7b"} });

var config = {

method: 'post',

url: 'https://sandbox.external.routefusion.com/graphql',

headers: {

'Authorization': 'Bearer ',

'Content-Type': 'application/json'

},

data : data };

axios(config) .then(function (response) {

console.log(JSON.stringify(response.data));

}) .catch(function (error) {

console.log(error);

});

{

"data": {

"getTransferQuote": {

"rate": "20.0872",

"inverted_rate": "0.04978294635",

"source_amount": "101.50",

"destination_amount": "2008.72",

"fee": "1.50"

}

} }