Buscar Fatura por Chave
A busca de fatura por chave retornará os detalhes completos de uma fatura específica, incluindo todos os itens da fatura.
Request
ENDPOINT
/wallet/WALLET_KEY/invoice/INVOICE_KEYMÉTODO
GETPath Parameters
| Campo | Tipo | Descrição | Caracteres |
|---|---|---|---|
wallet_key | uuidv4 | Chave única da carteira no formato UUID v4 | 36 |
invoice_key | uuidv4 | Chave única da fatura no formato UUID v4 | 36 |
Response
STATUS
200Response Body: Detalhes da fatura
{
"invoice_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"due_date": "2024-02-15",
"closing_date": "2024-01-31",
"invoice_status": "opened",
"total_amount": 350.00,
"paid_amount": 0.00,
"invoice_items": [
{
"invoice_item_key": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"invoice_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"wallet_entry_key": null,
"payment_instrument_entry_key": "g3ebe8d6-4c8a-1794-22d9-406c0f8g3dbe",
"installment_number": 1,
"invoice_description": "Compra no estabelecimento XYZ",
"amount": 150.00,
"used_limit": 150.00,
"paid_amount": 0.00,
"invoice_item_status": "active",
"invoice_item_due_date": "2024-02-15",
"created_at": "2024-01-15T10:30:00Z"
},
{
"invoice_item_key": "b2c3d4e5-f6g7-8901-bcde-f23456789012",
"invoice_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"wallet_entry_key": null,
"payment_instrument_entry_key": "g3ebe8d6-4c8a-1794-22d9-406c0f8g3dbe",
"installment_number": 2,
"invoice_description": "Parcela 2 de 3 - Compra parcelada",
"amount": 200.00,
"used_limit": 200.00,
"invoice_item_status": "active",
"invoice_item_due_date": "2024-02-15",
"created_at": "2024-01-16T14:45:00Z"
}
],
"invoice_payments": [
{
"invoice_payment_key": "c3d4e5f6-g7h8-9012-cdef-345678901234",
"total_amount": 350.00,
"paid_amount": 0.00,
"invoice_payment_type": "bank_slip",
"invoice_payment_status": "paid"
}
],
"invoice_payments_chargebacks": [
{
"invoice_item_key": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"chargeback_paid_amount": 50.00
}
],
"created_at": "2024-01-15T10:30:00Z"
}
Response Body Params
| Campo | Tipo | Descrição | Caracteres |
|---|---|---|---|
invoice_key * | uuidv4 | Chave única de identificação da fatura no formato uuid v4 | 36 |
due_date * | string | Data de vencimento da fatura (formato YYYY-MM-DD) | 10 |
closing_date * | string | Data de fechamento da fatura (formato YYYY-MM-DD) | 10 |
invoice_status * | string | Status da fatura | Enumeradores invoice_status |
total_amount * | number | Valor total da fatura | - |
paid_amount * | number | Valor pago da fatura | - |
invoice_items * | object array | Itens da fatura | Objeto invoice_item |
invoice_payments * | object array | Pagamentos da fatura | Objeto invoice_payment |
invoice_payments_chargebacks * | object array | Estornos dos pagamentos da fatura | Objeto invoice_payment_chargeback |
created_at * | string | Data de criação (formato ISO 8601 UTC) | - |
Objeto invoice_item
| Campo | Tipo | Descrição | Caracteres |
|---|---|---|---|
invoice_item_key * | uuidv4 | Chave única de identificação do item da fatura no formato uuid v4 | 36 |
invoice_key * | uuidv4 | Chave única de identificação da fatura no formato uuid v4 | 36 |
wallet_entry_key | uuidv4 | Chave única de identificação da entrada da carteira no formato uuid v4 | 36 |
payment_instrument_entry_key | uuidv4 | Chave única de identificação da entrada do instrumento de pagamento no formato uuid v4 | 36 |
installment_number * | integer | Número da parcela | - |
invoice_description * | string | Descrição do item da fatura | - |
amount * | float | Valor do item | - |
used_limit * | float | Limite utilizado | - |
invoice_item_status * | string | Status do item da fatura | Enumeradores invoice_item_status |
invoice_item_due_date * | string | Data de vencimento do item (formato YYYY-MM-DD) | 10 |
created_at * | string | Data de criação (formato ISO 8601 UTC) | - |
Objeto invoice_payment
| Campo | Tipo | Descrição | Caracteres |
|---|---|---|---|
| invoice_payment_key * | uuidv4 | Chave única de identificação do pagamento da fatura no formato uuid v4 | 36 |
| total_amount | number | Valor total do pagamento | - |
| paid_amount | number | Valor pago do pagamento | - |
| invoice_payment_type * | string | Tipo de pagamento da fatura | Enumeradores invoice_payment_type |
| invoice_payment_status * | string | Status do pagamento da fatura | Enumeradores invoice_payment_status |
Objeto invoice_payment_chargeback
| Campo | Tipo | Descrição | Caracteres |
|---|---|---|---|
| invoice_item_key * | uuidv4 | Chave única de identificação do item da fatura relacionado ao estorno no formato uuid v4 | 36 |
| chargeback_paid_amount | number | Valor do estorno utilizado | - |
Enumeradores invoice_status
| Enumerador | Descrição |
|---|---|
| opened | Fatura aberta |
| processing_closing | Processando fechamento |
| closed | Fatura fechada |
| waiting_payment | Aguardando pagamento |
Observação
O status waiting_payment é aplicado apenas para carteiras do tipo payroll no cenário em que o valor possível para pagamento já foi realizado e está restando o valor a ser pago com o benefício.
Enumeradores invoice_payment_type
| Enumerador | Descrição |
|---|---|
| bank_slip | Boleto bancário |
| payroll_withdraw | Saque via folha de pagamento |
Observação
O tipo payroll_withdraw existe apenas para carteiras do tipo payroll e representa o valor que vai ser pago via benefício.
Enumeradores invoice_payment_status
| Enumerador | Descrição |
|---|---|
| waiting_payment | Aguardando pagamento |
| paid | Pago |
Observação
O status waiting_payment é aplicado apenas para pagamentos do tipo payroll_withdraw.
Enumeradores invoice_item_status
| Enumerador | Descrição |
|---|---|
| active | Item pendente de pagamento (fatura ao qual o mesmo pertence não foi paga) |
| canceled | Item cancelado |
Error Response
STATUS
4xxResponse Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
Código HTTPstatus | Código QIcode | Títulotitle | Descrição (eng)description | Descrição (pt-br)translation |
|---|---|---|---|---|
| 404 | CIN000007 | Wallet not Found | Wallet with key: abeca0d0-a09d-4b3b-a495-40b553422ced was not found | Carteira com a chave: abeca0d0-a09d-4b3b-a495-40b553422ced não foi encontrado |
| 404 | CIN000016 | Invoice Not Found | Invoice with key: 8cb70dea-9fb0-4a68-9572-99a72849c8d6 was not found | Fatura com a chave: 8cb70dea-9fb0-4a68-9572-99a72849c8d6 não foi encontrado |