Endpoints

Information from all endpoints available in the Open Finance API

On this page you will find all the endpoints available in the Gerencianet Open Finance API and information on how to use them correctly, such as the scopes necessary for the consumption of each route and their return details.

Use the summary below to quickly navigate between API endpoint groups.

Application settings

Configuring application URLs

PUT/open-fincance/config

This endpoint is used to create or modify a configuration in the application related to the Open Finance API.
caution

To register the Webhook url, it is necessary that the communication obeys the mTLS standard, which will be validated at the time of configuration. For more details, visit the link.

Request

Data for configuration.

// Exemplo configurando uma URL
{
"redirectURL": "https://client.com/redirect/here",
"webhookURL": "https://client.com/send/callback/here"
}
AttributeDescriptionMandatoryType
redirectURL Url where the final customer will be directed after the transaction.

The redirectURL will be activated when the customer is directed to the store of origin, that is, to the environment that the integrator prepares to receive the customer after completing the actions in the banking environment.
YesString
webhookURL Url where the notification will be sent.YesString

Getting application URLs settings

GET/open-fincance/config

This endpoint is used to return the application settings related to the Open Finance API, it is not necessary to inform any parameters.

Responses

The answers below represent Success(200) and Failures/Errors of consumption.

{
"redirectURL": "https://client.com/redirect/here",
"webhookURL": "https://client.com/send/callback/here"
}


Participants

Get the participants institutions of Open Finance

GET/open-fincance/participantes/:nome

Endpoint to get one or more active participants of Open Finance.
Requires authorization for the scope: gn.opb.participants.read

Request
AttributeDescriptionMandatoryType
Nome PSP name to be searched.NoString
Note

If the "nome" (name) attribute is not present in the request, all active Open Finance participants willl be returned.

Responses

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

List with one or more Open Finance Participants
{
"participantes": [
{
"identificador": "9f4cd202-8f2b-11ec-b909-0242ac120002",
"nome": "MARCA GERENCIANET",
"descricao": "Descrição da marca",
"portal": "https://openbankingbrasil.org.br/quem-participa/",
"logo": "https://www.gerencianet.com.br/logo.png",
"organizacoes": [
{
"nome": "Gerencianet",
"cnpj": "09089356000118,",
"status": "Ativo"
}
]
}
]
}


Payments

Request to start using Pix via Open Finance

POST/open-finance/pagamentos/pix
This endpoint is used to enter payment information to be initiated and the output is a redirect url, which must be inserted into a button so that the user clicks and is redirected to the account institution holding.

Request

AttributeDescriptionMandatoryType
x-idempotency-key Unique key to avoid duplicate requests in a short time. If several requests with the same information are sent at the same time, one of them will be successfully processed. If another request is sent with the same key, a 409 error will be returned. (This attribute must be sent in the Header)YesString.
minLength:36
maxLength:72
Payment initiation example
{
"pagador": {
"idParticipante": "9f4cd202-8f2b-11ec-b909-0242ac120002",
"cpf": "45204392050", // cpf ou cnpj
"cnpj": "90293071000112"
},
"favorecido": {
"contaBanco": {
"codigoBanco": "364",
"agencia": "0001",
"documento": "11122233344",
"nome": "Luiz Silva",
"conta": "654984",
"tipoConta": "CACC"
}
},
"valor": "9.90",
"codigoCidadeIBGE": "3540000",
"infoPagador": "Compra dia xx"
}

Data that can be used in the payment initiation request:

AttributeDescriptionMandatoryType
Pagador The fields in the "pagador" identifier organizes informations regarding the data of the final customer to whom the charge will be generated.

pagador:
idParticipante*// Participant identifier in the Central Bank directory. (String)

cpf*// Final customer CPF (document), natural person. (String)

cnpj*// Final customer CNPJ (document), juridical person. (String)
YesObject.
Favorecido The fields in the "favorecido" identifier organizes informations regarding the data of the final customer to whom the charge will be generated.

favorecido:
contaBanco* : (bank account)

codigoBanco*// Bank code. (String)

agencia*// agency (String)

documento*// Account owner document. (String)

nome*// Account owner name (String)

conta*// Account number with the last digit. (String)

Tipoconta*:
CACC: Conta Corrente, used to post debits and credits in general. SLRY: Salary account, used for salary payments. SVGS: Conta Poupança, used for savings. TRAN: Conta de Transações, used as basic account type. (Values) //[ CACC, SLRY, SVGS, TRAN ]
YesObject.
Valor Payment value.YesString.
codigoCidadeIBGE City code (or zipcode) according to IBGE.YesString.
infoPagador Informations to the final payer. 200(Success)NoString.
Responses

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

{
"identificadorPagamento": "ae71713f-875b-4af3-9d85-0bcb43288847",
"redirectURI": "https://open-banking.banco.com.br/authorize?request=eyJjd&redirect_uri=https://pub.opb.testegerencianet.com.br/callback&scope=openid%20pagamentos%20consent:urn:gerencianet:fdf36ac8-f213-4057-bf2e-2ce7bd828abf&response_type=code%20id_token"
}
Obs:The redirect link contained in the redirectURI parameter has an expiration time that may be different for each account holder chosen for the payment. The shortest expiration time is 30 seconds.


List of payments for a period of time

GET/open=finance/pagamentos/pix

This endpoint is used to list information about payments that have been made over a period of time.

This endpoint has mandatory start and end filters that represent the range of dates in which the queried charges must be included.

Requisição
Data that can be used in the information listing request:
AttributeDescriptionMandatoryType
inicio Inicial date of the payment.

Example: 2022-04-29
YesString
fim Final date of the payment.

Example: 2022-04-29
YesString
quantidade Quantity of returns for page.

Example: 5
NoString
pagina number of the page you want to consult according to the quantity.

Example: 2
NoString
status payment status.

Example: 2
NoString
identificador Payment identifier (If this field is informed, the others are disregarded in the search).NoString
Responses

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

{
"pagamentos": [
{
"identificadorPagamento": "urn:gerencianet:49315a93-d39c-4564-9edb-9a73678dbdb1",
"valor": "1.99",
"status": "pendente",
"dataCriacao": "2022-04-29T11:55:03.000Z"
}
],
"total": 3,
"porPagina": 1,
"ultimo": "/pagamentos/pix?inicio=2022-04-29&fim=2022-04-29&quantidade=1&pagina=3",
"proximo": "/pagamentos/pix?inicio=2022-04-29&fim=2022-04-29&quantidade=1&pagina=2",
"anterior": null,
"atual": "/pagamentos/pix?inicio=2022-04-29&fim=2022-04-29&quantidade=1&pagina=1"
}


Receiving callbacks

This service is protected by an mTLS authentication layer.

Request

A POST request is sent by Gerencianet to the URL you registered as a webhook for a given key. When there is a change in the status of an Open Finance transaction, involving the associated key, a JSON object (like the examples below) will be sent to your server. Each request sent has a timeout of 60 seconds, that is, a callback request is interrupted when it reaches 60 seconds without a response.

The answers below represent Success(200) and Failures/Errors of consumption.

// Exemplo - 200 (Notificação enviada com sucesso)
{
"identificadorPagamento": "urn:instituicaoDetentoraDeConta:fd2be7c4-604c-4493-9236-78fe66f40597",
"valor": "9.90",
"status": "aceito",
"dataCriacao": "2024-09-20T18:37:23.000Z",
"endToEndId": "E090993562022060954525a47762681g"
}

The following table details the fields present in the JSON object that will be sent in the notification.

AttributeDescriptionMandatoryType
identificadorPagamento Identifier of the payment initiated in the Open Finance API.

Example: ae71713f-875b-4af3-9d85-0bcb43288847
YesString
status Status of payment initiated.

Example: pendente, agendado, rejeitado e aceito.
YesString
ValorTransaction amount received.

Example: 9,90
YesString \d10.\d2
dataCriacao Transaction creation date.YesString (datetime)
endToEndIdEndToEndIdentification que transita na PACS002, PACS004 e PACS008NoString (32 characters)^[a-zA-Z0-9]32$

Response

Callback requests wait for a response with HTTP status 2XX. If the client's server returns a different status, Gerencianet will make up to 10 notification retries. The first retry will be made 5 minutes after the callback fails to send. If the error persists, subsequent attempts will be sent at increasing time intervals, as shown in the table below.

important

In cases where the client's server returns HTTP status 429 (too many requests), Gerencianet's servers will try to send the notification up to 10 times also according to the table below.

Trial numberTime (in minutes)
15
210
320
440
580
6160
7320
8640
91280
102560