curl --request PUT \
--url https://api.qbank.cl/platform/v1/settlement \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"default_settlement_asset": "BTC",
"default_payin_asset": "USDC"
}
'import requests
url = "https://api.qbank.cl/platform/v1/settlement"
payload = {
"default_settlement_asset": "BTC",
"default_payin_asset": "USDC"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({default_settlement_asset: 'BTC', default_payin_asset: 'USDC'})
};
fetch('https://api.qbank.cl/platform/v1/settlement', 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.qbank.cl/platform/v1/settlement",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'default_settlement_asset' => 'BTC',
'default_payin_asset' => 'USDC'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.qbank.cl/platform/v1/settlement"
payload := strings.NewReader("{\n \"default_settlement_asset\": \"BTC\",\n \"default_payin_asset\": \"USDC\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.qbank.cl/platform/v1/settlement")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"default_settlement_asset\": \"BTC\",\n \"default_payin_asset\": \"USDC\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/settlement")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"default_settlement_asset\": \"BTC\",\n \"default_payin_asset\": \"USDC\"\n}"
response = http.request(request)
puts response.read_body{
"default_settlement_asset": "BTC",
"default_payin_asset": "USDC",
"enabled_assets": [
"USD",
"USDT",
"USDC",
"BTC",
"GOLD",
"SILVER",
"PLATINUM"
],
"volatile_op_limit_usdt": "10000.000000",
"volatile_daily_limit_usdt": "50000.000000"
}{
"error": "settlement_asset_disabled",
"message": "settlement asset is disabled for this organization"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "account_required",
"message": "this endpoint requires an account credential"
}Definir mis saldos predeterminados (payouts y payins)
Cambia tus saldos predeterminados. default_settlement_asset es el saldo desde el que se debitan tus payouts y comisiones de servicios cuando el request no envía un settlement_asset explícito. default_payin_asset es el saldo en que se acreditan tus payins — con USD (el saldo principal) el neto se acredita directo en centavos USD; con cualquier otro objetivo el neto se auto-convierte vía el motor de swaps al precio real, sin spread de swap adicional (el payin ya pagó su comisión y su tasa; los payins de checkout y POS conservan el asset de su link). Cualquiera de USD, USDT, USDC, BTC, GOLD, SILVER o PLATINUM (si tu organización lo tiene habilitado). Envía uno o ambos campos. El cambio aplica solo a operaciones nuevas; nada en tránsito se re-cotiza.
curl --request PUT \
--url https://api.qbank.cl/platform/v1/settlement \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"default_settlement_asset": "BTC",
"default_payin_asset": "USDC"
}
'import requests
url = "https://api.qbank.cl/platform/v1/settlement"
payload = {
"default_settlement_asset": "BTC",
"default_payin_asset": "USDC"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({default_settlement_asset: 'BTC', default_payin_asset: 'USDC'})
};
fetch('https://api.qbank.cl/platform/v1/settlement', 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.qbank.cl/platform/v1/settlement",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'default_settlement_asset' => 'BTC',
'default_payin_asset' => 'USDC'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.qbank.cl/platform/v1/settlement"
payload := strings.NewReader("{\n \"default_settlement_asset\": \"BTC\",\n \"default_payin_asset\": \"USDC\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.qbank.cl/platform/v1/settlement")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"default_settlement_asset\": \"BTC\",\n \"default_payin_asset\": \"USDC\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/settlement")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"default_settlement_asset\": \"BTC\",\n \"default_payin_asset\": \"USDC\"\n}"
response = http.request(request)
puts response.read_body{
"default_settlement_asset": "BTC",
"default_payin_asset": "USDC",
"enabled_assets": [
"USD",
"USDT",
"USDC",
"BTC",
"GOLD",
"SILVER",
"PLATINUM"
],
"volatile_op_limit_usdt": "10000.000000",
"volatile_daily_limit_usdt": "50000.000000"
}{
"error": "settlement_asset_disabled",
"message": "settlement asset is disabled for this organization"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "account_required",
"message": "this endpoint requires an account credential"
}Autorizaciones
Cuerpo
Saldo en que se acreditan por defecto los payins. Con USD el neto se acredita directo en centavos USD; con cualquier otro objetivo el neto se auto-convierte vía el motor de swaps al precio real (sin spread de swap adicional). Opcional.
USD, USDT, USDC, BTC, GOLD, SILVER, PLATINUM Respuesta
Configuración de settlement actualizada.
Saldo en que se acreditan por defecto los payins. El crédito entra en el asset principal de la cuenta (USD es el saldo principal); cuando se configura otro asset, el neto se auto-convierte vía el motor de swaps al precio real, sin spread de swap adicional. Checkout/POS conservan el asset de su link.
USD, USDT, USDC, BTC, GOLD, SILVER, PLATINUM