Skip to main content
GET
/
api
/
v1
/
invoices
/
{id}
Consultar fatura
curl --request GET \
  --url https://besimplo.com/api/v1/invoices/{id} \
  --header 'Authorization: <api-key>'
{
  "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_remaining": 9990,
  "customer_email": "joao.silva@exemplo.com",
  "customer_name": "João Silva",
  "paid": false,
  "status_transitions": {
    "paid_at": 1704758400
  },
  "subscription": "sub_01h455vb4pex5vsknk084sn02s"
}

Documentation Index

Fetch the complete documentation index at: https://docs.besimplo.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

A chave de API usada para autenticar a requisição e identificar a sua conta.

Exemplo: Authorization: ApiKey my-secure-key

Path Parameters

id
string
required

ID da fatura.

Pattern: ^in_[0-9a-z]{26}$
Example:

"in_01h455vb4pex5vsknk084sn02q"

Response

Operação realizada com sucesso

id
string
required
read-only

ID único da fatura, no formato TypeID com prefixo in_.

Pattern: ^in_[0-9a-z]{26}$
Example:

"in_01h455vb4pex5vsknk084sn02q"

object
enum<string>
required

Tipo do objeto. Sempre 'invoice'.

Available options:
invoice
Example:

"invoice"

amount_due
integer
required

Valor a pagar em centavos. R$ 99,90 = 9990.

Example:

9990

created
integer<int64>
required
read-only

Timestamp Unix da criação da fatura.

Example:

1704672000

currency
enum<string>
required

Moeda do valor. Sempre 'brl' (Real brasileiro).

Available options:
brl
Example:

"brl"

customer
string
required

ID do cliente associado à fatura, no formato TypeID com prefixo cus_.

Pattern: ^cus_[0-9a-z]{26}$
Example:

"cus_01h455vb4pex5vsknk084sn02p"

live_mode
boolean
required

Indica ambiente de produção (true) ou sandbox (false). Dados de sandbox são limpos periodicamente.

Example:

true

status
enum<string>
required

Status atual da fatura.

  • draft: Rascunho, ainda não finalizada.
  • open: Aberta, aguardando pagamento.
  • paid: Paga.
  • uncollectible: Marcada como incobrável.
  • void: Cancelada.
Available options:
draft,
open,
paid,
uncollectible,
void
Example:

"open"

total
integer
required

Valor total da fatura em centavos. R$ 99,90 = 9990.

Example:

9990

amount_paid
integer

Valor já pago em centavos. R$ 99,90 = 9990.

Example:

0

amount_remaining
integer

Valor restante a pagar em centavos. R$ 99,90 = 9990.

Example:

9990

customer_email
string | null

E-mail do cliente.

Example:

"joao.silva@exemplo.com"

customer_name
string | null

Nome do cliente.

Example:

"João Silva"

paid
boolean

Indica se a fatura foi paga.

Example:

false

status_transitions
object

Timestamps de quando a fatura mudou de status. Campos são null se a transição ainda não ocorreu.

subscription
string | null

ID da assinatura associada (se aplicável), no formato TypeID com prefixo sub_.

Example:

"sub_01h455vb4pex5vsknk084sn02s"