Skip to main content

Scheduled Payments

The following endpoints are responsible for Scheduled Payments


Request to start using Scheduled 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-agendados/pix
Requires authorization for the scope: gn.opb.payment.pix.send


Request

Example of payment initiation
{
"pagador": {
"idParticipante": "9f4cd202-8f2b-11ec-b909-0242ac120002",
"cpf": "45204392050",
"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",
"dataAgendamento": "2024-08-06",
"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 Scheduled Payments for a Specific Period

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

GET /v1/pagamentos-agendados/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-agendados/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",
"dataOperacao": "2024-06-08",
"dataCriacao": "2022-06-09T11:55:03.000Z",
"idProprio": "6236574863254",
"devolucoes": [
{
"identificadorDevolucao": "D09089356202211111429d82ecc2ecde",
"valor": "1.99",
"status": "aceito",
"dataCriacao": "2022-04-29T11:59:03.000Z"
}
]
}
],
"total": 1,
"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"
}

Cancel a scheduled payment

This endpoint is used to cancel a recurring payment. It must receive as input a valid Payment identifier in the parameter.

PATCH /v1/pagamentos-agendados/pix/:identificadorPagamento/cancelar
Requires authorization for the scope: gn.opb.payment.pix.cancel


Request

The request sent to this endpoint does not need a body, only the OAuth authorization headers, the parameters and the account certificate.

Responses

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

{
"identificadorPagamento": "urn:efi:ae71713f-875b-4af3-9d85-0bcb43288847",
"status": "cancelado",
"dataCancelamento": "2023-08-16 10:02:25"
}

Perform a Scheduled payment refund

This endpoint is used to process a scheduled payment refund. It must receive as input the Payment identifier and the amount to be returned in the body of the request.

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


Request

{
"endToEndId": "E09089356202408281500624f423208f",
"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"
}