curl --request POST \
--url https://hg.cash/api/v1/br/transactions/outbound \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"name": "<string>",
"keyPix": "<string>",
"document": "<string>",
"webhookUrl": "<string>"
}
'import requests
url = "https://hg.cash/api/v1/br/transactions/outbound"
payload = {
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"name": "<string>",
"keyPix": "<string>",
"document": "<string>",
"webhookUrl": "<string>"
}
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({
accountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 123,
name: '<string>',
keyPix: '<string>',
document: '<string>',
webhookUrl: '<string>'
})
};
fetch('https://hg.cash/api/v1/br/transactions/outbound', 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://hg.cash/api/v1/br/transactions/outbound",
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([
'accountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 123,
'name' => '<string>',
'keyPix' => '<string>',
'document' => '<string>',
'webhookUrl' => '<string>'
]),
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://hg.cash/api/v1/br/transactions/outbound"
payload := strings.NewReader("{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"name\": \"<string>\",\n \"keyPix\": \"<string>\",\n \"document\": \"<string>\",\n \"webhookUrl\": \"<string>\"\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://hg.cash/api/v1/br/transactions/outbound")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"name\": \"<string>\",\n \"keyPix\": \"<string>\",\n \"document\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hg.cash/api/v1/br/transactions/outbound")
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 \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"name\": \"<string>\",\n \"keyPix\": \"<string>\",\n \"document\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "processing"
}{
"error": "Account is not operative",
"code": "ACCOUNT_NOT_OPERATIVE"
}Create Outbound Transaction (Brazil)
Create an outbound transaction (withdraw) from a Brazil (BRL) account.
Requires sufficient net balance. Transaction starts in processing status.
curl --request POST \
--url https://hg.cash/api/v1/br/transactions/outbound \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"name": "<string>",
"keyPix": "<string>",
"document": "<string>",
"webhookUrl": "<string>"
}
'import requests
url = "https://hg.cash/api/v1/br/transactions/outbound"
payload = {
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"name": "<string>",
"keyPix": "<string>",
"document": "<string>",
"webhookUrl": "<string>"
}
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({
accountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 123,
name: '<string>',
keyPix: '<string>',
document: '<string>',
webhookUrl: '<string>'
})
};
fetch('https://hg.cash/api/v1/br/transactions/outbound', 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://hg.cash/api/v1/br/transactions/outbound",
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([
'accountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 123,
'name' => '<string>',
'keyPix' => '<string>',
'document' => '<string>',
'webhookUrl' => '<string>'
]),
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://hg.cash/api/v1/br/transactions/outbound"
payload := strings.NewReader("{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"name\": \"<string>\",\n \"keyPix\": \"<string>\",\n \"document\": \"<string>\",\n \"webhookUrl\": \"<string>\"\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://hg.cash/api/v1/br/transactions/outbound")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"name\": \"<string>\",\n \"keyPix\": \"<string>\",\n \"document\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hg.cash/api/v1/br/transactions/outbound")
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 \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"name\": \"<string>\",\n \"keyPix\": \"<string>\",\n \"document\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "processing"
}{
"error": "Account is not operative",
"code": "ACCOUNT_NOT_OPERATIVE"
}Authorizations
User API authentication token with format cash_<64-char-hex>. Sample value cash_16cdc3b6f83c72d9d2680adca4f430962981f6bf32613a129dded0aa060387d2.
Body
Request to create an outbound transaction (withdraw) for Brazil BRL accounts
Recipient name
PIX key type (document=CPF, evp=random key)
document, email, evp, phone, cnpj PIX key value (email, CPF, CNPJ, phone, or random key)
Optional recipient CPF or CNPJ (digits only, or formatted with punctuation).
Not required. When provided, must be 11 digits (CPF) or 14 digits (CNPJ).
Forwarded to the PIX provider when present. Bankizi lists this field as optional
on PIX withdraw-by-key; inbound Brazil still requires document (payer CPF/CNPJ).
Response
Transaction created. Returns status: processing when the provider accepted the withdraw (HTTP 200).
Returns status: cancelled when the provider rejected or failed (non-200); the transaction is stored and marked cancelled.

