Skip to main content

Immediate Payments

The following endpoints are responsible for Immediate Payments


Request to start using Pix via Open Finance

This endpoint is used to enter payment information that will be initiated in the Open Finance API. The response of this endpoint will be a redirection URL, which must be incorporated into a button in the application or web page. When the user clicks on this button, they will be redirected to the account holding institution, where the payment will be made.

POST /v1/pagamentos/pix
Requires authorization for the scope: gn.opb.payment.pix.send


Request

Example of payment initiation
{
"pagador": {
"idParticipante": "9f4cd202-8f2b-11ec-b909-0242ac120002",
"cpf": "51687574219",
"cnpj": "90293071000112"
},
"favorecido": {
"contaBanco": {
"nome": "Lucas Silva",
"documento": "17558266300",
"codigoBanco": "09089356",
"agencia": "0001",
"conta": "654984",
"tipoConta": "TRAN"
}
},
"pagamento": {
"valor": "9.99",
"infoPagador": "Churrasco",
"idProprio": "6236574863254",
"identificadorTransacao": "E00038166201907261559y6j6"
}
}

Responses

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

{
"identificadorPagamento": "urn:efi:ae71713f-875b-4af3-9d85-0bcb43288847",
"redirectURI": "https://open-finance.banco.com.br/authorize?request=eyJjd"
}

List of Payments for a Specific Period

This endpoint is used to list information about payments that were made within a specific time period.

GET /v1/pagamentos/pix
Requires authorization for the scope: gn.opb.payment.pix.read


Request

To obtain the query result, it is necessary to inform the parameters `inicio` and `fim`, as shown in the code snippet below. These parameters represent the date range within which the queried payments should be included.
/v1/pagamentos/pix?inicio=2022-05-01&fim=2022-12-30

Responses

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

{
"pagamentos": [
{
"identificadorPagamento": "urn:efi:49315a93-d39c-4564-9edb-9a73678dbdb1",
"endToEndId": "E00038166201907261559y6j6",
"valor": "1.99",
"status": "aceito",
"dataCriacao": "2022-04-29T11:55:03.000Z",
"devolucoes": [
{
"identificadorDevolucao": "D09089356202211111429d82ecc2ecde",
"valor": "1.99",
"status": "aceito",
"dataCriacao": "2022-04-29T11:59:03.000Z"
}
],
"idProprio": "6236574863254"
}
],
"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"
}

Perform a payment refund

This endpoint is used to process a payment refund.

POST /v1/pagamentos/pix/:identificadorPagamento/devolver
Requires authorization for the scope: gn.opb.payment.pix.refund


Request

{
"valor": "0.01"
}

Responses

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

Processing refund
{
"identificadorPagamento": "urn:efi:ae71713f-875b-4af3-9d85-0bcb43288847",
"endToEndId": "E090893562024072215009e91a097af2",
"valor": "0.01",
"dataCriacao": "2022-10-28 10:02:25",
"status": "pendente"
}