QI FATURA
Experiência de cartão com PIX Parcelado
A API ainda está em fase final de desenvolvimento, sendo assim, este manual esta sujeito a alterações.
Os webhooks da QI Tech não devem ser mapeadas de forma restrita. Campos adicionais podem ser incluídos aos payloads dos webhooks retornados em nossas APIs.
Você pode consultar e reenviar webhooks seguindo as instruções detalhadas na documentação: Reenvio de Webhooks.
1. Criar uma Carteira Digital
Para ser possível o lançamento de itens na fatura (entradas de pix lastreadas em ccb) é necessário, primeiramente, a criação de uma carteira digital por cliente.
Request
Request Body
{
"owner": {
"person_type": "natural",
"name": "\<NOME TITULAR DA CARTEIRA\>",
"document_number": "\<CPF TITULAR DA CARTEIRA\>",
"address": {
"street": "\<RUA TITULAR DA CARTEIRA\>",
"state": "\<ESTADO TITULAR DA CARTEIRA\>",
"city": "\<CIDADE TITULAR DA CARTEIRA\>",
"neighborhood": "\<BAIRRO TITULAR DA CARTEIRA\>",
"number": "\<No. TITULAR DA CARTEIRA\>",
"postal_code": "\<CEP TITULAR DA CARTEIRA\>",
"complement": "\<COMPLEMENTO TITULAR DA CARTEIRA\>"
},
"phone": {
"number": "\<CELULAR TITULAR DA CARTEIRA\>",
"area_code": "\<DDD TITULAR DA CARTEIRA\>",
"country_code": "55",
},
"email": "\<EMAIL TITULAR DA CARTEIRA\>",
"document_identification_number":"\<NÚMERO DO DOCUMENTO DE IDENTIFICAÇÃO DO TITULAR DA CARTEIRA\>",
"document_identification":"\<CHAVE DO DOCUMENTO DE IDENTICAÇÃO DO TITULAR\>",
"document_identification_back":"\<CHAVE DO VERSO DO DOCUMENTO DE IDENTICAÇÃO DO TITULAR\>",
"selfie":"\<CHAVE DA SELFIE DO TITULAR\>",
"document_identification_type": "\<TIPO DO DOCUMENTO DE IDENTIFICAÇÃO DO TITULAR\>"
},
"invoice_configuration":{
"closing_day": "\<DATA DE FECHAMENTO DA FATURA\>",
"due_day": "\<DATA DE VENCIMENTO DA FATURA\>",
"grace_months": "\<DIFERENÇA, EM MESES, ENTRE closing_day e due_day\>",
"issuing_and_due_day_difference": "\<DIAS ANTES DO VENCIMENTO QUE A FATURA DEVE SER EMITIDA\>",
"invoice_payment_type": "bankslip",
"delay_fine_percentage": "\<CONFIGURAÇÃO DE ATRASO - VALOR DA MORA\>",
"delay_monthly_interest_rate": "\<CONFIGURAÇÃO DE ATRASO -VALOR DOS JUROS POR DIA\>"
},
"invoice_authorization": {
"signature": {
"signer": {
"name": "\<NOME ASSINANTE\>",
"email": "\<EMAIL ASSINANTE\>",
"phone": {
"number": "\<CELULAR ASSINANTE\>",
"area_code": "\<DDD ASSINANTE\>",
"country_code": "55",
},
"document_number": "CPF ASSINANTE"
},
"authentication_type": "opt_in",
"authenticity": {
"timestamp": "\<DATA E HORA DA ASSINATURA\>",
"ip_address": "\<IP DO ASSINANTE\>",
"fingerprint": {},
"third_party_additional_data": {},
"session_id": "\<ID DA SESSÃO DO ASSINANTE\>"
},
"signed_object": {
"document_key": "\<CHAVE DO DOCUMENTO NA QI\>"
}
}
},
"limit": "\<VALOR DO LIMITE DA WALLET\>",
"default_monthly_interest_rate": "\<TAXA DE JUROS MENSAL, DEFAULT DA CARTEIRA, CONSIDERADA PARA CADA ENTRADA (PIX)\>"
}
Request body details
Payload wallet
Campo | Tipo | Descrição | Caracteres |
---|---|---|---|
owner | object | Objeto Dono da carteira | Objeto owner |
invoice_configuration | object | Objeto Configurações da Fatura para cada Carteira | Objeto invoicer_configuration |
invoice_authorization | object | Objeto Autorização | Objeto invoice_authorization |
limit | number | Limite da carteira | |
default_monthly_interest_rate | number | Taxa de juros default da carteira. |
Objeto owner
Campo | Tipo | Descrição | Caracteres |
---|---|---|---|
person_type | string | Identificador de que o objeto enviado é uma pessoa física ou jurídica. | |
name | string | Razão social em caso de operações PJ ou Nome da pessoa em caso de operações PF. | 100 |
document_number | string | CPF da pessoa (apenas números). Limitado a 11 caracteres. | |
address | string | Endereço do cliente. | Objeto adress |
phone | string | Objeto com dados do telefone | Objeto phone |
email | string | Email do cliente. |
Objeto address
Campo | Descrição | Exemplo | Máx. Caracteres |
---|---|---|---|
street | string | Rua do endereço | 100 |
state | string | Estado do endereço (com dois caracteres maiúsculos) | 2 |
city | string | Cidade do endereço | 100 |
neighborhood | string | Bairro do endereço | 100 |
number | string | Número da rua | 10 |
postal_code | string | CEP do endereço (http://www.buscacep.correios.com.br/sistemas/buscacep/) (apenas números) | 8 |
complement | string | Complemento do endereço (texto livre) | 100 |
Objeto phone
Campo | Descrição | Exemplo | Máx. Caracteres |
---|---|---|---|
country_code | string | Código DDI do telefone (https://ddi.guiamais.com.br/) | 3 |
area_code | string | Código DDD do telefone (https://ddd.guiamais.com.br/) | 2 |
number | string | Número de telefone (apenas números) | 10 |
Objeto invoice_configuration
Campo | Descrição | Exemplo | Máx. Caracteres |
---|---|---|---|
closing_day | number | Dia de fechamento da fatura (data de corte para registro de entradas me uma fatura). | |
due_day | number | Dia de vencimento da fatura. Opções: 1,5,10 | |
grace_months | number | Diferença de meses entre a data de fechamento e vencimento. | |
delay_fine_percentage | number | Valor da mora, em caso de atraso no pagamento da fatura. | |
delay_monthly_interest_rate | number | Valor do juros, por mês, em caso de atraso no pagamento da fatura. | |
issuing_and_due_day_difference | number | Número de dia entre a emissão da fatura e vencimento, para fins de cálculo da data de emissão da fatura | |
invoice_payment_type | string | Meio de pagamento da fatura. Opções: 'bankslip' |
Na configuração da invoice (invoice_configuration), os dados fixos, como "delay_fine_percentage", "grace_months", "delay_monthly_interest_rate", "invoice_payment_type", "issuing_and_due_day_difference", podem estar diretamente configurado no setup inicial do parceiro na API, simplificando o payload de criação da wallet. As informações configuradas no setup inicial do parceiro na API serão fixas para todos os clientes.
O número de dias entre a data de vencimento da fatura “invoice_configuration.due_day“ e a data fechamento “invoice_configuration.closing_day“, precisa ser maior ou igual a 8 dias e menor ou igual a 10 dias.
Response
Response Body
{
"wallet_key": "0f4581d6-f4a4-4430-b94e-5db700e4baed",
"status": "active"
}
Response body details
Campo | Tipo | Descrição | Caracteres |
---|---|---|---|
wallet_key | string | Identificador único da carteira (uuid) | |
status | string | Status da carteira |
1.1. Consultar carteiras existentes:
QUERY PARAMETERS
Enumerador | Descrição |
---|---|
owner_document_number | CPF do titular da carteira |
page | Número da página da consulta |
page_size | Tamanho da página requisitada na consulta |
Request
Response
Response Body
{
"page": 1,
"last_page": true,
"data": [
{
"wallet_key": "0f4581d6-f4a4-4430-b94e-5db700e4baed",
"owner": {
"person_type": "natural",
"name": "Nome Sobrenome",
"document_number": "12345678911",
"address": {
"street": "RUA DEZENOVE",
"state": "SP",
"city": "JARDINÓPOLIS",
"neighborhood": "JARDINS DO IMPÉRIO",
"number": "19",
"postal_code": "13348719",
"complement": ""
},
"phone": {
"number": "912345678",
"area_code": "21",
"country_code": "55"
},
"email": "teste@teste.com.br"
},
"collaterals": [],
"cards": [
{"card_key":"067cba94-4d57-4a75-9766-7e5b95c87367"}
],
"invoice_authorization": {
"signature": {
"signer": {
"name": "Nome Sobrenome",
"document_number": "12345678911",
"email": "teste@teste.com.br",
"phone": {
"number": "912345678",
"area_code": "21",
"country_code": "55"
}
},
"authentication_type": "opt_in",
"authenticity": {
"timestamp": "2022-11-18T11:17:46",
"ip_address": "104.101.21.0",
"fingerprint": {
"browser": "Mozila"
},
"third_party_additional_data": {},
"session_id": "8df91773-c537-4662-b08b-025f03bf79dc"
},
"signed_object": {
"document_key": "27A0BA3D-A89D-4218-AB06-BC39B94CE23C"
}
}
},
"interest_base": "calendar_days_365",
"default_monthly_interest_rate": 0.035,
"invoice_configuration": {
"due_day": 10,
"closing_day": 1,
"grace_months": 1,
"invoice_payment_type": "bankslip",
"delay_fine_percentage": 0,
"delay_monthly_interest_rate": 0,
"issuing_and_due_day_difference": 9
},
"status": "active",
"limit": 800,
"current_limit": 800
}
]
}
1.2. Consultar carteira específica:
Request
Response
Response Body
{
"wallet_key": "0f4581d6-f4a4-4430-b94e-5db700e4baed",
"owner": {
"person_type": "natural",
"name": "Nome Sobrenome",
"document_number": "12345678911",
"address": {
"street": "RUA DEZENOVE",
"state": "SP",
"city": "JARDINÓPOLIS",
"neighborhood": "JARDINS DO IMPÉRIO",
"number": "19",
"postal_code": "13348719",
"complement": ""
},
"phone": {
"number": "912345678",
"area_code": "21",
"country_code": "55"
},
"email": "teste@teste.com.br"
},
"collaterals": [],
"cards": [
{"card_key":"067cba94-4d57-4a75-9766-7e5b95c87367"}
],
"invoice_authorization": {
"signature": {
"signer": {
"name": "Nome Sobrenome",
"document_number": "12345678911",
"email": "teste@teste.com.br",
"phone": {
"number": "912345678",
"area_code": "21",
"country_code": "55"
}
},
"authentication_type": "opt_in",
"authenticity": {
"timestamp": "2022-11-18T11:17:46",
"ip_address": "104.101.21.0",
"fingerprint": {
"browser": "Mozila"
},
"third_party_additional_data": {},
"session_id": "8df91773-c537-4662-b08b-025f03bf79dc"
},
"signed_object": {
"document_key": "27A0BA3D-A89D-4218-AB06-BC39B94CE23C"
}
}
},
"interest_base": "calendar_days_365",
"default_monthly_interest_rate": 0.035,
"invoice_configuration": {
"due_day": 10,
"closing_day": 1,
"grace_months": 1,
"invoice_payment_type": "bankslip",
"delay_fine_percentage": 0,
"delay_monthly_interest_rate": 0,
"issuing_and_due_day_difference": 9
},
"status": "active",
"limit": 800,
"current_limit": 800
}
1.3. Alterar Limite de uma carteira:
Request
Request Body
{
"limit": 123
}
Response
Response Body
{
"wallet_key": "0f4581d6-f4a4-4430-b94e-5db700e4baed",
"owner": {
"person_type": "natural",
"name": "Nome Sobrenome",
"document_number": "12345678911",
"address": {
"street": "RUA DEZENOVE",
"state": "SP",
"city": "JARDINÓPOLIS",
"neighborhood": "JARDINS DO IMPÉRIO",
"number": "19",
"postal_code": "13348719",
"complement": ""
},
"phone": {
"number": "912345678",
"area_code": "21",
"country_code": "55"
},
"email": "teste@teste.com.br"
},
"collaterals": [],
"invoice_authorization": {
"signature": {
"signer": {
"name": "Nome Sobrenome",
"document_number": "12345678911",
"email": "teste@teste.com.br",
"phone": {
"number": "912345678",
"area_code": "21",
"country_code": "55"
}
},
"authentication_type": "opt_in",
"authenticity": {
"timestamp": "2022-11-18T11:17:46",
"ip_address": "104.101.21.0",
"fingerprint": {
"browser": "Mozila"
},
"third_party_additional_data": {},
"session_id": "8df91773-c537-4662-b08b-025f03bf79dc"
},
"signed_object": {
"document_key": "27A0BA3D-A89D-4218-AB06-BC39B94CE23C"
}
}
},
"interest_base": "calendar_days_365",
"default_monthly_interest_rate": 0.035,
"invoice_configuration": {
"due_day": 10,
"closing_day": 1,
"grace_months": 1,
"invoice_payment_type": "bankslip",
"delay_fine_percentage": 0,
"delay_monthly_interest_rate": 0,
"issuing_and_due_day_difference": 9
},
"status": "active",
"limit": 123,
"current_limit": 1000
}
2. Adicionar Cartões a uma carteira digital existente:
Após a criação da carteira digital para o cliente, é necessário criar um cartão, vinculado à esta carteira
Request
Request Body
{
"settlement_method": "credit_operation"
}
Request body details
Payload card
Campo | Tipo | Descrição | Caracteres |
---|---|---|---|
settlement_method | string | Tipo de lastro. Ou seja, como as transações serão lastreadas. Opções: "credit_operation" |
Response
Response Body
{
"card_key": "dabd10b6-80a8-4c9c-8a8e-e25a56668525"
}
Response body details
Campo | Tipo | Descrição | Caracteres |
---|---|---|---|
card_key | string | Identificador único do cartão (uuid) |
3. Simular operação:
Simular as transações (PIX).
Request
Request Body
{
"amount": 200,
"number_of_installments": 4,
"monthly_interest_rate": 0.035
}
Não é necessário informar o campo "monthly_interest_rate", quando não informado, a transação assumirá o default da carteira.
Response
Response Body
{
"amount": 200,
"final_amount": 221.16,
"number_of_installments": 4,
"monthly_interest_rate": 0.035,
"cet": 0.03,
"annual_cet": 0.5040,
"total_iof": 100.44,
"items": [
{
"amount": 55.29,
"used_limit":50,
"installment_number": 1,
"invoice": {
"due_date": "2023-09-10"
}
},
{
"amount": 55.29,
"used_limit":50,
"installment_number": 2,
"invoice": {
"due_date": "2023-10-10"
}
},
{
"amount": 55.29,
"used_limit":50,
"installment_number": 3,
"invoice": {
"due_date": "2023-11-10"
}
},
{
"amount": 55.29,
"used_limit":50,
"installment_number": 4,
"invoice": {
"due_date": "2023-12-10"
}
}
]
}
4. Incluir transações em um cartão:
Incluir as transações (PIX). É nesta etapa que é gerada a ccb, em que é verificado se há limite disponível para realizar a transação. A liquidação da transação é processada de forma síncrona.
Request
Não é necessário informar o campo "monthly_interest_rate", quando não informado, a transação assumirá o default da carteira.
Request Body
{
"disbursement": {
"method": "pix",
"data": {
"pix_key": "\<CHAVE PIX\>",
"end_to_end_id": "\<CHAVE END TO END DO PIX\>"
}
},
"description": "Compra Padaria do João",
"amount": 200,
"request_control_key": "275619e6-23d1-485e-81ca-5552aa235761",
"number_of_installments": 4,
"monthly_interest_rate": 0.027,
"authorization": {
"document_number": "01975273702",
"signature": {
"signed_object": {
"document_key": "6254c56e-c980-4b38-ad99-ac5ec7535d68"
},
"authenticity": {
"ip_address": "192.168.0.0",
"third_party_additional_data": {
"hash": "23A2581A8D524035FEB2950D28727CF5 | 192.168.0.0 | 23/02/2023 17:38:45"
},
"timestamp": "2023-02-23T17:38:45.610458300"
},
"authentication_type": "opt_in",
"signer": {
"document_number": "01975273702",
"phone": {
"number": "986243444",
"country_code": "55",
"area_code": "21"
},
"name": "Master Tester",
"email": "mail@mail.com"
}
}
}
}
Desembolsar com Chave Pix
{
"disbursement": {
"method": "pix",
"data": {
"pix_key": "\<CHAVE PIX\>",
"end_to_end_id": "\<CHAVE END TO END DO PIX\>"
}
}
}
Desembolsar com Pix QR Code
{
"disbursement": {
"method": "pix_qrcode",
"data": {
"qr_code_url": "\<URL DO PIX\>",
"end_to_end_id": "\<CHAVE END TO END DO PIX QR CODE\>"
}
}
}
Desembolsar com Pix Manual
{
"disbursement": {
"method": "pix_manual",
"data": {
"ispb": "\<BASE DO CNPJ DO BANCO\>",
"branch_number": "\<AGÊNCIA DA CONTA DE DESEMBOLSO\>",
"account_number": "\<NÚMERO DA CONTA SEM O DÍGITO\>",
"account_digit": "\<DIGITO DA CONTA DE DESEMBOLSO\>",
"document_number": "\<CPF/ CNPJ DO TITULAR DA CONTA\>",
"name": "\<NOME DO TITULAR DA CONTA\>"
}
}
}
Response
Em caso de sucesso no desembolso da transação:
Response Body
{
"card_entry_key": "ad8e073a-2159-479b-b141-cd5d8ceb8567",
"status": "active",
"signed_url":"https://storage.googleapis.com/live-doc-api/documents/XXXXXXXXXXXXXXX.pdf"
}
Por instabilidade do Bacen ou do banco de destino da transação, pode ocorrer atraso na transação do contrato, dessa forma o mesmo assumirá o status "pending_activation", e será atualizado quando a transação for realizada com sucesso ou o contrato for cancelado. Dessa forma, o fluxo migrará de síncrono para assíncrono devendo esperar o webhook de sucesso ou falha da transação .
4.1 Consultar uma transação (card entry) específica:
Request
Response
Response Transação Pix Manual
{
"transaction_key": "75b800f3-12ba-41b3-a7d5-cbb3ae2199f2",
"end_to_end_id": "E324025022023082120064RNfdmEDTxV",
"transacted_at": "2023-08-21T20:07:46",
"amount": 2242.8,
"number_of_installments": 2,
"monthly_interest_rate": 0.027,
"final_amount":2250,
"cet": 0.03,
"annual_cet": 0.5040,
"total_iof": 100.44,
"description":"Compra Padaria do João",
"disbursement": {
"method": "pix_manual",
"data": {
"ispb": 32402502,
"branch_number": 1,
"account_number": 15570,
"account_digit": 1,
"document_number": "12345678911",
"name": "XXXXX XXXX XXXX"
}
},
"card_entry_datetime": "2023-06-07T10:29:49Z",
"signed_url":"https://storage.googleapis.com/live-doc-api/documents/XXXXXXXXXXXXXXX.pdf",
"items": [
{
"item_key":"37ebad25-7eef-4a46-b497-ce46c2c04f68",
"amount": 1125,
"used_limit":1121.4,
"status":"active",
"installment_number": 1,
"invoice": {
"invoice_key": "b32e7eae-eaab-4402-9126-9fcf42741c24",
"due_date": "2023-07-10",
"status": "opened"
},
},
{
"item_key":"60e4801f-75ce-411e-aaf0-99b951c05308",
"amount": 1125,
"used_limit":1121.4,
"installment_number": 2,
"status":"active",
"invoice": {
"invoice_key": "2af90944-1377-447c-aa70-0efd24c17d6f",
"due_date": "2023-08-10",
"status": "opened"
},
}
],
"status": "active"
}
Response Transação Pix Key
{
"transaction_key": "75b800f3-12ba-41b3-a7d5-cbb3ae2199f2",
"end_to_end_id": "E324025022023082120064RNfdmEDTxV",
"transacted_at": "2023-08-21T20:07:46",
"amount": 2242.8,
"final_amount":2250,
"number_of_installments": 2,
"monthly_interest_rate": 0.027,
"cet": 0.03,
"annual_cet": 0.5040,
"total_iof": 100.44,
"description":"Compra Padaria do João",
"disbursement": {
"data": {
"end_to_end_id": "E3240250220210928212926341670923",
"pix_key": "+5516983068432"
},
"method": "pix"
},
"card_entry_datetime": "2023-06-07T10:29:49Z",
"signed_url":"https://storage.googleapis.com/live-doc-api/documents/XXXXXXXXXXXXXXX.pdf",
"items": [
{
"item_key":"37ebad25-7eef-4a46-b497-ce46c2c04f68",
"amount": 1125,
"used_limit":1121.4,
"installment_number": 1,
"status":"active",
"invoice": {
"invoice_key": "b32e7eae-eaab-4402-9126-9fcf42741c24",
"due_date": "2023-07-10",
"status": "opened"
},
},
{
"item_key":"60e4801f-75ce-411e-aaf0-99b951c05308",
"amount": 1125,
"used_limit":1121.4,
"status":"active",
"installment_number": 2,
"invoice": {
"invoice_key": "2af90944-1377-447c-aa70-0efd24c17d6f",
"due_date": "2023-08-10",
"status": "opened"
},
}
],
"status": "active"
}
Response Transação Pix QR Code
{
"transaction_key": "75b800f3-12ba-41b3-a7d5-cbb3ae2199f2",
"end_to_end_id": "E324025022023082120064RNfdmEDTxV",
"transacted_at": "2023-08-21T20:07:46",
"amount": 2242.8,
"final_amount":2250,
"number_of_installments": 2,
"monthly_interest_rate": 0.027,
"cet": 0.03,
"annual_cet": 0.5040,
"total_iof": 100.44,
"description":"Compra Padaria do João",
"disbursement": {
"method": "pix_qrcode",
"data": {
"qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/a1908d67-bcc8-40cd-a63d-6b6fb510b35c5204000053039865802BR5925QI SOCIEDADE DE CREDITO D6009Sao Paulo61080145200062070503***63042184",
"end_to_end_id": "E3240250220220822211350711639780"
}
},
"card_entry_datetime": "2023-06-07T10:29:49Z",
"signed_url":"https://storage.googleapis.com/live-doc-api/documents/XXXXXXXXXXXXXXX.pdf",
"items": [
{
"item_key":"37ebad25-7eef-4a46-b497-ce46c2c04f68",
"amount": 1125,
"used_limit":1121.4,
"installment_number": 1,
"status":"active",
"invoice": {
"invoice_key": "b32e7eae-eaab-4402-9126-9fcf42741c24",
"due_date": "2023-07-10",
"status": "opened"
},
},
{
"item_key":"60e4801f-75ce-411e-aaf0-99b951c05308",
"amount": 1125,
"used_limit":1121.4,
"installment_number": 2,
"status":"active",
"invoice": {
"invoice_key": "2af90944-1377-447c-aa70-0efd24c17d6f",
"due_date": "2023-08-10",
"status": "opened"
},
}
],
"status": "active"
}
Enumeradores Card Entry status
Enumerador | Descrição |
---|---|
active | Contrato ativo e desembolsado |
pending_activation | Contrato aguardando desembolso |
canceled | Contrato cancelado |
paid | Contrato liquidado |
4.2 Gerar comprovante da transação:
Request
Response
Response Body
{
"base64_receipt": ""
}
5. Listar faturas de uma carteira digital:
Request
Response
Limite de itens retornados por página: 100
Response Body
{
"wallet_key": "9798d733-7f68-4929-8877-a00bfda9735e",
"invoice_closing_day": 2,
"invoice_due_day": 10,
"page": "1",
"last_page": "False",
"invoices": [
{
"invoice_key": "b32e7eae-eaab-4402-9126-9fcf42741c24",
"due_date": "2023-04-10",
"closing_date": "2023-04-02",
"status": "opened",
"number_of_items": 2
},
{
"invoice_key": "2af90944-1377-447c-aa70-0efd24c17d6f",
"due_date": "2023-05-10",
"closing_date": "2023-05-02",
"status": "opened",
"number_of_items": 12
},
{
"invoice_key": "26e18c39-8f67-4399-9a42-8d18bc175da2",
"due_date": "2023-04-10",
"closing_date": "2023-04-02",
"status": "opened",
"number_of_items": 1
},
{
"invoice_key": "6991f8e6-7b1d-4496-a08f-8a9eef263f07",
"due_date": "2023-06-10",
"closing_date": "2023-06-02",
"status": "opened",
"number_of_items": 12
}
]
}
6. Listar transações de uma fatura:
Request
Response
Response Body
{
"due_date": "2023-06-10",
"closing_date": "2023-06-02",
"status": "closed",
"amount": 12345.67,
"paid_amount": 0,
"delay_interest_total_amount": 0,
"delay_fine_total_amount": 0,
"number_of_items": 1,
"invoice_payments": [
{
"invoice_payment_key": "63a7c7a2-9e13-48cf-aea2-3b494125d14b",
"invoice_payment_type": "bankslip",
"charge_type": "ordinary",
"data": {
"digitable_line": "32990001039000000000104620768103992260000004183",
"qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/881979cb-1c15-4dea-a05e-316caae22f5e5204000053039865802BR5925LOTEAMENTO RESIDENCIAL PO6014PORTO NACIONAL61087750000062070503***630414B8"
},
"expiration": "2023-07-10",
"status": "opened",
"total_amount": 0,
"paid_amount": 0,
"chargeback_amount": 50
}
],
"items": [
{
"item_key": "37ebad25-7eef-4a46-b497-ce46c2c04f68",
"amount": 12345.67,
"used_limit": 12300,
"status": "active",
"card_entry": {
"card_entry_key": "ad8e073a-2159-479b-b141-cd5d8ceb8567",
"card_entry_datetime": "2022-11-13T10:29:49",
"description": "Compra Padaria do João",
"final_amount": 12345.67,
"number_of_installments": 2,
"card": {
"card_key": "d41bd53e-eedc-4d62-97dd-26bbaefadb20"
}
},
"installment_number": 1
}
]
}
Enumeradores Item status
Enumerador | Descrição |
---|---|
pending_activation | Item aguardando ativação, o valor do item compôe o valor da fatura |
active | Item ativo, o valor do item compôe o valor da fatura |
canceled | Item cancelado, o valor do item é removido do valor da fatura |
paid | Item pago na fatura do mês, o valor do item compôe o valor da fatura |
paid_early | Item pago adiantado, o valor do item não compôe mais o valor da fatura |
reversed | Item cancelado após fechamento da fatura, o valor do item gerará um estorno |
7. Geração de boletos:
A geração do boleto ordinário acontecerá automaticamente no dia de fechamento da fatura e poderá ser resgatado através do get de pagamento da fatura. O query parameter "shorten_url" é uma flag para solicitar a URL do boleto encurtada.
O boleto pode ser pago em até 30 dias após o vencimento da fatura.
O encurtamento de URL é limitado a 60 requisições por minuto.
Request
Response
Parameter shorten_url=False
Response Body
{
"invoice_payment_key": "63a7c7a2-9e13-48cf-aea2-3b494125d14b",
"invoice_payment_type": "bankslip",
"charge_type": "ordinary",
"data": {
"bank_slip_key": "dc4a27db-2fe1-474d-aa02-88d6fffb8d0d",
"digitable_line": 32990001039000000000104620768103992260000004183,
"qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/881979cb-1c15-4dea-a05e-316caae22f5e5204000053039865802BR5925LOTEAMENTO RESIDENCIAL PO6014PORTO NACIONAL61087750000062070503***630414B8",
"bank_slip_url": "\<URL BOLETO EM PDF\>"
},
"expiration": "2023-07-10",
"status": "issued",
"total_amount": 0,
"paid_amount": 0,
"chargeback_amount": 50,
}
Parameter shorten_url=True
Response Body
{
"invoice_payment_key": "63a7c7a2-9e13-48cf-aea2-3b494125d14b",
"invoice_payment_type": "bankslip",
"charge_type": "ordinary",
"data": {
"bank_slip_key": "dc4a27db-2fe1-474d-aa02-88d6fffb8d0d",
"digitable_line": 32990001039000000000104620768103992260000004183,
"qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/881979cb-1c15-4dea-a05e-316caae22f5e5204000053039865802BR5925LOTEAMENTO RESIDENCIAL PO6014PORTO NACIONAL61087750000062070503***630414B8",
"bank_slip_url": "\<URL BOLETO EM PDF\>",
"short_bank_slip_url": "\<URL BOLETO EM PDF ENCURTADA\>"
},
"expiration": "2023-07-10",
"status": "issued",
"total_amount": 0,
"paid_amount": 0
}
7.1 Geração de boleto extraordinário de adiantamento:
Request
Request Body
{
"invoice_payment_type": "bankslip",
"charge_type": "early",
"expiration": "2023-08-15",
"invoice_items": [
"key_1",
"key_2"
]
}
Condição: "expiration" deve ser dois dias úteis menor que a data de fechamento da fatura para garantir que o pagamento não irá interferir em tal rotina.
Response
Response Body
{
"invoice_payment_key": "63a7c7a2-9e13-48cf-aea2-3b494125d14b",
"invoice_payment_type": "bankslip",
"charge_type": "early",
"data": {
"digitable_line": 32990001039000000000104620768103992260000004183,
"qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/881979cb-1c15-4dea-a05e-316caae22f5e5204000053039865802BR5925LOTEAMENTO RESIDENCIAL PO6014PORTO NACIONAL61087750000062070503***630414B8",
},
"expiration": "2023-08-15",
"status": "issued",
"total_amount": 200,
"paid_amount": 0
}
7.2 Simulação de boleto extraordinário de atraso:
A simulação só pode ser solicitada após o termino do prazo de pagamento do boleto ordinário.
Request
Request Body
{
"invoice_payment_type": "bankslip",
"charge_type": "delay",
"expiration": "2023-08-15"
}
Request com desconto
Request Body
{
"invoice_payment_type": "bankslip",
"charge_type": "delay",
"expiration": "2023-08-15",
"discount_amount": 50
}
Response
Response Body
{
"invoice_payment_type": "bankslip",
"charge_type": "delay",
"total_amount": 150,
"discount_amount": 50
}
7.3 Geração de boleto extraordinário de atraso:
O boleto de atraso só pode ser gerado após o termino do prazo de pagamento do boleto ordinário.
Request
Request Body
{
"invoice_payment_type": "bankslip",
"charge_type": "delay",
"expiration": "2023-08-15"
}
Request com desconto
Request Body
{
"invoice_payment_type": "bankslip",
"charge_type": "delay",
"expiration": "2023-08-15",
"discount_amount": 50
}
Response
Response Body
{
"invoice_payment_key": "63a7c7a2-9e13-48cf-aea2-3b494125d14b",
"invoice_payment_type": "bankslip",
"charge_type": "delay",
"data": {
"digitable_line": 32990001039000000000104620768103992260000004183,
"qr_code_url": "00020126970014br.gov.bcb.pix2575qrcode-h.sandbox.qitech.app/bacen/cobv/881979cb-1c15-4dea-a05e-316caae22f5e5204000053039865802BR5925LOTEAMENTO RESIDENCIAL PO6014PORTO NACIONAL61087750000062070503***630414B8",
},
"expiration": "2023-07-10",
"status": "issued",
"total_amount": 0,
"paid_amount": 0,
"discount_amount": 50
}