Skip to main content

Exchange Quote

Attention

Cross Border routes are not enabled by default. Before integrating, you must align with Marlim's Risk and Development teams.

Use this route to estimate, before creating the transaction, how much your customer will pay and how much you receive, in both exchange directions.

currencypay_currencyWhat the quote answers
USDBRLPrice announced in dollars and customer paying in reais. This is the direction of the Cross Border transaction, made with a credit card. The net_value is how much will be charged from the customer.
BRLUSDPrice announced in reais and customer paying in dollars. The exchange block shows how much the customer pays and the costs applied.

The pay_currency is always the other side of currency, and can be omitted.

Important

The values returned by this route are an estimate. The exchange rate is only locked at the time of the transaction, and a few cents may vary between the preview and the charge.

When creating the transaction in dollars, send only amount and currency. The net_value is not accepted in that mode, since the amount in reais is calculated from the exchange rate at that moment.

GETv3/crossborder/quotes/preview

Request Query Params​

AttributeTypeDescription
amountint32Announced price, in cents, in the currency set by currency. E.g.: US$ 85.99 → 8599
currencystringOptional parameter that sets the currency of amount, that is, the currency of the announced price. Accepted values: BRL and USD.
Default: BRL
pay_currencystringOptional parameter that sets the currency the customer pays in. It is always the other side: BRL when currency is USD, and USD when it is BRL.

Response​

AttributeTypeDescription
currencystringCurrency of the amount sent.
amountint32The amount sent, in cents.
net_valueint32Estimate, always in cents of real, at the commercial rate and without exchange costs. When the price is announced in dollars, it is the conversion of that amount. When the price is already in reais, it is the amount you sent.
Important

The converted amount must be at least 50 USD. Below that, the route returns the same error as the transaction creation.

Response Example — price in dollars, customer pays in reais
{
"currency": "USD",
"amount": 8599,
"net_value": 44739
}

Reading the example: the product announced at US$ 85.99 will be charged from the customer at around R$ 447.39.

Response Example — price in reais, customer pays in dollars
{
"currency": "BRL",
"amount": 44700,
"net_value": 44700
}

Here the product announced at R$ 447.00 will be charged from the customer at around US$ 86.14.