Author Image

.steelfenix

Jan 10, 2025

Integração Pix: Pagador e Devedor no Webhook

PIXwebhookintegraçãopagadordevedorconta

Good Night,

I'm currently helping a company to integrate Pix. Do you have an example of the webhook response when a "pagador" diferent from the informed on the PUT /v2/cob/:txid payed the QR code?
imagem enviada na mensagem pelo usuario .steelfenix

Respostas (5):
Avatar discord do usuario rubenskuhl

rubenskuhl

10/01/2025

If you turn on the "pagador" information, the webhook will look like this:
{
"pix": [
{
"endToEndId": "E1803615022211340s08793XPJ",
"txid": "fc9a43k6ff384ryP5f41719",
"chave": "2c3c7441-b91e-4982-3c25-6105581e18ae",
"valor": "0.01",
"horario": "2020-12-21T13:40:34.000Z",
"infoPagador": "pagando o pix",
"gnExtras": {
"pagador": {
"nome": "GORBADOCK OLDBUCK",
"cpf": ".123.456-",
"codigoBanco":"00416968"
}
}
}
]
}

Note that you would still have to compare it to "devedor" to assess whether it's the same person or not. But if it's an issue pagador and devedor being different, you could set the account to deny such payments.

Avatar discord do usuario .steelfenix

.steelfenix

10/01/2025

How do I turn on the pagador section? Is on the account setting or is it a parameter on the request?

Avatar discord do usuario jessica_efi

jessica_efi

10/01/2025

Good afternoon @.steelfenix !
To activate the payer information, simply consume the account configuration endpoint, passing the attribute "pagador": true

Avatar discord do usuario .steelfenix

.steelfenix

10/01/2025

Thanks @jessica_efi. Just to be sure according to this information. By activating "documentoPagadorIgualDevedor" setting I can only accept the payment if the payer matches the debtor, right?

What I'm looking for is that the "payer" is the same as the "devedor" to pay the QR code.
imagem enviada na mensagem pelo usuario .steelfenix

Avatar discord do usuario jessica_efi

jessica_efi

10/01/2025

Exactly. This attribute provides for the blocking of receipts from Pix charges, whose debtor's document, registered at the time of creating the charge, does not match the payer's document.