Listar preços
curl --request GET \
--url https://besimplo.com/api/v1/prices \
--header 'Authorization: <api-key>'import requests
url = "https://besimplo.com/api/v1/prices"
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/prices', 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/prices",
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/prices"
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/prices")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://besimplo.com/api/v1/prices")
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/prices",
"has_more": false,
"data": [
{
"id": "price_01h455vb4pex5vsknk084sn02q",
"object": "price",
"active": true,
"live_mode": true,
"created": 1704672000,
"currency": "brl",
"product": "prod_01h455vb4pex5vsknk084sn02q",
"type": "recurring",
"unit_amount": 2990,
"card_installments_enabled": false,
"max_card_installments": 1,
"description": "Plano Mensal Premium",
"unit_amount_decimal": "2990",
"recurring": {
"interval": "month",
"interval_count": 1
},
"external_code": "price_premium_monthly",
"effective_max_card_installments": 1,
"installment_selection_available": false
}
]
}Preços
Listar preços
Retorna uma lista paginada de preços da conta.
GET
/
api
/
v1
/
prices
Listar preços
curl --request GET \
--url https://besimplo.com/api/v1/prices \
--header 'Authorization: <api-key>'import requests
url = "https://besimplo.com/api/v1/prices"
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/prices', 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/prices",
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/prices"
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/prices")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://besimplo.com/api/v1/prices")
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/prices",
"has_more": false,
"data": [
{
"id": "price_01h455vb4pex5vsknk084sn02q",
"object": "price",
"active": true,
"live_mode": true,
"created": 1704672000,
"currency": "brl",
"product": "prod_01h455vb4pex5vsknk084sn02q",
"type": "recurring",
"unit_amount": 2990,
"card_installments_enabled": false,
"max_card_installments": 1,
"description": "Plano Mensal Premium",
"unit_amount_decimal": "2990",
"recurring": {
"interval": "month",
"interval_count": 1
},
"external_code": "price_premium_monthly",
"effective_max_card_installments": 1,
"installment_selection_available": false
}
]
}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 por status ativo/inativo
Filtrar pelo ID do produto, no formato TypeID com prefixo prod_.
Pattern:
^prod_[0-9a-z]{26}$Example:
"prod_01h455vb4pex5vsknk084sn02q"
Filtrar por tipo de cobrança
Available options:
one_time, recurring Resultados por página
Required range:
1 <= x <= 100Cursor para próxima página
Response
Lista de preços
Tipo do objeto. Sempre "list" para listas.
Available options:
list Example:
"list"
URL do recurso solicitado.
Example:
"/api/v1/prices"
Indica se há mais resultados disponíveis para paginação.
Example:
false
Array de objetos Price.
Show child attributes
Show child attributes

