curl --request GET \
--url https://api.qint.ch/api/v1/merchant/balances/convert/quote \
--cookie qint_session=const options = {method: 'GET', headers: {cookie: 'qint_session='}};
fetch('https://api.qint.ch/api/v1/merchant/balances/convert/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qint.ch/api/v1/merchant/balances/convert/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "qint_session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.qint.ch/api/v1/merchant/balances/convert/quote"
headers = {"cookie": "qint_session="}
response = requests.get(url, headers=headers)
print(response.text){
"fromCurrency": "CHF",
"fromAmount": 2400,
"toCurrency": "CHF",
"toAmount": 2256.48,
"rate": 0.9402,
"rateSource": "<string>",
"rateAt": "2023-11-07T05:31:56Z",
"available": 2400
}{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "An error occurred while processing your request.",
"status": 400,
"detail": "currency must be one of: CHF, EUR, USD, GBP.",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-00"
}{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "An error occurred while processing your request.",
"status": 400,
"detail": "currency must be one of: CHF, EUR, USD, GBP.",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-00"
}{
"title": "An error occurred while processing your request.",
"status": 409,
"detail": "Requested 2400.01 EUR but only 2400.00 EUR is available.",
"code": "insufficient_funds"
}{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "An error occurred while processing your request.",
"status": 400,
"detail": "currency must be one of: CHF, EUR, USD, GBP.",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-00"
}Preview a conversion
What converting a previous-currency balance into the Account Currency would book right now, with the same checks as the conversion itself. Nothing is stored. The dashboard’s Convert dialog shows this preview.
Any member of the merchant account can read it.
curl --request GET \
--url https://api.qint.ch/api/v1/merchant/balances/convert/quote \
--cookie qint_session=const options = {method: 'GET', headers: {cookie: 'qint_session='}};
fetch('https://api.qint.ch/api/v1/merchant/balances/convert/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qint.ch/api/v1/merchant/balances/convert/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "qint_session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.qint.ch/api/v1/merchant/balances/convert/quote"
headers = {"cookie": "qint_session="}
response = requests.get(url, headers=headers)
print(response.text){
"fromCurrency": "CHF",
"fromAmount": 2400,
"toCurrency": "CHF",
"toAmount": 2256.48,
"rate": 0.9402,
"rateSource": "<string>",
"rateAt": "2023-11-07T05:31:56Z",
"available": 2400
}{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "An error occurred while processing your request.",
"status": 400,
"detail": "currency must be one of: CHF, EUR, USD, GBP.",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-00"
}{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "An error occurred while processing your request.",
"status": 400,
"detail": "currency must be one of: CHF, EUR, USD, GBP.",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-00"
}{
"title": "An error occurred while processing your request.",
"status": 409,
"detail": "Requested 2400.01 EUR but only 2400.00 EUR is available.",
"code": "insufficient_funds"
}{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "An error occurred while processing your request.",
"status": 400,
"detail": "currency must be one of: CHF, EUR, USD, GBP.",
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-00"
}Authorizations
The signed-in session of the Qint dashboard (dashboard.qint.ch). Only the Dashboard endpoints use it; API keys are not accepted there.
Headers
The merchant account to act on, for users with access to more than one. Not needed when the user belongs to a single merchant account.
Query Parameters
The previous-currency balance to convert. The fiat currency new payments are credited in (CHF unless the merchant chooses otherwise). It can change at any time; a balance in a previous Account Currency stays in that currency. Every payment is credited in the Account Currency of its quote, at the rate fixed when the buyer was quoted.
CHF, EUR, USD, GBP The amount to convert, in fromCurrency, kept to the cent. Omitted, the whole available amount of that balance.
Response
The preview.
What a conversion would book now. Nothing is stored.
The fiat currency new payments are credited in (CHF unless the merchant chooses otherwise). It can change at any time; a balance in a previous Account Currency stays in that currency. Every payment is credited in the Account Currency of its quote, at the rate fixed when the buyer was quoted.
CHF, EUR, USD, GBP 2400
The fiat currency new payments are credited in (CHF unless the merchant chooses otherwise). It can change at any time; a balance in a previous Account Currency stays in that currency. Every payment is credited in the Account Currency of its quote, at the rate fixed when the buyer was quoted.
CHF, EUR, USD, GBP 2256.48
Units of toCurrency per 1 unit of fromCurrency.
0.9402
The available amount of the fromCurrency balance the preview was checked against.
2400