curl --request POST \
--url https://api.public.firebanking.com.br/api/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://api.example.com/webhooks/pix",
"eventType": "cash_in",
"headers": [
{
"key": "Authorization",
"value": "Bearer token123"
},
{
"key": "X-Webhook-Secret",
"value": "abc123"
}
]
}
'import requests
url = "https://api.public.firebanking.com.br/api/webhooks"
payload = {
"url": "https://api.example.com/webhooks/pix",
"eventType": "cash_in",
"headers": [
{
"key": "Authorization",
"value": "Bearer token123"
},
{
"key": "X-Webhook-Secret",
"value": "abc123"
}
]
}
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({
url: 'https://api.example.com/webhooks/pix',
eventType: 'cash_in',
headers: [
{key: 'Authorization', value: 'Bearer token123'},
{key: 'X-Webhook-Secret', value: 'abc123'}
]
})
};
fetch('https://api.public.firebanking.com.br/api/webhooks', 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.public.firebanking.com.br/api/webhooks",
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([
'url' => 'https://api.example.com/webhooks/pix',
'eventType' => 'cash_in',
'headers' => [
[
'key' => 'Authorization',
'value' => 'Bearer token123'
],
[
'key' => 'X-Webhook-Secret',
'value' => 'abc123'
]
]
]),
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.public.firebanking.com.br/api/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://api.example.com/webhooks/pix\",\n \"eventType\": \"cash_in\",\n \"headers\": [\n {\n \"key\": \"Authorization\",\n \"value\": \"Bearer token123\"\n },\n {\n \"key\": \"X-Webhook-Secret\",\n \"value\": \"abc123\"\n }\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.public.firebanking.com.br/api/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://api.example.com/webhooks/pix\",\n \"eventType\": \"cash_in\",\n \"headers\": [\n {\n \"key\": \"Authorization\",\n \"value\": \"Bearer token123\"\n },\n {\n \"key\": \"X-Webhook-Secret\",\n \"value\": \"abc123\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.public.firebanking.com.br/api/webhooks")
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 \"url\": \"https://api.example.com/webhooks/pix\",\n \"eventType\": \"cash_in\",\n \"headers\": [\n {\n \"key\": \"Authorization\",\n \"value\": \"Bearer token123\"\n },\n {\n \"key\": \"X-Webhook-Secret\",\n \"value\": \"abc123\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Webhook configurado com sucesso"
}Configurar webhook da conta
Requer token Bearer no header Authorization.
Configura ou atualiza a URL de webhook para um tipo de evento específico. Se já existir um webhook configurado para o mesmo tipo de evento, ele será atualizado (comportamento de upsert).
Eventos disponíveis:
cash_in- PIX recebidocash_out- PIX enviadorefund_in- Estorno de recebimento (devolução solicitada)refund_out- Devolução recebida
Headers personalizados: Você pode configurar até 5 headers customizados para autenticação do seu endpoint. Headers bloqueados (não permitidos): host, content-length, connection, transfer-encoding, content-type, user-agent.
Invalidação de cache: Ao configurar um webhook, o cache é invalidado automaticamente no serviço de notificações. Transações subsequentes usarão a nova configuração imediatamente.
curl --request POST \
--url https://api.public.firebanking.com.br/api/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://api.example.com/webhooks/pix",
"eventType": "cash_in",
"headers": [
{
"key": "Authorization",
"value": "Bearer token123"
},
{
"key": "X-Webhook-Secret",
"value": "abc123"
}
]
}
'import requests
url = "https://api.public.firebanking.com.br/api/webhooks"
payload = {
"url": "https://api.example.com/webhooks/pix",
"eventType": "cash_in",
"headers": [
{
"key": "Authorization",
"value": "Bearer token123"
},
{
"key": "X-Webhook-Secret",
"value": "abc123"
}
]
}
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({
url: 'https://api.example.com/webhooks/pix',
eventType: 'cash_in',
headers: [
{key: 'Authorization', value: 'Bearer token123'},
{key: 'X-Webhook-Secret', value: 'abc123'}
]
})
};
fetch('https://api.public.firebanking.com.br/api/webhooks', 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.public.firebanking.com.br/api/webhooks",
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([
'url' => 'https://api.example.com/webhooks/pix',
'eventType' => 'cash_in',
'headers' => [
[
'key' => 'Authorization',
'value' => 'Bearer token123'
],
[
'key' => 'X-Webhook-Secret',
'value' => 'abc123'
]
]
]),
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.public.firebanking.com.br/api/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://api.example.com/webhooks/pix\",\n \"eventType\": \"cash_in\",\n \"headers\": [\n {\n \"key\": \"Authorization\",\n \"value\": \"Bearer token123\"\n },\n {\n \"key\": \"X-Webhook-Secret\",\n \"value\": \"abc123\"\n }\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.public.firebanking.com.br/api/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://api.example.com/webhooks/pix\",\n \"eventType\": \"cash_in\",\n \"headers\": [\n {\n \"key\": \"Authorization\",\n \"value\": \"Bearer token123\"\n },\n {\n \"key\": \"X-Webhook-Secret\",\n \"value\": \"abc123\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.public.firebanking.com.br/api/webhooks")
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 \"url\": \"https://api.example.com/webhooks/pix\",\n \"eventType\": \"cash_in\",\n \"headers\": [\n {\n \"key\": \"Authorization\",\n \"value\": \"Bearer token123\"\n },\n {\n \"key\": \"X-Webhook-Secret\",\n \"value\": \"abc123\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Webhook configurado com sucesso"
}Autorizações
Enter JWT token
Corpo
URL HTTPS do endpoint que receberá os webhooks. Deve usar protocolo HTTPS.
"https://api.example.com/webhooks/pix"
Tipo de evento para receber notificações
cash_in, cash_out, refund_in, refund_out "cash_in"
Headers customizados para autenticação (máximo 5). Headers bloqueados: host, content-length, connection, transfer-encoding, content-type, user-agent
5Show child attributes
Show child attributes
[
{
"key": "Authorization",
"value": "Bearer token123"
},
{
"key": "X-Webhook-Secret",
"value": "abc123"
}
]