DEPRECATED: Create a BRL withdrawal
curl --request POST \
--url https://app.crown-brlv.com/api/v0/assets/{asset}/withdrawals \
--header 'Content-Type: application/json' \
--data '
{
"method": "pix",
"amount": "100.50",
"pix-key": "user@example.com",
"bank-code": "001",
"branch-number": "1234",
"account-number": "12345678",
"account-holder-name": "John Doe",
"account-holder-tax-id": "12345678901"
}
'import requests
url = "https://app.crown-brlv.com/api/v0/assets/{asset}/withdrawals"
payload = {
"method": "pix",
"amount": "100.50",
"pix-key": "user@example.com",
"bank-code": "001",
"branch-number": "1234",
"account-number": "12345678",
"account-holder-name": "John Doe",
"account-holder-tax-id": "12345678901"
}
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({
method: 'pix',
amount: '100.50',
'pix-key': 'user@example.com',
'bank-code': '001',
'branch-number': '1234',
'account-number': '12345678',
'account-holder-name': 'John Doe',
'account-holder-tax-id': '12345678901'
})
};
fetch('https://app.crown-brlv.com/api/v0/assets/{asset}/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://app.crown-brlv.com/api/v0/assets/{asset}/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([
'method' => 'pix',
'amount' => '100.50',
'pix-key' => 'user@example.com',
'bank-code' => '001',
'branch-number' => '1234',
'account-number' => '12345678',
'account-holder-name' => 'John Doe',
'account-holder-tax-id' => '12345678901'
]),
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://app.crown-brlv.com/api/v0/assets/{asset}/withdrawals"
payload := strings.NewReader("{\n \"method\": \"pix\",\n \"amount\": \"100.50\",\n \"pix-key\": \"user@example.com\",\n \"bank-code\": \"001\",\n \"branch-number\": \"1234\",\n \"account-number\": \"12345678\",\n \"account-holder-name\": \"John Doe\",\n \"account-holder-tax-id\": \"12345678901\"\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://app.crown-brlv.com/api/v0/assets/{asset}/withdrawals")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"pix\",\n \"amount\": \"100.50\",\n \"pix-key\": \"user@example.com\",\n \"bank-code\": \"001\",\n \"branch-number\": \"1234\",\n \"account-number\": \"12345678\",\n \"account-holder-name\": \"John Doe\",\n \"account-holder-tax-id\": \"12345678901\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.crown-brlv.com/api/v0/assets/{asset}/withdrawals")
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 \"method\": \"pix\",\n \"amount\": \"100.50\",\n \"pix-key\": \"user@example.com\",\n \"bank-code\": \"001\",\n \"branch-number\": \"1234\",\n \"account-number\": \"12345678\",\n \"account-holder-name\": \"John Doe\",\n \"account-holder-tax-id\": \"12345678901\"\n}"
response = http.request(request)
puts response.read_body{
"withdrawal": {
"id": "660e8400-e29b-41d4-a716-446655440001",
"amount": "100.50",
"method": "pix",
"state": "created",
"created-at": "2024-01-15T10:30:00Z",
"state-updated-at": "2024-01-15T10:30:00Z"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}Withdrawals
Create Withdrawal (Deprecated)
Deprecated: use POST /api/v0/withdrawals instead.
POST
/
api
/
v0
/
assets
/
{asset}
/
withdrawals
DEPRECATED: Create a BRL withdrawal
curl --request POST \
--url https://app.crown-brlv.com/api/v0/assets/{asset}/withdrawals \
--header 'Content-Type: application/json' \
--data '
{
"method": "pix",
"amount": "100.50",
"pix-key": "user@example.com",
"bank-code": "001",
"branch-number": "1234",
"account-number": "12345678",
"account-holder-name": "John Doe",
"account-holder-tax-id": "12345678901"
}
'import requests
url = "https://app.crown-brlv.com/api/v0/assets/{asset}/withdrawals"
payload = {
"method": "pix",
"amount": "100.50",
"pix-key": "user@example.com",
"bank-code": "001",
"branch-number": "1234",
"account-number": "12345678",
"account-holder-name": "John Doe",
"account-holder-tax-id": "12345678901"
}
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({
method: 'pix',
amount: '100.50',
'pix-key': 'user@example.com',
'bank-code': '001',
'branch-number': '1234',
'account-number': '12345678',
'account-holder-name': 'John Doe',
'account-holder-tax-id': '12345678901'
})
};
fetch('https://app.crown-brlv.com/api/v0/assets/{asset}/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://app.crown-brlv.com/api/v0/assets/{asset}/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([
'method' => 'pix',
'amount' => '100.50',
'pix-key' => 'user@example.com',
'bank-code' => '001',
'branch-number' => '1234',
'account-number' => '12345678',
'account-holder-name' => 'John Doe',
'account-holder-tax-id' => '12345678901'
]),
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://app.crown-brlv.com/api/v0/assets/{asset}/withdrawals"
payload := strings.NewReader("{\n \"method\": \"pix\",\n \"amount\": \"100.50\",\n \"pix-key\": \"user@example.com\",\n \"bank-code\": \"001\",\n \"branch-number\": \"1234\",\n \"account-number\": \"12345678\",\n \"account-holder-name\": \"John Doe\",\n \"account-holder-tax-id\": \"12345678901\"\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://app.crown-brlv.com/api/v0/assets/{asset}/withdrawals")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"pix\",\n \"amount\": \"100.50\",\n \"pix-key\": \"user@example.com\",\n \"bank-code\": \"001\",\n \"branch-number\": \"1234\",\n \"account-number\": \"12345678\",\n \"account-holder-name\": \"John Doe\",\n \"account-holder-tax-id\": \"12345678901\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.crown-brlv.com/api/v0/assets/{asset}/withdrawals")
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 \"method\": \"pix\",\n \"amount\": \"100.50\",\n \"pix-key\": \"user@example.com\",\n \"bank-code\": \"001\",\n \"branch-number\": \"1234\",\n \"account-number\": \"12345678\",\n \"account-holder-name\": \"John Doe\",\n \"account-holder-tax-id\": \"12345678901\"\n}"
response = http.request(request)
puts response.read_body{
"withdrawal": {
"id": "660e8400-e29b-41d4-a716-446655440001",
"amount": "100.50",
"method": "pix",
"state": "created",
"created-at": "2024-01-15T10:30:00Z",
"state-updated-at": "2024-01-15T10:30:00Z"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"code": "<string>"
}
}You’re viewing v0, which is deprecated. Endpoints may change or be removed.
Switch to v1 (Latest) →Path Parameters
Available options:
usdc, usdt, brl, brly, usd, brlv, wbrly Body
application/json
Withdrawal method. Must be either 'pix' or 'ted'
Available options:
ted, pix Example:
"pix"
Amount in BRL to withdraw
Example:
"100.50"
PIX key (email, phone, CPF/CNPJ, or random key). Required when method is 'pix'
Example:
"user@example.com"
3-digit Brazilian bank code. Required when method is 'ted'
Example:
"001"
4-5 digit Brazilian branch number. Required when method is 'ted'
Example:
"1234"
Brazilian account number. Required when method is 'ted'
Example:
"12345678"
Name of the account holder. Required when method is 'ted'
Example:
"John Doe"
CPF or CNPJ of the account holder. Required when method is 'ted'
Example:
"12345678901"
Response
Asset withdrawal created successfully
Details of the created withdrawal
Show child attributes
Show child attributes
⌘I