主动收款(pull)
curl --request POST \
--url https://api.qbank.cl/platform/v1/payins/collect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "c2p",
"amount": "1200.00",
"description": "订单 5512",
"payer_document": "V12345678",
"payer_phone": "04141234567",
"payer_bank": "0102",
"otp": "12345678",
"idempotency_key": "collect-2026-07-07-a"
}
'import requests
url = "https://api.qbank.cl/platform/v1/payins/collect"
payload = {
"method": "c2p",
"amount": "1200.00",
"description": "订单 5512",
"payer_document": "V12345678",
"payer_phone": "04141234567",
"payer_bank": "0102",
"otp": "12345678",
"idempotency_key": "collect-2026-07-07-a"
}
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: 'c2p',
amount: '1200.00',
description: '订单 5512',
payer_document: 'V12345678',
payer_phone: '04141234567',
payer_bank: '0102',
otp: '12345678',
idempotency_key: 'collect-2026-07-07-a'
})
};
fetch('https://api.qbank.cl/platform/v1/payins/collect', 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",
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' => 'c2p',
'amount' => '1200.00',
'description' => '订单 5512',
'payer_document' => 'V12345678',
'payer_phone' => '04141234567',
'payer_bank' => '0102',
'otp' => '12345678',
'idempotency_key' => 'collect-2026-07-07-a'
]),
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"
payload := strings.NewReader("{\n \"method\": \"c2p\",\n \"amount\": \"1200.00\",\n \"description\": \"订单 5512\",\n \"payer_document\": \"V12345678\",\n \"payer_phone\": \"04141234567\",\n \"payer_bank\": \"0102\",\n \"otp\": \"12345678\",\n \"idempotency_key\": \"collect-2026-07-07-a\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"c2p\",\n \"amount\": \"1200.00\",\n \"description\": \"订单 5512\",\n \"payer_document\": \"V12345678\",\n \"payer_phone\": \"04141234567\",\n \"payer_bank\": \"0102\",\n \"otp\": \"12345678\",\n \"idempotency_key\": \"collect-2026-07-07-a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/payins/collect")
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\": \"c2p\",\n \"amount\": \"1200.00\",\n \"description\": \"订单 5512\",\n \"payer_document\": \"V12345678\",\n \"payer_phone\": \"04141234567\",\n \"payer_bank\": \"0102\",\n \"otp\": \"12345678\",\n \"idempotency_key\": \"collect-2026-07-07-a\"\n}"
response = http.request(request)
puts response.read_body{
"payin_id": "7b3c9e2f-1a2b-3c4d-5e6f-7a8b9c0d1e2f",
"account_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"kind": "collect",
"country": "VE",
"currency": "VES",
"method": "c2p",
"local_amount": "1200.00",
"status": "credited",
"reference": "REF-102030",
"fx_rate": "36.50",
"usdt_gross": "32.876712",
"fee": "0.300000",
"usdt_credited": "32.576712",
"paid": true,
"provider_reference": "PRV-889911",
"status_code": "00",
"status_message": "approved",
"created_at": "2026-07-07T12:00:00Z",
"updated_at": "2026-07-07T12:00:02Z"
}{
"error": "invalid_request",
"message": "method is required (e.g. c2p, debito_inmediato)"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "account_blocked",
"message": "account is not active"
}{
"error": "core_unavailable",
"message": "could not execute the collection"
}主动收款(pull)
在支持 pull 收款的通道(例如委内瑞拉 c2p / debito_inmediato)直接向付款人扣款。同步执行:若扣款获批,存款按你当前的 payin_rate 转换并在同一调用中入账,已扣除 payin 费用。若付款人拒绝,paid 为 false,payin 标记为 failed 且不产生任何扣款。
POST
/
v1
/
payins
/
collect
主动收款(pull)
curl --request POST \
--url https://api.qbank.cl/platform/v1/payins/collect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "c2p",
"amount": "1200.00",
"description": "订单 5512",
"payer_document": "V12345678",
"payer_phone": "04141234567",
"payer_bank": "0102",
"otp": "12345678",
"idempotency_key": "collect-2026-07-07-a"
}
'import requests
url = "https://api.qbank.cl/platform/v1/payins/collect"
payload = {
"method": "c2p",
"amount": "1200.00",
"description": "订单 5512",
"payer_document": "V12345678",
"payer_phone": "04141234567",
"payer_bank": "0102",
"otp": "12345678",
"idempotency_key": "collect-2026-07-07-a"
}
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: 'c2p',
amount: '1200.00',
description: '订单 5512',
payer_document: 'V12345678',
payer_phone: '04141234567',
payer_bank: '0102',
otp: '12345678',
idempotency_key: 'collect-2026-07-07-a'
})
};
fetch('https://api.qbank.cl/platform/v1/payins/collect', 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",
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' => 'c2p',
'amount' => '1200.00',
'description' => '订单 5512',
'payer_document' => 'V12345678',
'payer_phone' => '04141234567',
'payer_bank' => '0102',
'otp' => '12345678',
'idempotency_key' => 'collect-2026-07-07-a'
]),
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"
payload := strings.NewReader("{\n \"method\": \"c2p\",\n \"amount\": \"1200.00\",\n \"description\": \"订单 5512\",\n \"payer_document\": \"V12345678\",\n \"payer_phone\": \"04141234567\",\n \"payer_bank\": \"0102\",\n \"otp\": \"12345678\",\n \"idempotency_key\": \"collect-2026-07-07-a\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"c2p\",\n \"amount\": \"1200.00\",\n \"description\": \"订单 5512\",\n \"payer_document\": \"V12345678\",\n \"payer_phone\": \"04141234567\",\n \"payer_bank\": \"0102\",\n \"otp\": \"12345678\",\n \"idempotency_key\": \"collect-2026-07-07-a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/payins/collect")
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\": \"c2p\",\n \"amount\": \"1200.00\",\n \"description\": \"订单 5512\",\n \"payer_document\": \"V12345678\",\n \"payer_phone\": \"04141234567\",\n \"payer_bank\": \"0102\",\n \"otp\": \"12345678\",\n \"idempotency_key\": \"collect-2026-07-07-a\"\n}"
response = http.request(request)
puts response.read_body{
"payin_id": "7b3c9e2f-1a2b-3c4d-5e6f-7a8b9c0d1e2f",
"account_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"kind": "collect",
"country": "VE",
"currency": "VES",
"method": "c2p",
"local_amount": "1200.00",
"status": "credited",
"reference": "REF-102030",
"fx_rate": "36.50",
"usdt_gross": "32.876712",
"fee": "0.300000",
"usdt_credited": "32.576712",
"paid": true,
"provider_reference": "PRV-889911",
"status_code": "00",
"status_message": "approved",
"created_at": "2026-07-07T12:00:00Z",
"updated_at": "2026-07-07T12:00:02Z"
}{
"error": "invalid_request",
"message": "method is required (e.g. c2p, debito_inmediato)"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "account_blocked",
"message": "account is not active"
}{
"error": "core_unavailable",
"message": "could not execute the collection"
}授权
会话 JWT(来自注册/登录)或 API key(pk_...)。
也接受 X-API-Key: <token> 作为替代请求头。
请求头
idempotency_key 请求体字段的替代方式。
请求体
application/json
收款方式(例如 c2p、debito_inmediato)。
本地金额,正数十进制字符串。
必填——collect 执行真实扣款;使用相同键的重试绝不重复扣款。
响应
收款结果。paid: true 表示存款已入账。
仅当主动收款的 payin 为 failed 时出现:拒绝来源(provider = 付款人的银行,core = 扣款前校验)以及具体的代码和消息。
Show child attributes
Show child attributes
最后修改于 2026年7月19日
⌘I