请求收款 OTP
curl --request POST \
--url https://api.qbank.cl/platform/v1/payins/collect/otp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "debito_inmediato",
"amount": "1200.00",
"payer_document": "V12345678",
"payer_phone": "04141234567",
"payer_bank": "0102",
"payer_account": 1020123456789012400
}
'import requests
url = "https://api.qbank.cl/platform/v1/payins/collect/otp"
payload = {
"method": "debito_inmediato",
"amount": "1200.00",
"payer_document": "V12345678",
"payer_phone": "04141234567",
"payer_bank": "0102",
"payer_account": 1020123456789012400
}
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({
method: 'debito_inmediato',
amount: '1200.00',
payer_document: 'V12345678',
payer_phone: '04141234567',
payer_bank: '0102',
payer_account: 1020123456789012400
})
};
fetch('https://api.qbank.cl/platform/v1/payins/collect/otp', 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/payins/collect/otp",
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([
'method' => 'debito_inmediato',
'amount' => '1200.00',
'payer_document' => 'V12345678',
'payer_phone' => '04141234567',
'payer_bank' => '0102',
'payer_account' => 1020123456789012400
]),
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/payins/collect/otp"
payload := strings.NewReader("{\n \"method\": \"debito_inmediato\",\n \"amount\": \"1200.00\",\n \"payer_document\": \"V12345678\",\n \"payer_phone\": \"04141234567\",\n \"payer_bank\": \"0102\",\n \"payer_account\": 1020123456789012400\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/payins/collect/otp")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"debito_inmediato\",\n \"amount\": \"1200.00\",\n \"payer_document\": \"V12345678\",\n \"payer_phone\": \"04141234567\",\n \"payer_bank\": \"0102\",\n \"payer_account\": 1020123456789012400\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/payins/collect/otp")
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 \"method\": \"debito_inmediato\",\n \"amount\": \"1200.00\",\n \"payer_document\": \"V12345678\",\n \"payer_phone\": \"04141234567\",\n \"payer_bank\": \"0102\",\n \"payer_account\": 1020123456789012400\n}"
response = http.request(request)
puts response.read_body{
"method": "debito_inmediato",
"result": {
"status": "sent",
"otp_reference": "OTP-5521"
}
}{
"error": "invalid_request",
"message": "method is required"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "core_unavailable",
"message": "could not request the OTP"
}请求收款 OTP
请求部分 pull 方式在扣款前所需的一次性密码(例如即时借记)。免费。
POST
/
v1
/
payins
/
collect
/
otp
请求收款 OTP
curl --request POST \
--url https://api.qbank.cl/platform/v1/payins/collect/otp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "debito_inmediato",
"amount": "1200.00",
"payer_document": "V12345678",
"payer_phone": "04141234567",
"payer_bank": "0102",
"payer_account": 1020123456789012400
}
'import requests
url = "https://api.qbank.cl/platform/v1/payins/collect/otp"
payload = {
"method": "debito_inmediato",
"amount": "1200.00",
"payer_document": "V12345678",
"payer_phone": "04141234567",
"payer_bank": "0102",
"payer_account": 1020123456789012400
}
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({
method: 'debito_inmediato',
amount: '1200.00',
payer_document: 'V12345678',
payer_phone: '04141234567',
payer_bank: '0102',
payer_account: 1020123456789012400
})
};
fetch('https://api.qbank.cl/platform/v1/payins/collect/otp', 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/payins/collect/otp",
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([
'method' => 'debito_inmediato',
'amount' => '1200.00',
'payer_document' => 'V12345678',
'payer_phone' => '04141234567',
'payer_bank' => '0102',
'payer_account' => 1020123456789012400
]),
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/payins/collect/otp"
payload := strings.NewReader("{\n \"method\": \"debito_inmediato\",\n \"amount\": \"1200.00\",\n \"payer_document\": \"V12345678\",\n \"payer_phone\": \"04141234567\",\n \"payer_bank\": \"0102\",\n \"payer_account\": 1020123456789012400\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/payins/collect/otp")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"debito_inmediato\",\n \"amount\": \"1200.00\",\n \"payer_document\": \"V12345678\",\n \"payer_phone\": \"04141234567\",\n \"payer_bank\": \"0102\",\n \"payer_account\": 1020123456789012400\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/payins/collect/otp")
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 \"method\": \"debito_inmediato\",\n \"amount\": \"1200.00\",\n \"payer_document\": \"V12345678\",\n \"payer_phone\": \"04141234567\",\n \"payer_bank\": \"0102\",\n \"payer_account\": 1020123456789012400\n}"
response = http.request(request)
puts response.read_body{
"method": "debito_inmediato",
"result": {
"status": "sent",
"otp_reference": "OTP-5521"
}
}{
"error": "invalid_request",
"message": "method is required"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "core_unavailable",
"message": "could not request the OTP"
}授权
会话 JWT(来自注册/登录)或 API key(pk_...)。
也接受 X-API-Key: <token> 作为替代请求头。
请求体
application/json
最后修改于 2026年7月19日
⌘I