Listar todas as cobranças
curl --request GET \
--url https://besimplo.com/api/v1/payment_intents \
--header 'Authorization: <api-key>'import requests
url = "https://besimplo.com/api/v1/payment_intents"
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/payment_intents', 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/payment_intents",
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/payment_intents"
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/payment_intents")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://besimplo.com/api/v1/payment_intents")
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/payment_intents",
"has_more": false,
"data": [
{
"id": "pi_01h455vb4pex5vsknk084sn02r",
"object": "payment_intent",
"amount": 9990,
"attempts": 1,
"created": 1704672000,
"currency": "brl",
"customer": "cus_01h455vb4pex5vsknk084sn02p",
"due_at": 1704758400,
"invoice": "in_01h455vb4pex5vsknk084sn02q",
"live_mode": true,
"max_attempts": 3,
"status": "pending",
"installments": 1,
"last_payment_error": "<unknown>",
"next_attempt": 1704844800,
"payment_method_type": "pix",
"status_transitions": {
"paid_at": 1704758400
},
"subscription": "sub_01h455vb4pex5vsknk084sn02s"
}
]
}Tentativas de cobrança
Listar todas as cobranças
Retorna uma lista paginada de cobranças da sua conta, da mais recente para a mais antiga.
Limite de taxa: 100 requisições por minuto por chave de API.
GET
/
api
/
v1
/
payment_intents
Listar todas as cobranças
curl --request GET \
--url https://besimplo.com/api/v1/payment_intents \
--header 'Authorization: <api-key>'import requests
url = "https://besimplo.com/api/v1/payment_intents"
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/payment_intents', 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/payment_intents",
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/payment_intents"
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/payment_intents")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://besimplo.com/api/v1/payment_intents")
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/payment_intents",
"has_more": false,
"data": [
{
"id": "pi_01h455vb4pex5vsknk084sn02r",
"object": "payment_intent",
"amount": 9990,
"attempts": 1,
"created": 1704672000,
"currency": "brl",
"customer": "cus_01h455vb4pex5vsknk084sn02p",
"due_at": 1704758400,
"invoice": "in_01h455vb4pex5vsknk084sn02q",
"live_mode": true,
"max_attempts": 3,
"status": "pending",
"installments": 1,
"last_payment_error": "<unknown>",
"next_attempt": 1704844800,
"payment_method_type": "pix",
"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 da fatura (TypeID com prefixo in_).
Pattern:
^in_[0-9a-z]{26}$Example:
"in_01h455vb4pex5vsknk084sn02q"
Filtrar por status
Available options:
pending, processing, paid, failed, refunding, refunded, discarded Resultados por página
Required range:
1 <= x <= 100Cursor para próxima página
Response
Lista de cobranças
String representando o tipo do objeto. Sempre "list" para listas.
Available options:
list Example:
"list"
URL do recurso solicitado.
Example:
"/api/v1/payment_intents"
Indica se há mais resultados disponíveis para paginação.
Example:
false
Lista de cobranças.
Show child attributes
Show child attributes

