Definir E-mail de Cobrança
curl --request PATCH \
--url https://garu.com.br/api/v1/customers/{uuid}/billing-email-override \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"billingEmailOverride": "<string>"
}
'import requests
url = "https://garu.com.br/api/v1/customers/{uuid}/billing-email-override"
payload = { "billingEmailOverride": "<string>" }
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({billingEmailOverride: '<string>'})
};
fetch('https://garu.com.br/api/v1/customers/{uuid}/billing-email-override', 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://garu.com.br/api/v1/customers/{uuid}/billing-email-override",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'billingEmailOverride' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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://garu.com.br/api/v1/customers/{uuid}/billing-email-override"
payload := strings.NewReader("{\n \"billingEmailOverride\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://garu.com.br/api/v1/customers/{uuid}/billing-email-override")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"billingEmailOverride\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/v1/customers/{uuid}/billing-email-override")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"billingEmailOverride\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyClientes
Definir E-mail de Cobrança
Fixe (ou limpe) o e-mail que recebe cobranças deste cliente, independente do e-mail de contato
PATCH
/
api
/
v1
/
customers
/
{uuid}
/
billing-email-override
Definir E-mail de Cobrança
curl --request PATCH \
--url https://garu.com.br/api/v1/customers/{uuid}/billing-email-override \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"billingEmailOverride": "<string>"
}
'import requests
url = "https://garu.com.br/api/v1/customers/{uuid}/billing-email-override"
payload = { "billingEmailOverride": "<string>" }
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({billingEmailOverride: '<string>'})
};
fetch('https://garu.com.br/api/v1/customers/{uuid}/billing-email-override', 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://garu.com.br/api/v1/customers/{uuid}/billing-email-override",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'billingEmailOverride' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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://garu.com.br/api/v1/customers/{uuid}/billing-email-override"
payload := strings.NewReader("{\n \"billingEmailOverride\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://garu.com.br/api/v1/customers/{uuid}/billing-email-override")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"billingEmailOverride\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/v1/customers/{uuid}/billing-email-override")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"billingEmailOverride\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyVisão Geral
Define um e-mail fixo para onde vão as cobranças enviadas por você a este cliente (lembretes de cobrança agendada, boletos de carnê, etc.) — útil quando o cliente quer que isso caia num endereço diferente do e-mail de contato dele (ex:financeiro@empresa.com.br).
O override é sticky: uma vez definido, ele não é sobrescrito automaticamente por um novo pagamento ou re-cadastro. Só muda quando você chama este endpoint de novo.
Resolução do e-mail de cobrança:
billingEmailOverride (se definido) → e-mail deste perfil → e-mail global do cliente.Headers
string
required
Sua chave de API (
Bearer sk_live_...)string
required
application/jsonPath Parameters
string
required
UUID do cliente
Request Body
string
required
O e-mail fixo. Envie
null para limpar o override e voltar a usar o e-mail padrão.Exemplo de Requisição
# Definir
curl -X PATCH https://garu.com.br/api/v1/customers/a1b2c3d4-e5f6-7890-abcd-ef1234567890/billing-email-override \
-H "Authorization: Bearer sk_live_sua_chave_api" \
-H "Content-Type: application/json" \
-d '{ "billingEmailOverride": "financeiro@empresa.com.br" }'
# Limpar
curl -X PATCH https://garu.com.br/api/v1/customers/a1b2c3d4-e5f6-7890-abcd-ef1234567890/billing-email-override \
-H "Authorization: Bearer sk_live_sua_chave_api" \
-H "Content-Type: application/json" \
-d '{ "billingEmailOverride": null }'
await fetch(
`https://garu.com.br/api/v1/customers/${customerUuid}/billing-email-override`,
{
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.GARU_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ billingEmailOverride: 'financeiro@empresa.com.br' })
}
);
import os
import requests
requests.patch(
f"https://garu.com.br/api/v1/customers/{customer_uuid}/billing-email-override",
headers={
"Authorization": f"Bearer {os.environ['GARU_API_KEY']}",
"Content-Type": "application/json",
},
json={"billingEmailOverride": "financeiro@empresa.com.br"},
)
Resposta de Sucesso (200 OK)
{
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Maria Silva",
"email": "maria@exemplo.com.br",
"billingEmail": "financeiro@empresa.com.br",
"hasBillingEmailOverride": true,
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-01-15T11:15:00.000Z"
}
Erros
| Código | Quando acontece |
|---|---|
400 | billingEmailOverride não é null nem um e-mail válido |
401 | Chave de API ausente ou inválida |
404 | O cliente não existe ou não está vinculado à conta da chave usada |
Was this page helpful?
⌘I