curl --request POST \
--url https://api.abacatepay.com/v2/payouts/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 10000,
"externalId": "saque-123",
"pix": {
"key": "11987654321",
"type": "PHONE"
}
}
'import requests
url = "https://api.abacatepay.com/v2/payouts/create"
payload = {
"amount": 10000,
"externalId": "saque-123",
"pix": {
"key": "11987654321",
"type": "PHONE"
}
}
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: 10000,
externalId: 'saque-123',
pix: {key: '11987654321', type: 'PHONE'}
})
};
fetch('https://api.abacatepay.com/v2/payouts/create', 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.abacatepay.com/v2/payouts/create",
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' => 10000,
'externalId' => 'saque-123',
'pix' => [
'key' => '11987654321',
'type' => 'PHONE'
]
]),
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.abacatepay.com/v2/payouts/create"
payload := strings.NewReader("{\n \"amount\": 10000,\n \"externalId\": \"saque-123\",\n \"pix\": {\n \"key\": \"11987654321\",\n \"type\": \"PHONE\"\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.abacatepay.com/v2/payouts/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10000,\n \"externalId\": \"saque-123\",\n \"pix\": {\n \"key\": \"11987654321\",\n \"type\": \"PHONE\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.abacatepay.com/v2/payouts/create")
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\": 10000,\n \"externalId\": \"saque-123\",\n \"pix\": {\n \"key\": \"11987654321\",\n \"type\": \"PHONE\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "txn_abc123xyz",
"status": "PENDING",
"devMode": false,
"receiptUrl": null,
"amount": 10000,
"platformFee": 100,
"externalId": "saque-123",
"createdAt": "2024-11-04T18:38:28.573Z",
"updatedAt": "2024-11-04T18:38:28.573Z"
},
"error": null,
"success": true
}{
"error": "Token de autenticação inválido ou ausente."
}Criar um Saque
Permite que você crie um novo payout para transferir valores da sua conta AbacatePay.
Você pode usar esta rota para:
- Realizar saques da sua conta para sua própria chave PIX
- Enviar dinheiro para outras contas
- Realizar pagamentos diretamente pela API
- Efetuar transferências para fornecedores, parceiros ou terceiros
Importante: A chave PIX de destino não precisa ter a mesma titularidade do CNPJ da sua conta. Você pode realizar payouts para qualquer chave PIX válida.
curl --request POST \
--url https://api.abacatepay.com/v2/payouts/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 10000,
"externalId": "saque-123",
"pix": {
"key": "11987654321",
"type": "PHONE"
}
}
'import requests
url = "https://api.abacatepay.com/v2/payouts/create"
payload = {
"amount": 10000,
"externalId": "saque-123",
"pix": {
"key": "11987654321",
"type": "PHONE"
}
}
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: 10000,
externalId: 'saque-123',
pix: {key: '11987654321', type: 'PHONE'}
})
};
fetch('https://api.abacatepay.com/v2/payouts/create', 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.abacatepay.com/v2/payouts/create",
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' => 10000,
'externalId' => 'saque-123',
'pix' => [
'key' => '11987654321',
'type' => 'PHONE'
]
]),
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.abacatepay.com/v2/payouts/create"
payload := strings.NewReader("{\n \"amount\": 10000,\n \"externalId\": \"saque-123\",\n \"pix\": {\n \"key\": \"11987654321\",\n \"type\": \"PHONE\"\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.abacatepay.com/v2/payouts/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10000,\n \"externalId\": \"saque-123\",\n \"pix\": {\n \"key\": \"11987654321\",\n \"type\": \"PHONE\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.abacatepay.com/v2/payouts/create")
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\": 10000,\n \"externalId\": \"saque-123\",\n \"pix\": {\n \"key\": \"11987654321\",\n \"type\": \"PHONE\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "txn_abc123xyz",
"status": "PENDING",
"devMode": false,
"receiptUrl": null,
"amount": 10000,
"platformFee": 100,
"externalId": "saque-123",
"createdAt": "2024-11-04T18:38:28.573Z",
"updatedAt": "2024-11-04T18:38:28.573Z"
},
"error": null,
"success": true
}{
"error": "Token de autenticação inválido ou ausente."
}WITHDRAW:CREATE.pix, com as chaves key e type. Enviar
pixKey/pixKeyType no topo falha com Property 'pix' is missing, e
aninhar com esses nomes falha com Property 'pix.type' is missing.{
"amount": 10000,
"description": "Saque semanal",
"externalId": "saque-123",
"pix": {
"key": "sua-chave@email.com",
"type": "EMAIL"
}
}
- Valor mínimo: R$ 3,50
- Taxa: R$ 0,80 por saque
- Limite de frequência: 1 saque por minuto (HTTP 429 se excedido)
Authorizations
Todas as requisições devem incluir sua chave de API no header Authorization usando o formato Bearer <abacatepay-api-key>. Sem esse header a requisição será rejeitada.
Saiba mais sobre como criar e usar chaves de API na documentação de autenticação.
Body
Dados necessários para criar um payout.
Valor do payout em centavos.
x >= 35010000
Identificador único do payout em seu sistema.
"saque-123"
Chave PIX de destino do payout.
Show child attributes
Show child attributes
Descrição opcional do payout.
"Saque para conta bancária"
Was this page helpful?