v1
latestOpenAPI 3.1.02026-07-241040774.6 KBListar faturas
Este recurso permite listar os descontos associados a uma assinatura. Pode ser utilizados alguns parâmetros como filtro da listagem.
get/invoices
Query parameters
statusstring
Status das faturas. Valores possíveis: pending, paid, canceled, scheduled ou failed
customer_idstring
Código do cliente.
subscription_idstring
Código da assinatura.
due_sincestring date
Data de início do período de vencimento a ser listado.
due_untilstring date
Data final do período de vencimento a ser listado.
created_sincestring date
Data de início do período de criação a ser listado.
created_untilstring date
Data final do período de criação a ser listado.
pageinteger
Página atual.
sizeinteger
Quantidade de itens por página.
Response
200
Example response
{
"data": [
{
"id": "in_DnQj6J8iWhEg0MrK",
"code": "0E6RC91AE1",
"url": "/invoices/in_DnQj6J8iWhEg0MrK",
"amount": 1490,
"status": "paid",
"payment_method": "credit_card",
"due_at": "2017-04-04T00:00:00Z",
"created_at": "2017-04-04T15:54:46Z",
"items": [
{
"name": "Nome - teste",
"amount": 1490,
"quantity": 1,
"description": "Bola"
}
],
"customer": {
"id": "cus_J4wRXJ0U6ytZrpAx",
"name": "Tony Star8k",
"email": "tstark@avengers.com",
"created_at": "2016-09-28T21:04:37Z",
"updated_at": "2017-04-04T15:08:20Z"
},
"subscription": {
"id": "sub_49O5RwPh5sl0wyqM",
"code": "G2X5F99FXX",
"start_at": "2017-04-04T00:00:00Z",
"interval": "month",
"interval_count": 1,
"billing_type": "postpaid",
"next_billing_at": "2017-05-04T00:00:00Z",
"payment_method": "credit_card",
"currency": "BRL",
"statement_descriptor": "Spotify",
"installments": 1,
"status": "active",
"created_at": "2017-04-04T15:54:19Z",
"updated_at": "2017-04-04T15:54:19Z"
},
"cycle": {
"id": "cycle_O6vXjrvUbecMjpgq",
"start_at": "2017-04-04T00:00:00Z",
"end_at": "2017-05-03T23:59:59Z",
"billing_at": "2017-05-04T00:00:00Z"
},
"charge": {
"id": "ch_1DaVYVQCds28rOm3",
"code": "G2X5F99FXX-01",
"gateway_id": "1e3a21f7-ad65-4ad0-a68c-3eb37e8115c9",
"amount": 1490,
"status": "paid",
"currency": "BRL",
"payment_method": "credit_card",
"due_at": "2017-04-04T00:00:00Z",
"paid_at": "2017-04-04T15:54:49Z",
"created_at": "2017-04-04T15:54:46Z",
"updated_at": "2017-04-04T15:54:46Z"
}
}
],
"paging": {
"total": 1
}
}