Listar todas as faturas
curl --request GET \
--url https://besimplo.com/api/v1/invoices \
--header 'Authorization: <api-key>'import requests
url = "https://besimplo.com/api/v1/invoices"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://besimplo.com/api/v1/invoices', 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://besimplo.com/api/v1/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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://besimplo.com/api/v1/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://besimplo.com/api/v1/invoices")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://besimplo.com/api/v1/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"object": "list",
"url": "/api/v1/invoices",
"has_more": false,
"data": [
{
"id": "in_01h455vb4pex5vsknk084sn02q",
"object": "invoice",
"amount_due": 9990,
"created": 1704672000,
"currency": "brl",
"customer": "cus_01h455vb4pex5vsknk084sn02p",
"live_mode": true,
"status": "open",
"total": 9990,
"amount_paid": 0,
"amount_refunded": 0,
"amount_remaining": 9990,
"customer_email": "joao.silva@exemplo.com",
"customer_name": "João Silva",
"external_code": "PEDIDO-123",
"paid": false,
"payment_intent": "pi_01h455vb4pex5vsknk084sn02r",
"status_transitions": {
"paid_at": 1704758400
},
"subscription": "sub_01h455vb4pex5vsknk084sn02s"
}
]
}Faturas
Listar todas as faturas
Retorna uma lista paginada de faturas.
GET
/
api
/
v1
/
invoices
Listar todas as faturas
curl --request GET \
--url https://besimplo.com/api/v1/invoices \
--header 'Authorization: <api-key>'import requests
url = "https://besimplo.com/api/v1/invoices"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://besimplo.com/api/v1/invoices', 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://besimplo.com/api/v1/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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://besimplo.com/api/v1/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://besimplo.com/api/v1/invoices")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://besimplo.com/api/v1/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"object": "list",
"url": "/api/v1/invoices",
"has_more": false,
"data": [
{
"id": "in_01h455vb4pex5vsknk084sn02q",
"object": "invoice",
"amount_due": 9990,
"created": 1704672000,
"currency": "brl",
"customer": "cus_01h455vb4pex5vsknk084sn02p",
"live_mode": true,
"status": "open",
"total": 9990,
"amount_paid": 0,
"amount_refunded": 0,
"amount_remaining": 9990,
"customer_email": "joao.silva@exemplo.com",
"customer_name": "João Silva",
"external_code": "PEDIDO-123",
"paid": false,
"payment_intent": "pi_01h455vb4pex5vsknk084sn02r",
"status_transitions": {
"paid_at": 1704758400
},
"subscription": "sub_01h455vb4pex5vsknk084sn02s"
}
]
}Authorizations
A chave de API usada para autenticar a requisição e identificar a sua conta.
Exemplo: Authorization: ApiKey my-secure-key
Query Parameters
Filtrar pelo ID do cliente (TypeID com prefixo cus_).
Pattern:
^cus_[0-9a-z]{26}$Example:
"cus_01h455vb4pex5vsknk084sn02p"
Filtrar pelo ID da assinatura (TypeID com prefixo sub_).
Pattern:
^sub_[0-9a-z]{26}$Example:
"sub_01h455vb4pex5vsknk084sn02s"
Filtrar por status
Available options:
draft, open, paid, uncollectible, void Resultados por página
Required range:
1 <= x <= 100Cursor para próxima página
Response
Lista de faturas
String representando o tipo do objeto. Sempre "list" para listas.
Available options:
list Example:
"list"
URL do recurso solicitado.
Example:
"/api/v1/invoices"
Indica se há mais resultados disponíveis para paginação.
Example:
false
Lista de faturas.
Show child attributes
Show child attributes

