Criar Saque PIX
curl --request POST \
--url https://api.example.com/api/v1/order/pix-out \
--header 'Content-Type: application/json' \
--data '
{
"value": 123,
"pixKey": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/order/pix-out"
payload = {
"value": 123,
"pixKey": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({value: 123, pixKey: '<string>'})
};
fetch('https://api.example.com/api/v1/order/pix-out', 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.example.com/api/v1/order/pix-out",
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([
'value' => 123,
'pixKey' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/api/v1/order/pix-out"
payload := strings.NewReader("{\n \"value\": 123,\n \"pixKey\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/api/v1/order/pix-out")
.header("Content-Type", "application/json")
.body("{\n \"value\": 123,\n \"pixKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/order/pix-out")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"value\": 123,\n \"pixKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"amount": 123
}PIX
Criar Saque PIX
Crie uma solicitação de saque via PIX
POST
/
api
/
v1
/
order
/
pix-out
Criar Saque PIX
curl --request POST \
--url https://api.example.com/api/v1/order/pix-out \
--header 'Content-Type: application/json' \
--data '
{
"value": 123,
"pixKey": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/order/pix-out"
payload = {
"value": 123,
"pixKey": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({value: 123, pixKey: '<string>'})
};
fetch('https://api.example.com/api/v1/order/pix-out', 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.example.com/api/v1/order/pix-out",
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([
'value' => 123,
'pixKey' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/api/v1/order/pix-out"
payload := strings.NewReader("{\n \"value\": 123,\n \"pixKey\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/api/v1/order/pix-out")
.header("Content-Type", "application/json")
.body("{\n \"value\": 123,\n \"pixKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/order/pix-out")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"value\": 123,\n \"pixKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"amount": 123
}Criar solicitação de saque PIX
Este endpoint processa uma solicitação de saque via PIX para a chave PIX fornecida.Requisição
number
required
O valor do saque em centavos (ex: 100 = R$ 1,00)
string
Chave PIX para o saque. Se não fornecida, será utilizada a chave PIX registrada do comerciante
Exemplo de requisição
curl -X POST "https://server.cryptouse.com.br/api/v1/order/pix-out" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer seu_token_aqui" \
-d '{
"value": 10000,
"pixKey": "email@exemplo.com"
}'
Resposta
string
Mensagem de sucesso
number
O valor sacado em centavos (ex: 10000 = R$ 100,00)
Exemplo de resposta
{
"message": "Saque processado com sucesso",
"amount": 10000
}
{
"message": "Dados inválidos na requisição",
"error": {
"details": "Valor de saque inválido"
}
}
{
"message": "Chave de API inválida ou não autorizada"
}
{
"message": "Ocorreu um erro ao processar sua solicitação",
"error": {
"details": "Erro ao processar o saque PIX"
}
}
Chaves PIX suportadas
O endpoint aceita todos os tipos de chaves PIX:- CPF/CNPJ
- Telefone
- Chave aleatória
- Chave EVP
Notas importantes
- O saldo disponível deve ser suficiente para cobrir o valor do saque
- A chave PIX deve estar ativa e válida no sistema bancário
⌘I
