Webhooks for indirect participants

The four types of Pix settlement operations - payments, receipts, returns and refunds - use webhooks in notifications of completion and validation of operations.

Therefore, indirect participants must have all their webhooks monitored, paying special attention to them, as the correct operation of these services is crucial to the success of the transaction.

We strongly recommend that indirect participants use routes that allow for them to be easily and quickly notified, and can respond in a timely manner to the completion and validation of operations, within the times provided for in the SLA.

Our notification service consists of a main cycle and a reprocessing cycle.

Main Cycle

The main cycle will always make a first delivery attempt, with a maximum wait of 300 milliseconds.

Retry Cycle

The Retry Cycle will be used for notifications that cannot be delivered in the main cycle.

Once the attempts are exhausted, the messages will be finalized and will not be used in the retry cycle again. However, they will be stored, and the indirect participant will not have access to the operation if the notifications are validated and/or without the final status notification of their operation in the case of notifications of completion.

Alternatively, in the case of outgoing transactions (Payments and Refunds), participants may make a query at any time Get Payments to recover payments, or Ger Refund to recover refunds, and upon refunding, update their bases.

For resource inflows (receipt and return), participants will need, in their internal processes, to confirm the operations by checking Ger receipt for receipt, and Get Return for return, and thus updating their records.

In transaction webhooks, we will send the minimum necessary so that participants can clearly identify which transaction the notification refers to.


⚠️

Important:

Upon receipt and return, all data will be sent at the time of Validation.

As recommended by BACEN, all participants, including indirect participants and their end customers, need to treat all events with idempotency, as eventually the same message may be sent more than once and the lack of this type of treatment can have serious consequences, such as such as double payments, double receipt printing and others.

Necessary actions for indirect participants to receive notifications

Indirect participants will need to provide 07 (seven) routes so that BS2 can deliver notifications. They are as follows:

Notification of payment made

Participants will be notified when the payment flow is completed successfully (or not).

For this notification, we will send the following contract:

FieldDescriptionFormatNullable
chaveIdempotenciaField that guarantees idempotence for participants to process the payment event. This allows participants to guarantee that they will not create two records for the same notification in case of a retry.stringNo
pagamentoIdPayment identifier generated by Banco BS2stringNo
EndToEndIdUnique transaction identifierstringNo
valorTransaction amountdoubleNo
statusStatus of the payment transaction, as shown in the table Payment StatusstringNo
solicitadoEmUtcDate and time payment was requested by the payerdate-timeNo
dataContabilAccounting date for transactiondate-timeYes
liquidadoEmUtcSettlement date for transactiondate-timeYes
rejeicaoDisplays code and description the transaction was deniedobjectYes
erroDescricaoDisplays the error descriptionstringYes

In response, we will wait for participants to send us the HTTP 2xx response to complete the notification and end the attempts.

In case of responses other than HTTP 2xx, we will try to resend notifications.

Endpoint para receber Webhook de Pagamento Finalizado

Notification of completed payments

Participants will be notified when the receipt flow is completed successfully (or not).

For this notification, we will send the following contract:

FieldDescriptionFormatNullable
chaveIdempotenciaField that guarantees idempotence for participants to process the receipt event. This allows participants to guarantee that they will not create two records for the same notification in case of a retry.stringYes
transactionIdBilling transaction identifierstringYes
endToEndIdUnique transaction identifierstringYes
valorTransaction amountdoubleNão
statusReceipt status, as shown in the table Receipt statusstringNão
solicitadoEmUtcDate and time receipt was sent by the payerdate-timeYes
dataContabilTransaction posting datedate-timeYes
liquidadoEmUtcSettlement date for transactionstringSim
motivoRejeicaoDisplays code and description the transaction was deniedobjectNão
erroDescricaoDisplays description of the error, if an error occurred during receiptstringSim

In response, we will wait for participants to send us the HTTP 2xx response to complete the notification and end the attempts.

In case of responses other than HTTP 2xx, we will try to resend notifications.

Endpoint para receber Webhook de Recebimento Finalizado

Notification of refund made

Participants will be notified when the refund flow is completed successfully (or not).

For this notification, we will send the following contract:

FieldDescriptionFormatNullable
chaveIdempotenciaField that guarantees idempotence for participants to process the refund event. This allows participants to guarantee that they will not create two records for the same notification in case of a retry.stringNo
idExternoTransaction identifier provided by participants when requesting the refundstringYes
endToEndIdIdentifier of the payment that originated the refundstringSiYesm
returnIdRefund transaction identifierstringYes
valorTransaction amountdoubleNo
statusStatus of refund, as shown in the table Status of refundstringNo
solicitadoEmUtcDate and time the refund was requested by the recipientdate-timeNo
dataContabilTransaction posting datedate-timeYes
liquidadoEmUtcSettlement date for transactiondate-timeNo
motivoRejeicaoDisplays code and description the transaction was deniedobjectYes
erroDescricaoDisplays the error descriptionstringYes

In response, we will wait for participants to send us the HTTP 2xx response to complete the notification and end the attempts.

In case of responses other than HTTP 2xx, we will try to resend notifications.

Endpoint para receber Webhook de Devolução Finalizada

Notification of return finalized

Participants will be notified when the return flow is completed successfully (or not).

For this notification, we will send the following contract:

FieldDescriptionFormatNullable
chaveIdempotenciaField that guarantees idempotence for participants to process the return event. This allows participants to guarantee that they will not create two records for the same notification in case of a retry.stringYes
returnIdReturn transaction identifierstringYes
endToEndIdIdentifier of the payment that originated the returnstringYes
valorTransaction amountdoubleNo
statusStatus of return, as shown in the table Status of returnstringNo
solicitadoEmUtcDate and time the return was requested by the recipientdate-timeYes
dataContabilTransaction posting datedate-timeYes
liquidadoEmUtcSettlement date for transactiondate-timeYes
motivoRejeicaoDisplays code and description the transaction was deniedobjectYes
erroDescricaoDisplays the error descriptionstringYes

In response, we will wait for participants to send us the HTTP 2xx response to complete the notification and end the attempts.

In case of responses other than HTTP 2xx, we will try to resend notifications.

Endpoint para receber Webhook de Restituição do Pagamento Finalizada

Notification of receipt validation

A notification will be sent when a receipt is sent to the indirect participant through the Central Bank's primary message traffic channel. Banco BS2 will send the notification and wait for a timely response to complete the transaction within the agreed SLA.

For this notification, we will send the following contract:

FieldDescriptionFormatNullable
dataDate the Central Bank of Brazil sent the receipt request to Banco BS2date-timeNo
endToEndIdTransaction identifierstringYes
transactionIdUnique receipt identifier generated by BS2stringYes
CampoLivreMessage informed by the payerstringYes
cnpjIniciadorPagamentoCNPJ of the institution that initiated the payment, used in Open BankingstringYes
statusStatus of the payment transaction, as shown in the table Payment StatusstringNo
tipoIniciacaoType of payment initiation in this case, as per table Types of initiationstringNo
finalidadePurpose of transaction, as shown in the table Purpose of transactionstringNo
valorAmount receiveddoubleNo
recebedorRecipient details (bank, branch, account, document, etc.)objectNo
pagadorPayer details (bank, branch, account, document, etc.)objectNo
chaveDictPix key used to pay for the Pix transactionstringYes
prioridadeTransacaoPriority of transaction, as shown in the table Priority of transactionstringNo
tipoPrioridadeTransacaoType of transaction priority, as shown in the table Type of PrioritystringNo
valorSaqueOuTrocoWithdrawal or change when for Pix Saque and Pix TrocodoubleYes
ispbFacilitadorServicoSaqueOuTrocoISPB of the Withdrawal or Change service facilitatorstringYes
modalidadeAgenteType of agent modality, as shown in the table Agent ModalitystringNo

In response, we will wait for participants to send us the HTTP 2xx response to complete the notification and end the attempts.

The response must contain the json with the following fields:

FieldDescriptionFormatNullable
transacaoAutorizadaThis shows whether the indirect participant accepts (true) or rejects (false) the transactionbooleanNo
validacoesList with error code and description objects, in case the participant rejects the returnarray of objectsYes

⚠️

Important:

For participants who wish to reject the return validation. the field TransacaoAutorizada must be equal to false and HTTP 2xx response.

In case of responses other than HTTP 2xx, we will try to resend notifications.

Webhook validação Recebimento - Cliente

Receipt validation notification on secondary channel

A notification will be sent when a receipt is sent to the participant through the Central Bank's secondary message traffic channel. Banco BS2 will send the notification and wait for a timely response to complete the transaction within the agreed SLA.

📝

Note:

In the secondary channel, the total time for transaction settlement is up to 45 minutes, with the SPI having 15 minutes to process it and the recipient (direct and indirect participant) up to 30 minutes.

For this notification, we will send the following contract:

FieldDescriptionFormatNullable
dataDate the Central Bank sent the receipt request to Banco BS2date-timeNo
endToEndIdTransaction identifierstringYes
transactionIdUnique receipt identifier generated by BS2stringYes
campoLivreMessage informed by the payerstringYes
cnpjIniciadorPagamentoCNPJ of the institution that initiated the payment, used in Open BankingstringYes
statusStatus of the payment transaction, as shown in the table Payment StatusstringNo
tipoIniciacaoType of payment initiation in this case, as per table Types of initiationstringNo
finalidadePurpose of transaction, as shown in the table Purpose of transactionstringNo
valorAmount receiveddoubleNo
recebedorPix recipient details (bank, branch, account, document, etc.)objectNo
pagadorPix payer details (bank, branch, account, document, etc.)objectNo
chaveDictPix key used to pay for the Pix transactionstringYes
prioridadeTransacaoPriority of transaction, as shown in the table Priority of transactionstringNo
tipoPrioridadeTransacaoType of transaction priority, as shown in the table Type of PrioritystringNo
valorSaqueOuTrocoWithdrawal or change when for Pix Saque and Pix TrocodoubleYes
ispbFacilitadorServicoSaqueOuTrocoISPB of the Withdrawal or Change service facilitatorstringYes
modalidadeAgenteType of agent modality, as shown in the table Agent Modality stringNo

In response, we will wait for participants to send us the HTTP 2xx response to complete the notification and end the attempts.

The response must contain the json with the following fields:

FieldDescriptionFormatNullable
transacaoAutorizadaThis shows whether the participant accepts (true) or rejects (false) the transactionbooleanNo
validacoesList with error code and description objects, in case the participant rejects the returnarray of objectsYes

⚠️

Important:

For participants who wish to reject the return validation. the field TransacaoAutorizada must be equal to false and HTTP 2xx response.

In case of responses other than HTTP 2xx, we will try to resend notifications.

Webhook validação Recebimento - Cliente

Notification of return validation

A notification will be sent when a return is sent to the participant. Banco BS2 will send the notification and wait for a timely response to complete the transaction within the agreed SLA.

For this notification, we will send the following contract:

FieldDescriptionFormatNullable
returnIdReturn transaction identifierstringYes
endToEndIdIdentifier of the payment that originated the returnstringYes
valorTransaction amountdoubleNo
solicitadoEmUtcDate and time receipt was sent by the payerdate-timeNo
codigoDevolucaoReason for refund code that will be sent in PACS004, as shown in the table Reasons for refundstringNo
tipoDevolucaoType of refund, as shown in the table Type of refundstringNo
prioridadeTransacaoPriority of transaction, as shown in the table Priority of transactionstringNo
motivoMessage to recipientstringYes
ispbPagadorISPB of paying bankstringYes
ispbRecebedorISPB of receiving bankstringYes

In response, we will wait for participants to send us the HTTP 2xx response to complete the notification and end the attempts.

The response must contain the json with the following fields:

FieldDescriptionFormatNullable
transacaoAutorizadaThis shows whether the participant accepts (true) or rejects (false) the transactionbooleanNo
validacoesList with error code and description objects, in case the participant rejects the returnarray of objectsYes

⚠️

Important:

For participants who wish to reject the return validation. the field TransacaoAutorizada must be equal to false and HTTP 2xx response.

In case of responses other than HTTP 2xx, we will try to resend notifications.

Validação Síncrona da(s) Restituição(s) (Pagamento Restituido)