Devolver un cobro POS
curl --request POST \
--url https://api.qbank.cl/platform/v1/pos/charges/{chargeID}/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "25",
"to_address": "TXHkw6bYtL2jExampleDest",
"idempotency_key": "pos-ref-0451-1"
}
'import requests
url = "https://api.qbank.cl/platform/v1/pos/charges/{chargeID}/refund"
payload = {
"amount": "25",
"to_address": "TXHkw6bYtL2jExampleDest",
"idempotency_key": "pos-ref-0451-1"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '25',
to_address: 'TXHkw6bYtL2jExampleDest',
idempotency_key: 'pos-ref-0451-1'
})
};
fetch('https://api.qbank.cl/platform/v1/pos/charges/{chargeID}/refund', 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/pos/charges/{chargeID}/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '25',
'to_address' => 'TXHkw6bYtL2jExampleDest',
'idempotency_key' => 'pos-ref-0451-1'
]),
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/pos/charges/{chargeID}/refund"
payload := strings.NewReader("{\n \"amount\": \"25\",\n \"to_address\": \"TXHkw6bYtL2jExampleDest\",\n \"idempotency_key\": \"pos-ref-0451-1\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.qbank.cl/platform/v1/pos/charges/{chargeID}/refund")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"25\",\n \"to_address\": \"TXHkw6bYtL2jExampleDest\",\n \"idempotency_key\": \"pos-ref-0451-1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/pos/charges/{chargeID}/refund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"25\",\n \"to_address\": \"TXHkw6bYtL2jExampleDest\",\n \"idempotency_key\": \"pos-ref-0451-1\"\n}"
response = http.request(request)
puts response.read_body{
"refund_id": "b92b1ac0-3f38-4613-89e4-3788c53c9778",
"charge_id": "66773a3a-9911-4482-ae3c-09a481aba018",
"withdrawal_id": "4630fe8c-1346-4baf-94f9-8b56c9dbd352",
"amount": "25.000000",
"asset": "USDT",
"to_address": "TXHkw6bYtL2jExampleDest",
"status": "processing",
"tx_id": "7f1f2a3b4c...",
"created_at": "2026-07-17T20:01:00Z",
"updated_at": "2026-07-17T20:01:00Z"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "not_found",
"message": "resource not found"
}{
"error": "refund_exceeds_received",
"message": "the refund amount exceeds what this charge received minus prior refunds"
}Devolver un cobro POS
Devuelve (parte de) lo recibido al pagador como un retiro crypto normal desde el saldo de la cuenta (hold, fee de retiro y todos los controles de compliance del riel). to_address es siempre explícita — jamás se auto-devuelve al origen del depósito. Tope duro: la suma de devoluciones jamás supera lo recibido. idempotency_key obligatoria.
POST
/
v1
/
pos
/
charges
/
{chargeID}
/
refund
Devolver un cobro POS
curl --request POST \
--url https://api.qbank.cl/platform/v1/pos/charges/{chargeID}/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "25",
"to_address": "TXHkw6bYtL2jExampleDest",
"idempotency_key": "pos-ref-0451-1"
}
'import requests
url = "https://api.qbank.cl/platform/v1/pos/charges/{chargeID}/refund"
payload = {
"amount": "25",
"to_address": "TXHkw6bYtL2jExampleDest",
"idempotency_key": "pos-ref-0451-1"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '25',
to_address: 'TXHkw6bYtL2jExampleDest',
idempotency_key: 'pos-ref-0451-1'
})
};
fetch('https://api.qbank.cl/platform/v1/pos/charges/{chargeID}/refund', 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/pos/charges/{chargeID}/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '25',
'to_address' => 'TXHkw6bYtL2jExampleDest',
'idempotency_key' => 'pos-ref-0451-1'
]),
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/pos/charges/{chargeID}/refund"
payload := strings.NewReader("{\n \"amount\": \"25\",\n \"to_address\": \"TXHkw6bYtL2jExampleDest\",\n \"idempotency_key\": \"pos-ref-0451-1\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.qbank.cl/platform/v1/pos/charges/{chargeID}/refund")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"25\",\n \"to_address\": \"TXHkw6bYtL2jExampleDest\",\n \"idempotency_key\": \"pos-ref-0451-1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/pos/charges/{chargeID}/refund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"25\",\n \"to_address\": \"TXHkw6bYtL2jExampleDest\",\n \"idempotency_key\": \"pos-ref-0451-1\"\n}"
response = http.request(request)
puts response.read_body{
"refund_id": "b92b1ac0-3f38-4613-89e4-3788c53c9778",
"charge_id": "66773a3a-9911-4482-ae3c-09a481aba018",
"withdrawal_id": "4630fe8c-1346-4baf-94f9-8b56c9dbd352",
"amount": "25.000000",
"asset": "USDT",
"to_address": "TXHkw6bYtL2jExampleDest",
"status": "processing",
"tx_id": "7f1f2a3b4c...",
"created_at": "2026-07-17T20:01:00Z",
"updated_at": "2026-07-17T20:01:00Z"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "not_found",
"message": "resource not found"
}{
"error": "refund_exceeds_received",
"message": "the refund amount exceeds what this charge received minus prior refunds"
}Autorizaciones
JWT de sesión (de register/login) o llave de API (pk_...).
X-API-Key: <token> se acepta como header alternativo.
Parámetros de ruta
Cuerpo
application/json
Última modificación el 18 de julio de 2026
⌘I