Skip to main content

Payments

This page contains all the endpoints of the Efí Bill Payment API.


Detailing barcode for payment

This endpoint should be used to detail the information linked to a barcode of any type of charge. Using this endpoint is mandatory before making a payment, as it helps to avoid errors in processing.

Important!

There are two types of charges and they can return different information. Are they:

  1. Tribute type – also known as titles and agreements, this type of charge is issued by service concessionaires, such as: water, electricity, telephone, and gas bills. They are not registered with the "Câmara Interbancária de Pagamento" (CIP) and therefore do not return the same information as a ticket registered with the CIP.
  2. Billet type – has registration with the "Câmara Interbancária de Pagamento" (CIP) and therefore, after being consulted, the endpoint returns more complete information about the payment.

In the item "Responses" below, you can check the return of the queries of each type of charge.


GET /v1/codBarras/:codBarras
Requires authorization for the scope: gn.barcode.read


Request

This endpoint uses query params in its operation, so they must be sent via the URL, as exemplified in the code snippet below.

/v1/codBarras/:codBarras

Responses

The responses below represent Success(200) and consumption failures/errors(400).

{
"tipo": "boleto",
"banco": {
"codigo": 364,
"nome": "EFI S.A."
},
"codBarras": "0000000000000000000000000000000000",
"linhaDigitavel": "000000000000000000000000000000000",
"datas": {
"vencimento": "2021-06-22 14:23:42",
"limitePagamento": "2021-09-22 14:23:42"
},
"beneficiario": {
"nome": "João da Silva",
"fantasia": "Padaria do João",
"documento": "00000000000000"
},
"pagador": {
"nome": "Gorbadock Oldbuck",
"documento": "00000000000"
},
"valores": {
"original": 1000,
"abatimento": 0,
"multa": 200,
"juros": 2,
"desconto": 300,
"final": 902
},
"informacoesPagamento": {
"divergente": {
"deveAceitar": false,
"valorMinimo": 0,
"valorMaximo": 0
},
"parcial": {
"deveAceitar": false,
"limiteDePagamentos": 0
},
"podeSerPago": true
}
}

Request barcode payment

This endpoint should be used to request payment of a barcode for the current or future date.

Important!

For same-day payments, bills are accepted until 10 PM, except for bills with values ​​exceeding R$249,000.00 which are accepted until 2 PM. In the case of consumer bills (water, electricity, cable TV, gas, and telephone) and taxes, processing occurs until 6 PM. However, it is possible to schedule them for the next business day.


POST /v1/codBarras/:codBarras
Requires authorization for the scope: gn.barcode.pay.write


Request

This endpoint uses query parameters in its operation, therefore they must be sent via the URL, as exemplified in the code snippet below.

/v1/codBarras/:codBarras

{
"valor": 500,
"dataPagamento": "2022-03-10",
"descricao": "Pagamento de boleto, teste API Pagamento de Contas"
}

Responses

The responses below represent Success(201) and consumption failures/errors(400).

{
"idPagamento": "31234652",
"valorPago": 500,
"status": "LIQUIDADO",
"data": {
"solicitacao": "2021-06-22 14:23:42",
"pagamento": "2021-06-25 13:03:20"
}
}

Get payment request

Check the status of the payment request previously made using the idPagamento.

GET /v1/:idPagamento
Requires authorization for the scope: gn.barcode.pay.read


Request

This endpoint uses query parameters in its operation, therefore they must be sent via the URL, as exemplified in the code snippet below.

/v1/:idPagamento

Responses

The responses below represent Success(200) and consumption failures/errors(400).

{
"idPagamento": "304578214",
"valorPago": 1000,
"status": "LIQUIDADO",
"motivoRecusa": null,
"data": {
"solicitacao": "2021-09-22 14:23:42",
"pagamento": "2021-09-22 10:23:42"
}
}

Get summary of payment requests

This endpoint should be used to retrieve a summary of payment requests made within a specified period.

GET /v1/resumo
Requires authorization for the scope: gn.barcode.pay.read


Request

This endpoint uses query parameters in its operation, therefore they must be sent via the URL, as exemplified in the code snippet below.

/v1/resumo

Responses

The responses below represent Success(200) and consumption failures/errors(400).

{
"datas": {
"inicial": "2022-04-01",
"final": "2022-10-25"
},
"solicitacoes": {
"total": 0,
"processando": 0,
"sucesso": 0,
"falha": 0,
"cancelada": 0
},
"solicitacoesFalhas": [
0
]
}