Fees

Calculate fees

POST
Calculate the fees associated with an payment given the amount, payment source, and disbursement method. Can be used to calculate fees for a payment before creating an invoice.

Request

This endpoint expects an object.
amount
doubleRequired
Total amount in major units. If the entered amount has more decimal places than the currency supports, trailing decimals will be truncated.
paymentSourceId
stringRequired
ID of payment source.
paymentDestinationId
stringRequired
ID of payment destination.
currency
enumOptional
Currency code for the amount. Defaults to USD.
paymentDestinationOptions
unionOptional
Options for the payment destination. Depending on the payment destination, this may include things such as check delivery method.

Response

This endpoint returns an object
sourcePaymentMethodFee
double
Fee charged to the platform (C1) for processing the source payment method. For example, credit card interchange and acquiring fees.
sourcePlatformMarkupFee
double
Fee charged to the payer (C2).
destinationPaymentMethodFee
double
Fee charged to the platform (C1) for processing the destination payment method. For example, postage for a check payment.
destinationPlatformMarkupFee
double
Fee charged to the payee (C3).
POST
1curl -X POST https://api.mercoa.com/fees \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "amount": 1,
6 "paymentSourceId": "string",
7 "paymentDestinationId": "string"
8}'
200
Successful
1{
2 "sourcePaymentMethodFee": 1,
3 "sourcePlatformMarkupFee": 1,
4 "destinationPaymentMethodFee": 1,
5 "destinationPlatformMarkupFee": 1
6}