Listar assinaturas
curl --request GET \
--url https://besimplo.com/api/v1/subscriptions \
--header 'Authorization: <api-key>'import requests
url = "https://besimplo.com/api/v1/subscriptions"
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/subscriptions', 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/subscriptions",
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/subscriptions"
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/subscriptions")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://besimplo.com/api/v1/subscriptions")
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",
"data": [
{
"id": "sub_01h455vb4pex5vsknk084sn02s",
"live_mode": true,
"status": "active",
"start_date": 1764039600,
"payment_method_type": null,
"installments": 1,
"customer": "cus_01h455vb4pex5vsknk084sn02p",
"item": {
"id": "si_01h455vb4pex5vsknk084sn02i",
"object": "subscription_item",
"price": {
"id": "price_01h455vb4pex5vsknk084sn02q",
"object": "price",
"currency": "brl",
"unit_amount": 123,
"product": "prod_01h455vb4pex5vsknk084sn02q",
"active": true,
"type": "recurring",
"unit_amount_decimal": "500",
"recurring_interval": "day",
"recurring_interval_count": 123,
"created": 1764040287,
"nickname": "Preço mensal básico"
},
"quantity": 123,
"created": 1764040287,
"current_period_end": 1764039600,
"current_period_start": 1764039600,
"subscription": "sub_01h455vb4pex5vsknk084sn02s"
},
"object": "subscription",
"external_code": "ACCOUNT-SUB-XYZ",
"ended": 1795575600,
"billing_cycle_anchor": 1764039600,
"current_period_start": 1764039600,
"latest_invoice": "in_01h455vb4pex5vsknk084sn02q",
"created": 1764040287,
"discounts": {
"object": "list",
"data": [
{
"id": "sdi_01h455vb4pex5vsknk084sn02d",
"object": "discount"
}
]
}
}
],
"has_more": false,
"url": "/api/v1/subscriptions"
}Assinaturas
Listar assinaturas
Retorna uma lista paginada de assinaturas da conta.
GET
/
api
/
v1
/
subscriptions
Listar assinaturas
curl --request GET \
--url https://besimplo.com/api/v1/subscriptions \
--header 'Authorization: <api-key>'import requests
url = "https://besimplo.com/api/v1/subscriptions"
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/subscriptions', 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/subscriptions",
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/subscriptions"
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/subscriptions")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://besimplo.com/api/v1/subscriptions")
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",
"data": [
{
"id": "sub_01h455vb4pex5vsknk084sn02s",
"live_mode": true,
"status": "active",
"start_date": 1764039600,
"payment_method_type": null,
"installments": 1,
"customer": "cus_01h455vb4pex5vsknk084sn02p",
"item": {
"id": "si_01h455vb4pex5vsknk084sn02i",
"object": "subscription_item",
"price": {
"id": "price_01h455vb4pex5vsknk084sn02q",
"object": "price",
"currency": "brl",
"unit_amount": 123,
"product": "prod_01h455vb4pex5vsknk084sn02q",
"active": true,
"type": "recurring",
"unit_amount_decimal": "500",
"recurring_interval": "day",
"recurring_interval_count": 123,
"created": 1764040287,
"nickname": "Preço mensal básico"
},
"quantity": 123,
"created": 1764040287,
"current_period_end": 1764039600,
"current_period_start": 1764039600,
"subscription": "sub_01h455vb4pex5vsknk084sn02s"
},
"object": "subscription",
"external_code": "ACCOUNT-SUB-XYZ",
"ended": 1795575600,
"billing_cycle_anchor": 1764039600,
"current_period_start": 1764039600,
"latest_invoice": "in_01h455vb4pex5vsknk084sn02q",
"created": 1764040287,
"discounts": {
"object": "list",
"data": [
{
"id": "sdi_01h455vb4pex5vsknk084sn02d",
"object": "discount"
}
]
}
}
],
"has_more": false,
"url": "/api/v1/subscriptions"
}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 por status da assinatura.
Available options:
pending, active, inactive, suspended Resultados por página
Required range:
1 <= x <= 100Cursor para próxima página
Response
Lista de assinaturas
Lista paginada de assinaturas.
Tipo do objeto. Sempre 'list'.
Available options:
list Example:
"list"
Assinaturas retornadas.
Show child attributes
Show child attributes
Indica se existem mais páginas de resultados.
Example:
false
Endpoint da listagem.
Example:
"/api/v1/subscriptions"

