Detalhes do Carnê
curl --request GET \
--url https://garu.com.br/api/v1/installment-plans/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"number": 123,
"status": "<string>",
"boleto": {},
"reissueCount": 123
}
'import requests
url = "https://garu.com.br/api/v1/installment-plans/{uuid}"
payload = {
"number": 123,
"status": "<string>",
"boleto": {},
"reissueCount": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({number: 123, status: '<string>', boleto: {}, reissueCount: 123})
};
fetch('https://garu.com.br/api/v1/installment-plans/{uuid}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'number' => 123,
'status' => '<string>',
'boleto' => [
],
'reissueCount' => 123
]),
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/v1/installment-plans/{uuid}"
payload := strings.NewReader("{\n \"number\": 123,\n \"status\": \"<string>\",\n \"boleto\": {},\n \"reissueCount\": 123\n}")
req, _ := http.NewRequest("GET", 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.get("https://garu.com.br/api/v1/installment-plans/{uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"number\": 123,\n \"status\": \"<string>\",\n \"boleto\": {},\n \"reissueCount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/v1/installment-plans/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": 123,\n \"status\": \"<string>\",\n \"boleto\": {},\n \"reissueCount\": 123\n}"
response = http.request(request)
puts response.read_bodyBoleto Parcelado (Carnê)
Detalhes do Carnê
Um carnê com todas as suas parcelas
GET
/
api
/
v1
/
installment-plans
/
{uuid}
Detalhes do Carnê
curl --request GET \
--url https://garu.com.br/api/v1/installment-plans/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"number": 123,
"status": "<string>",
"boleto": {},
"reissueCount": 123
}
'import requests
url = "https://garu.com.br/api/v1/installment-plans/{uuid}"
payload = {
"number": 123,
"status": "<string>",
"boleto": {},
"reissueCount": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({number: 123, status: '<string>', boleto: {}, reissueCount: 123})
};
fetch('https://garu.com.br/api/v1/installment-plans/{uuid}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'number' => 123,
'status' => '<string>',
'boleto' => [
],
'reissueCount' => 123
]),
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/v1/installment-plans/{uuid}"
payload := strings.NewReader("{\n \"number\": 123,\n \"status\": \"<string>\",\n \"boleto\": {},\n \"reissueCount\": 123\n}")
req, _ := http.NewRequest("GET", 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.get("https://garu.com.br/api/v1/installment-plans/{uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"number\": 123,\n \"status\": \"<string>\",\n \"boleto\": {},\n \"reissueCount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://garu.com.br/api/v1/installment-plans/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": 123,\n \"status\": \"<string>\",\n \"boleto\": {},\n \"reissueCount\": 123\n}"
response = http.request(request)
puts response.read_bodyVisão Geral
Retorna o carnê com todas as parcelas: vencimento, status, linha digitável e PDF do boleto.Exemplo
curl https://garu.com.br/api/v1/installment-plans/e5d0d8fe-0000-4000-8000-000000000001 \
-H "Authorization: Bearer sk_live_sua_chave"
const carne = await garu.installmentPlans.get(uuid);
const emAberto = carne.installmentsDetail.filter((p) => p.status !== 'paid');
console.log(carne.totalCollected); // o que realmente entrou
Campos de dinheiro
totalScheduled é o que o carnê cobra. totalCollected é o que entrou. Eles divergem quando o banco soma multa ou mora, e por isso totalCollected pode ficar acima de totalScheduled. Não use um no lugar do outro para conciliar.| Campo | Significado |
|---|---|
baseValue | Preço à vista do produto |
fator | Multiplicador de juros, congelado no momento da venda |
installmentAmount | Valor de cada parcela |
totalScheduled | installmentAmount × installments |
totalCollected | O que compensou de fato |
Parcelas
Cada item deinstallmentsDetail traz:
number
Posição da parcela, começando em 1.
string
scheduled, due_today, paid, overdue, failed ou canceled.object
null enquanto a parcela não foi emitida. Parcelas futuras não têm boleto — não mostre um código de barras vazio ao comprador como se fosse pagável.number
Quantas segundas vias já foram emitidas.
Was this page helpful?
⌘I