银行付款报价
curl --request POST \
--url https://api.qbank.cl/platform/v1/banking/operations/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "USD",
"type": "WITHDRAW",
"paymentType": "SEPA_CT",
"sourceRequisit": {
"account": "c4d1e2f3-a4b5-c6d7-e8f9-a0b1c2d3e4f5"
},
"destinationRequisit": {
"beneficiar": "BNK-CPACC-11"
},
"amount": {
"currencyCode": "USD",
"units": "250",
"nanos": 0
}
}
'import requests
url = "https://api.qbank.cl/platform/v1/banking/operations/prepare"
payload = {
"currency": "USD",
"type": "WITHDRAW",
"paymentType": "SEPA_CT",
"sourceRequisit": { "account": "c4d1e2f3-a4b5-c6d7-e8f9-a0b1c2d3e4f5" },
"destinationRequisit": { "beneficiar": "BNK-CPACC-11" },
"amount": {
"currencyCode": "USD",
"units": "250",
"nanos": 0
}
}
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({
currency: 'USD',
type: 'WITHDRAW',
paymentType: 'SEPA_CT',
sourceRequisit: {account: 'c4d1e2f3-a4b5-c6d7-e8f9-a0b1c2d3e4f5'},
destinationRequisit: {beneficiar: 'BNK-CPACC-11'},
amount: {currencyCode: 'USD', units: '250', nanos: 0}
})
};
fetch('https://api.qbank.cl/platform/v1/banking/operations/prepare', 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/banking/operations/prepare",
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([
'currency' => 'USD',
'type' => 'WITHDRAW',
'paymentType' => 'SEPA_CT',
'sourceRequisit' => [
'account' => 'c4d1e2f3-a4b5-c6d7-e8f9-a0b1c2d3e4f5'
],
'destinationRequisit' => [
'beneficiar' => 'BNK-CPACC-11'
],
'amount' => [
'currencyCode' => 'USD',
'units' => '250',
'nanos' => 0
]
]),
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/banking/operations/prepare"
payload := strings.NewReader("{\n \"currency\": \"USD\",\n \"type\": \"WITHDRAW\",\n \"paymentType\": \"SEPA_CT\",\n \"sourceRequisit\": {\n \"account\": \"c4d1e2f3-a4b5-c6d7-e8f9-a0b1c2d3e4f5\"\n },\n \"destinationRequisit\": {\n \"beneficiar\": \"BNK-CPACC-11\"\n },\n \"amount\": {\n \"currencyCode\": \"USD\",\n \"units\": \"250\",\n \"nanos\": 0\n }\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/banking/operations/prepare")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"USD\",\n \"type\": \"WITHDRAW\",\n \"paymentType\": \"SEPA_CT\",\n \"sourceRequisit\": {\n \"account\": \"c4d1e2f3-a4b5-c6d7-e8f9-a0b1c2d3e4f5\"\n },\n \"destinationRequisit\": {\n \"beneficiar\": \"BNK-CPACC-11\"\n },\n \"amount\": {\n \"currencyCode\": \"USD\",\n \"units\": \"250\",\n \"nanos\": 0\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/banking/operations/prepare")
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 \"currency\": \"USD\",\n \"type\": \"WITHDRAW\",\n \"paymentType\": \"SEPA_CT\",\n \"sourceRequisit\": {\n \"account\": \"c4d1e2f3-a4b5-c6d7-e8f9-a0b1c2d3e4f5\"\n },\n \"destinationRequisit\": {\n \"beneficiar\": \"BNK-CPACC-11\"\n },\n \"amount\": {\n \"currencyCode\": \"USD\",\n \"units\": \"250\",\n \"nanos\": 0\n }\n}"
response = http.request(request)
puts response.read_body{
"preview": {
"fee": {
"units": "1",
"nanos": 500000000
},
"valid": true
}
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "no_banking_customer",
"message": "create your banking customer first (POST /v1/banking/customer)"
}{
"error": {
"code": "banking_request_failed",
"message": "request rejected"
}
}银行付款报价
校验并报价一笔操作(费用、余额)而不划转资金。免费。
POST
/
v1
/
banking
/
operations
/
prepare
银行付款报价
curl --request POST \
--url https://api.qbank.cl/platform/v1/banking/operations/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "USD",
"type": "WITHDRAW",
"paymentType": "SEPA_CT",
"sourceRequisit": {
"account": "c4d1e2f3-a4b5-c6d7-e8f9-a0b1c2d3e4f5"
},
"destinationRequisit": {
"beneficiar": "BNK-CPACC-11"
},
"amount": {
"currencyCode": "USD",
"units": "250",
"nanos": 0
}
}
'import requests
url = "https://api.qbank.cl/platform/v1/banking/operations/prepare"
payload = {
"currency": "USD",
"type": "WITHDRAW",
"paymentType": "SEPA_CT",
"sourceRequisit": { "account": "c4d1e2f3-a4b5-c6d7-e8f9-a0b1c2d3e4f5" },
"destinationRequisit": { "beneficiar": "BNK-CPACC-11" },
"amount": {
"currencyCode": "USD",
"units": "250",
"nanos": 0
}
}
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({
currency: 'USD',
type: 'WITHDRAW',
paymentType: 'SEPA_CT',
sourceRequisit: {account: 'c4d1e2f3-a4b5-c6d7-e8f9-a0b1c2d3e4f5'},
destinationRequisit: {beneficiar: 'BNK-CPACC-11'},
amount: {currencyCode: 'USD', units: '250', nanos: 0}
})
};
fetch('https://api.qbank.cl/platform/v1/banking/operations/prepare', 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/banking/operations/prepare",
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([
'currency' => 'USD',
'type' => 'WITHDRAW',
'paymentType' => 'SEPA_CT',
'sourceRequisit' => [
'account' => 'c4d1e2f3-a4b5-c6d7-e8f9-a0b1c2d3e4f5'
],
'destinationRequisit' => [
'beneficiar' => 'BNK-CPACC-11'
],
'amount' => [
'currencyCode' => 'USD',
'units' => '250',
'nanos' => 0
]
]),
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/banking/operations/prepare"
payload := strings.NewReader("{\n \"currency\": \"USD\",\n \"type\": \"WITHDRAW\",\n \"paymentType\": \"SEPA_CT\",\n \"sourceRequisit\": {\n \"account\": \"c4d1e2f3-a4b5-c6d7-e8f9-a0b1c2d3e4f5\"\n },\n \"destinationRequisit\": {\n \"beneficiar\": \"BNK-CPACC-11\"\n },\n \"amount\": {\n \"currencyCode\": \"USD\",\n \"units\": \"250\",\n \"nanos\": 0\n }\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/banking/operations/prepare")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"USD\",\n \"type\": \"WITHDRAW\",\n \"paymentType\": \"SEPA_CT\",\n \"sourceRequisit\": {\n \"account\": \"c4d1e2f3-a4b5-c6d7-e8f9-a0b1c2d3e4f5\"\n },\n \"destinationRequisit\": {\n \"beneficiar\": \"BNK-CPACC-11\"\n },\n \"amount\": {\n \"currencyCode\": \"USD\",\n \"units\": \"250\",\n \"nanos\": 0\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/banking/operations/prepare")
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 \"currency\": \"USD\",\n \"type\": \"WITHDRAW\",\n \"paymentType\": \"SEPA_CT\",\n \"sourceRequisit\": {\n \"account\": \"c4d1e2f3-a4b5-c6d7-e8f9-a0b1c2d3e4f5\"\n },\n \"destinationRequisit\": {\n \"beneficiar\": \"BNK-CPACC-11\"\n },\n \"amount\": {\n \"currencyCode\": \"USD\",\n \"units\": \"250\",\n \"nanos\": 0\n }\n}"
response = http.request(request)
puts response.read_body{
"preview": {
"fee": {
"units": "1",
"nanos": 500000000
},
"valid": true
}
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "no_banking_customer",
"message": "create your banking customer first (POST /v1/banking/customer)"
}{
"error": {
"code": "banking_request_failed",
"message": "request rejected"
}
}授权
会话 JWT(来自注册/登录)或 API key(pk_...)。
也接受 X-API-Key: <token> 作为替代请求头。
请求体
application/json
响应
报价预览。
The response is of type object.
最后修改于 2026年7月19日
⌘I