Adiar Cobrança
curl --request POST \
--url https://garu.com.br/api/scheduled-charges/{id}/postpone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"newDueDate": "<string>",
"reason": "<string>"
}
'import requests
url = "https://garu.com.br/api/scheduled-charges/{id}/postpone"
payload = {
"newDueDate": "<string>",
"reason": "<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({newDueDate: '<string>', reason: '<string>'})
};
fetch('https://garu.com.br/api/scheduled-charges/{id}/postpone', 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/scheduled-charges/{id}/postpone",
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([
'newDueDate' => '<string>',
'reason' => '<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://garu.com.br/api/scheduled-charges/{id}/postpone"
payload := strings.NewReader("{\n \"newDueDate\": \"<string>\",\n \"reason\": \"<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://garu.com.br/api/scheduled-charges/{id}/postpone")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"newDueDate\": \"<string>\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/scheduled-charges/{id}/postpone")
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 \"newDueDate\": \"<string>\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyCobranças Agendadas
Adiar Cobrança
Empurre uma cobrança para uma nova data de vencimento
POST
/
api
/
scheduled-charges
/
{id}
/
postpone
Adiar Cobrança
curl --request POST \
--url https://garu.com.br/api/scheduled-charges/{id}/postpone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"newDueDate": "<string>",
"reason": "<string>"
}
'import requests
url = "https://garu.com.br/api/scheduled-charges/{id}/postpone"
payload = {
"newDueDate": "<string>",
"reason": "<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({newDueDate: '<string>', reason: '<string>'})
};
fetch('https://garu.com.br/api/scheduled-charges/{id}/postpone', 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/scheduled-charges/{id}/postpone",
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([
'newDueDate' => '<string>',
'reason' => '<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://garu.com.br/api/scheduled-charges/{id}/postpone"
payload := strings.NewReader("{\n \"newDueDate\": \"<string>\",\n \"reason\": \"<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://garu.com.br/api/scheduled-charges/{id}/postpone")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"newDueDate\": \"<string>\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/scheduled-charges/{id}/postpone")
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 \"newDueDate\": \"<string>\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyVisão Geral
Move a cobrança para uma nova data e limpa qualquer lembrete pendente, para que o cliente receba um e-mail novo nodueDate atualizado.
Permitido a partir de: scheduled / due_today / overdue / paused.
Exemplo de Requisição
curl -X POST https://garu.com.br/api/scheduled-charges/sch_abc123/postpone \
-H "Authorization: Bearer sk_test_sua_chave" \
-H "Content-Type: application/json" \
-d '{
"newDueDate": "2026-07-01",
"reason": "cliente pediu mais prazo"
}'
import { Garu } from '@garuhq/node';
const garu = new Garu({ apiKey: process.env.GARU_API_KEY });
await garu.scheduledCharges.postpone('sch_abc123', {
newDueDate: '2026-07-01',
reason: 'cliente pediu mais prazo'
});
import requests
import os
requests.post(
"https://garu.com.br/api/scheduled-charges/sch_abc123/postpone",
headers={"Authorization": f"Bearer {os.environ['GARU_API_KEY']}"},
json={"newDueDate": "2026-07-01", "reason": "cliente pediu mais prazo"}
)
Parâmetros
string
required
ID da cobrança (
sch_…).string
required
Nova data em
YYYY-MM-DD, fuso de São Paulo. Deve ser hoje ou futura.string
Texto livre persistido no log de auditoria.
Resposta
A cobrança atualizada (mesmo formato do POST de criação), agora com o novodueDate e status ajustado. Um evento postponed é apendado à linha do tempo e o webhook scheduled_charge.postponed é disparado.Was this page helpful?
⌘I