Calculate fees
Estimates the fees for a payment between two of the entity’s accounts, without creating one. Fees depend on the originating account, the receiving account, the deliveryPreference, and the amount. All amounts are in minor units (cents).
For a payment that converts currency this prices the fees only; use POST /tools/fx-quote for the exchange rate and the amount that would be debited.
const options = {
method: 'POST',
headers: {
'Melio-Entity-Id': '<melio-entity-id>',
'api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
originatingAccountId: 'acct_3f2504e0-4f89-41d3-9a0c-0305e82c3301',
receivingAccountId: 'acct_9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d',
deliveryPreference: 'same-day-ach',
amount: 125000
})
};
fetch('https://api.melio.com/v2/tools/fee-calculator', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"type": "same-day-ach",
"chargeTo": "originator",
"percent": {
"rate": 0.5,
"max": 3000
},
"amount": 625
}
]Headers
Body
The delivery preference to price. Its rail must match the receiving account, and only the values allowed for the originating account are accepted (see CreatePaymentRequest.deliveryPreference — card-funded ACH/wire payments use same-day-ach / instant-domestic-wire). The normal-speed values (standard-ach, standard-check, domestic-wire, virtual-card) price that rail at normal speed.
standard-ach, same-day-ach, rtp, standard-check, express-check, overnight-check, domestic-wire, instant-domestic-wire, virtual-card, instant-virtual-card, counterparty-choice, international-fx, fast-international-fx, international-gusd Response
Calculated fees.
What the fee is for. Delivery-method fees use the delivery preference they apply to (standard-ach, same-day-ach, rtp, standard-check, express-check, overnight-check, domestic-wire, instant-domestic-wire, counterparty-choice, international-fx, fast-international-fx, international-gusd); funding-source fees use the funding-source type (card).
standard-ach, same-day-ach, rtp, standard-check, express-check, overnight-check, domestic-wire, instant-domestic-wire, counterparty-choice, international-fx, fast-international-fx, international-gusd, card const options = {
method: 'POST',
headers: {
'Melio-Entity-Id': '<melio-entity-id>',
'api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
originatingAccountId: 'acct_3f2504e0-4f89-41d3-9a0c-0305e82c3301',
receivingAccountId: 'acct_9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d',
deliveryPreference: 'same-day-ach',
amount: 125000
})
};
fetch('https://api.melio.com/v2/tools/fee-calculator', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"type": "same-day-ach",
"chargeTo": "originator",
"percent": {
"rate": 0.5,
"max": 3000
},
"amount": 625
}
]