Pular para o conteúdo principal

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_KEY
MÉTODO
GET

Path Parameters

CampoTipoDescriçãoCaracteres
wallet_keyuuidv4Chave única da carteira no formato UUID v436
invoice_keyuuidv4Chave única da fatura no formato UUID v436

Response

STATUS
200
Response 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

CampoTipoDescriçãoCaracteres
invoice_key *uuidv4Chave única de identificação da fatura no formato uuid v436
due_date *stringData de vencimento da fatura (formato YYYY-MM-DD)10
closing_date *stringData de fechamento da fatura (formato YYYY-MM-DD)10
invoice_status *stringStatus da faturaEnumeradores invoice_status
total_amount *numberValor total da fatura-
paid_amount *numberValor pago da fatura-
invoice_items *object arrayItens da faturaObjeto invoice_item
invoice_payments *object arrayPagamentos da faturaObjeto invoice_payment
invoice_payments_chargebacks *object arrayEstornos dos pagamentos da faturaObjeto invoice_payment_chargeback
created_at *stringData de criação (formato ISO 8601 UTC)-

Objeto invoice_item

CampoTipoDescriçãoCaracteres
invoice_item_key *uuidv4Chave única de identificação do item da fatura no formato uuid v436
invoice_key *uuidv4Chave única de identificação da fatura no formato uuid v436
wallet_entry_keyuuidv4Chave única de identificação da entrada da carteira no formato uuid v436
payment_instrument_entry_keyuuidv4Chave única de identificação da entrada do instrumento de pagamento no formato uuid v436
installment_number *integerNúmero da parcela-
invoice_description *stringDescrição do item da fatura-
amount *floatValor do item-
used_limit *floatLimite utilizado-
invoice_item_status *stringStatus do item da faturaEnumeradores invoice_item_status
invoice_item_due_date *stringData de vencimento do item (formato YYYY-MM-DD)10
created_at *stringData de criação (formato ISO 8601 UTC)-

Objeto invoice_payment

CampoTipoDescriçãoCaracteres
invoice_payment_key *uuidv4Chave única de identificação do pagamento da fatura no formato uuid v436
total_amountnumberValor total do pagamento-
paid_amountnumberValor pago do pagamento-
invoice_payment_type *stringTipo de pagamento da faturaEnumeradores invoice_payment_type
invoice_payment_status *stringStatus do pagamento da faturaEnumeradores invoice_payment_status

Objeto invoice_payment_chargeback

CampoTipoDescriçãoCaracteres
invoice_item_key *uuidv4Chave única de identificação do item da fatura relacionado ao estorno no formato uuid v436
chargeback_paid_amountnumberValor do estorno utilizado-

Enumeradores invoice_status

EnumeradorDescrição
openedFatura aberta
processing_closingProcessando fechamento
closedFatura fechada
waiting_paymentAguardando 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

EnumeradorDescrição
bank_slipBoleto bancário
payroll_withdrawSaque 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

EnumeradorDescrição
waiting_paymentAguardando pagamento
paidPago
Observação

O status waiting_payment é aplicado apenas para pagamentos do tipo payroll_withdraw.

Enumeradores invoice_item_status

EnumeradorDescrição
activeItem pendente de pagamento (fatura ao qual o mesmo pertence não foi paga)
canceledItem cancelado

Error Response

STATUS
4xx
Response Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
Código HTTP
status
Código QI
code
Título
title
Descrição (eng)
description
Descrição (pt-br)
translation
404CIN000007Wallet not FoundWallet with key: abeca0d0-a09d-4b3b-a495-40b553422ced was not foundCarteira com a chave: abeca0d0-a09d-4b3b-a495-40b553422ced não foi encontrado
404CIN000016Invoice Not FoundInvoice with key: 8cb70dea-9fb0-4a68-9572-99a72849c8d6 was not foundFatura com a chave: 8cb70dea-9fb0-4a68-9572-99a72849c8d6 não foi encontrado