Marcar Parcela como Paga
curl --request POST \
--url https://garu.com.br/api/v1/installment-plans/{uuid}/installments/{number}/mark-paid \
--header 'Authorization: Bearer <token>'import requests
url = "https://garu.com.br/api/v1/installment-plans/{uuid}/installments/{number}/mark-paid"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://garu.com.br/api/v1/installment-plans/{uuid}/installments/{number}/mark-paid', 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/installment-plans/{uuid}/installments/{number}/mark-paid",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://garu.com.br/api/v1/installment-plans/{uuid}/installments/{number}/mark-paid"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/v1/installment-plans/{uuid}/installments/{number}/mark-paid")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/v1/installment-plans/{uuid}/installments/{number}/mark-paid")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyBoleto Parcelado (Carnê)
Marcar Parcela como Paga
Registra o pagamento de uma parcela quando o webhook não chegou
POST
/
api
/
v1
/
installment-plans
/
{uuid}
/
installments
/
{number}
/
mark-paid
Marcar Parcela como Paga
curl --request POST \
--url https://garu.com.br/api/v1/installment-plans/{uuid}/installments/{number}/mark-paid \
--header 'Authorization: Bearer <token>'import requests
url = "https://garu.com.br/api/v1/installment-plans/{uuid}/installments/{number}/mark-paid"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://garu.com.br/api/v1/installment-plans/{uuid}/installments/{number}/mark-paid', 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/installment-plans/{uuid}/installments/{number}/mark-paid",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://garu.com.br/api/v1/installment-plans/{uuid}/installments/{number}/mark-paid"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/v1/installment-plans/{uuid}/installments/{number}/mark-paid")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/v1/installment-plans/{uuid}/installments/{number}/mark-paid")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyVisão Geral
Para quando o comprador pagou o boleto mas o webhook não chegou.A Garu pergunta ao provedor se a cobrança realmente compensou antes de registrar. Essa ação liquida a transação e paga comissões de afiliado e coprodutor — se o provedor estiver fora do ar, a ação é recusada em vez de confiar na afirmação.
Exemplo
curl -X POST https://garu.com.br/api/v1/installment-plans/e5d0d8fe-0000-4000-8000-000000000001/installments/3/mark-paid \
-H "Authorization: Bearer sk_live_sua_chave"
const parcela = await garu.installmentPlans.markInstallmentPaid(uuid, 3);
console.log(parcela.status); // 'paid'
O valor registrado é o valor de face do boleto. Multa e mora não são conhecidas sem o provedor.
Erros
| Código | Quando |
|---|---|
409 | O provedor não reporta essa cobrança como paga |
Was this page helpful?
⌘I