创建 PIX 提现
curl --request POST \
--url https://api.jetpag.com/v2/withdrawals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pixKey": "12345678901",
"pixKeyType": "cpf",
"holderName": "João da Silva",
"holderDocument": "12345678901",
"holderDocumentType": "cpf",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 150.75,
"netAmount": 150,
"externalReference": "saque-empresa-001"
}
'import requests
url = "https://api.jetpag.com/v2/withdrawals"
payload = {
"pixKey": "12345678901",
"pixKeyType": "cpf",
"holderName": "João da Silva",
"holderDocument": "12345678901",
"holderDocumentType": "cpf",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 150.75,
"netAmount": 150,
"externalReference": "saque-empresa-001"
}
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({
pixKey: '12345678901',
pixKeyType: 'cpf',
holderName: 'João da Silva',
holderDocument: '12345678901',
holderDocumentType: 'cpf',
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 150.75,
netAmount: 150,
externalReference: 'saque-empresa-001'
})
};
fetch('https://api.jetpag.com/v2/withdrawals', 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.jetpag.com/v2/withdrawals",
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([
'pixKey' => '12345678901',
'pixKeyType' => 'cpf',
'holderName' => 'João da Silva',
'holderDocument' => '12345678901',
'holderDocumentType' => 'cpf',
'projectId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 150.75,
'netAmount' => 150,
'externalReference' => 'saque-empresa-001'
]),
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.jetpag.com/v2/withdrawals"
payload := strings.NewReader("{\n \"pixKey\": \"12345678901\",\n \"pixKeyType\": \"cpf\",\n \"holderName\": \"João da Silva\",\n \"holderDocument\": \"12345678901\",\n \"holderDocumentType\": \"cpf\",\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 150.75,\n \"netAmount\": 150,\n \"externalReference\": \"saque-empresa-001\"\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.jetpag.com/v2/withdrawals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pixKey\": \"12345678901\",\n \"pixKeyType\": \"cpf\",\n \"holderName\": \"João da Silva\",\n \"holderDocument\": \"12345678901\",\n \"holderDocumentType\": \"cpf\",\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 150.75,\n \"netAmount\": 150,\n \"externalReference\": \"saque-empresa-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jetpag.com/v2/withdrawals")
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 \"pixKey\": \"12345678901\",\n \"pixKeyType\": \"cpf\",\n \"holderName\": \"João da Silva\",\n \"holderDocument\": \"12345678901\",\n \"holderDocumentType\": \"cpf\",\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 150.75,\n \"netAmount\": 150,\n \"externalReference\": \"saque-empresa-001\"\n}"
response = http.request(request)
puts response.read_body{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"amount": 150.75,
"feeAmount": 2.5,
"netAmount": 148.25,
"status": "completed",
"snapshotHolderName": "João da Silva",
"snapshotHolderDocument": "12345678901",
"createdAt": "2026-02-10T14:30:00.000Z",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshotPixKey": "12345678901",
"snapshotPixKeyType": "cpf",
"failureReason": null,
"pspReference": null,
"processedAt": "2026-02-10T14:30:01.000Z",
"externalReference": "saque-empresa-001"
}{
"statusCode": 400,
"error": "BadRequest",
"message": "name must be longer than or equal to 2 characters",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication token is required",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "You do not have permission to access this resource",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 404,
"error": "NotFound",
"message": "Resource with id 550e8400-e29b-41d4-a716-446655440000 not found",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {
"resource": "Example",
"id": "550e8400-e29b-41d4-a716-446655440000"
},
"traceId": "<string>"
}{
"statusCode": 500,
"error": "InternalError",
"message": "An unexpected error occurred",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "2771463d58840c8e116dc6dda1e1e5d0"
}提现
创建 PIX 提现
提供 PIX 密钥和收款账户持有人信息,创建一笔新的 PIX 提现。
所需权限: WITHDRAWAL:WRITE 或 FULL_ACCESS
IP 限制: 如果凭证配置了允许的 IP 列表,来自列表之外的请求将以 403 被拒绝。建议为拥有此权限的凭证配置。
POST
/
withdrawals
创建 PIX 提现
curl --request POST \
--url https://api.jetpag.com/v2/withdrawals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pixKey": "12345678901",
"pixKeyType": "cpf",
"holderName": "João da Silva",
"holderDocument": "12345678901",
"holderDocumentType": "cpf",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 150.75,
"netAmount": 150,
"externalReference": "saque-empresa-001"
}
'import requests
url = "https://api.jetpag.com/v2/withdrawals"
payload = {
"pixKey": "12345678901",
"pixKeyType": "cpf",
"holderName": "João da Silva",
"holderDocument": "12345678901",
"holderDocumentType": "cpf",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 150.75,
"netAmount": 150,
"externalReference": "saque-empresa-001"
}
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({
pixKey: '12345678901',
pixKeyType: 'cpf',
holderName: 'João da Silva',
holderDocument: '12345678901',
holderDocumentType: 'cpf',
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 150.75,
netAmount: 150,
externalReference: 'saque-empresa-001'
})
};
fetch('https://api.jetpag.com/v2/withdrawals', 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.jetpag.com/v2/withdrawals",
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([
'pixKey' => '12345678901',
'pixKeyType' => 'cpf',
'holderName' => 'João da Silva',
'holderDocument' => '12345678901',
'holderDocumentType' => 'cpf',
'projectId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 150.75,
'netAmount' => 150,
'externalReference' => 'saque-empresa-001'
]),
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.jetpag.com/v2/withdrawals"
payload := strings.NewReader("{\n \"pixKey\": \"12345678901\",\n \"pixKeyType\": \"cpf\",\n \"holderName\": \"João da Silva\",\n \"holderDocument\": \"12345678901\",\n \"holderDocumentType\": \"cpf\",\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 150.75,\n \"netAmount\": 150,\n \"externalReference\": \"saque-empresa-001\"\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.jetpag.com/v2/withdrawals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pixKey\": \"12345678901\",\n \"pixKeyType\": \"cpf\",\n \"holderName\": \"João da Silva\",\n \"holderDocument\": \"12345678901\",\n \"holderDocumentType\": \"cpf\",\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 150.75,\n \"netAmount\": 150,\n \"externalReference\": \"saque-empresa-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jetpag.com/v2/withdrawals")
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 \"pixKey\": \"12345678901\",\n \"pixKeyType\": \"cpf\",\n \"holderName\": \"João da Silva\",\n \"holderDocument\": \"12345678901\",\n \"holderDocumentType\": \"cpf\",\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 150.75,\n \"netAmount\": 150,\n \"externalReference\": \"saque-empresa-001\"\n}"
response = http.request(request)
puts response.read_body{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"amount": 150.75,
"feeAmount": 2.5,
"netAmount": 148.25,
"status": "completed",
"snapshotHolderName": "João da Silva",
"snapshotHolderDocument": "12345678901",
"createdAt": "2026-02-10T14:30:00.000Z",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshotPixKey": "12345678901",
"snapshotPixKeyType": "cpf",
"failureReason": null,
"pspReference": null,
"processedAt": "2026-02-10T14:30:01.000Z",
"externalReference": "saque-empresa-001"
}{
"statusCode": 400,
"error": "BadRequest",
"message": "name must be longer than or equal to 2 characters",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication token is required",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "You do not have permission to access this resource",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 404,
"error": "NotFound",
"message": "Resource with id 550e8400-e29b-41d4-a716-446655440000 not found",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {
"resource": "Example",
"id": "550e8400-e29b-41d4-a716-446655440000"
},
"traceId": "<string>"
}{
"statusCode": 500,
"error": "InternalError",
"message": "An unexpected error occurred",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "2771463d58840c8e116dc6dda1e1e5d0"
}异步处理。 创建提现时返回的是非终态状态(
pending 或 processing)——最终结果始终通过 webhook 送达(withdrawal.completed 或 withdrawal.failed)。请以 webhook 为准;不要把创建接口的响应当作最终结果。校验错误(余额不足、超出限额、数据无效)会在调用本身直接返回错误。发送队列
提现被受理后,会进入向支付机构发送的队列。大多数情况下会立即发送;在交易高峰期可能需要几秒到几分钟,等待期间提现保持processing 状态。
- 按到达顺序。 提现按创建顺序依次发送。
- 不存在的密钥代价高昂。 每笔提现都会在 DICT 中查询目标 PIX 密钥,而巴西中央银行对这类查询设有限额——查询一个不存在的密钥所消耗的额度远高于一次成功的查询。当某个账户因密钥不存在或无效而累积多次拒绝时,其后续提现在队列中的优先级会降低,等待时间更长。请在发送前校验密钥,不要用提现来测试密钥是否存在。
- 密钥查询被暂停。 如果机构提示查询限额已用尽,尚未发送的提现将在队列中等待,直到恢复为止。已经发送的提现可能以
withdrawal_failed返回,金额退回余额。 - 最长期限。 6 小时内仍无法发送的提现将失败(
withdrawal_failed),预留金额退回余额。
请求头
执行操作的子账户的 reference。省略时,操作在主账户上执行;保留值 principal 同样解析为主账户,等同于省略该请求头。除 POST /auth 和 /sub-accounts 自身的端点(始终在主账户上操作)外,所有端点均接受该请求头。
可能的错误:404 SUB_ACCOUNT_NOT_FOUND、403 SUB_ACCOUNT_FORBIDDEN、403 SUB_ACCOUNT_SUSPENDED。
要求凭证已启用子账户访问(设置 → 集成 → API 凭证)。该项默认关闭,任何权限都无法替代,FULL_ACCESS 也不例外:未启用时响应为 403 SUB_ACCOUNT_FORBIDDEN。
Pattern:
^[a-z0-9][a-z0-9_-]{1,31}$示例:
"loja-centro"
请求体
application/json
创建 PIX 提现所需的数据。amount(从余额中扣除的总额)或 netAmount(收款人应收到的净额)只能提供其中一个。
响应
提现创建成功
已创建的提现数据。