Criar Saque
curl --request POST \
--url https://alpa-sistema-api.onrender.com/api/withdraws \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amountCents": 5000,
"pixKey": "joao@example.com",
"pixKeyType": "email",
"description": "<string>",
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://alpa-sistema-api.onrender.com/api/withdraws"
payload = {
"amountCents": 5000,
"pixKey": "joao@example.com",
"pixKeyType": "email",
"description": "<string>",
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amountCents: 5000,
pixKey: 'joao@example.com',
pixKeyType: 'email',
description: '<string>',
idempotencyKey: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://alpa-sistema-api.onrender.com/api/withdraws', 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://alpa-sistema-api.onrender.com/api/withdraws",
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([
'amountCents' => 5000,
'pixKey' => 'joao@example.com',
'pixKeyType' => 'email',
'description' => '<string>',
'idempotencyKey' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"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://alpa-sistema-api.onrender.com/api/withdraws"
payload := strings.NewReader("{\n \"amountCents\": 5000,\n \"pixKey\": \"joao@example.com\",\n \"pixKeyType\": \"email\",\n \"description\": \"<string>\",\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Key", "<api-key>")
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://alpa-sistema-api.onrender.com/api/withdraws")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amountCents\": 5000,\n \"pixKey\": \"joao@example.com\",\n \"pixKeyType\": \"email\",\n \"description\": \"<string>\",\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://alpa-sistema-api.onrender.com/api/withdraws")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amountCents\": 5000,\n \"pixKey\": \"joao@example.com\",\n \"pixKeyType\": \"email\",\n \"description\": \"<string>\",\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Requisicao de saque criada com sucesso",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amountCents": 5000,
"feeCents": 350,
"netAmount": 4650,
"pixKey": "<string>",
"externalId": "<string>",
"failureReason": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"processedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"failedAt": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"code": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"path": "<string>",
"errors": [
{}
]
}{
"message": "<string>"
}Saques
Criar Saque
Cria uma nova solicitacao de transferencia para a chave PIX informada.
POST
/
api
/
withdraws
Criar Saque
curl --request POST \
--url https://alpa-sistema-api.onrender.com/api/withdraws \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amountCents": 5000,
"pixKey": "joao@example.com",
"pixKeyType": "email",
"description": "<string>",
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://alpa-sistema-api.onrender.com/api/withdraws"
payload = {
"amountCents": 5000,
"pixKey": "joao@example.com",
"pixKeyType": "email",
"description": "<string>",
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amountCents: 5000,
pixKey: 'joao@example.com',
pixKeyType: 'email',
description: '<string>',
idempotencyKey: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://alpa-sistema-api.onrender.com/api/withdraws', 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://alpa-sistema-api.onrender.com/api/withdraws",
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([
'amountCents' => 5000,
'pixKey' => 'joao@example.com',
'pixKeyType' => 'email',
'description' => '<string>',
'idempotencyKey' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"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://alpa-sistema-api.onrender.com/api/withdraws"
payload := strings.NewReader("{\n \"amountCents\": 5000,\n \"pixKey\": \"joao@example.com\",\n \"pixKeyType\": \"email\",\n \"description\": \"<string>\",\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Key", "<api-key>")
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://alpa-sistema-api.onrender.com/api/withdraws")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amountCents\": 5000,\n \"pixKey\": \"joao@example.com\",\n \"pixKeyType\": \"email\",\n \"description\": \"<string>\",\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://alpa-sistema-api.onrender.com/api/withdraws")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amountCents\": 5000,\n \"pixKey\": \"joao@example.com\",\n \"pixKeyType\": \"email\",\n \"description\": \"<string>\",\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Requisicao de saque criada com sucesso",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amountCents": 5000,
"feeCents": 350,
"netAmount": 4650,
"pixKey": "<string>",
"externalId": "<string>",
"failureReason": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"processedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"failedAt": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"code": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"path": "<string>",
"errors": [
{}
]
}{
"message": "<string>"
}Authorizations
Chave de API obtida através do endpoint /api/credentials. Também aceita formato Bearer Token: Authorization: Bearer <api_key>
Body
application/json
Valor em centavos (min. R$ 1,00)
Required range:
100 <= x <= 10000000Example:
5000
Chave PIX de destino
Example:
"joao@example.com"
Available options:
cpf, cnpj, email, phone, random Example:
"email"
Descricao opcional
Chave de idempotencia — evita criacao duplicada em retentativas
⌘I

