v2.19.1 — Fix: spurious pix.refund.received webhook on issued refunds

Fixed: when issuing a refund (POST /v1/accounts/{accountId}/pix/out/refund), your webhook endpoint could receive a spurious pix.refund.received event — as if you had received a refund from a third party, when in fact you were the one who issued it.

Corrected behavior:

  • Refund issued by you via the API: you receive only the normal refund flow confirmation (pix.refund.completed / pix.refund.failed). No pix.refund.received is generated.
  • Refund issued outside the API (e.g. settlement provider channels): you receive pix.refund.completed / pix.refund.failed with external: true.
  • Refund received from a third party (counterparty returned a PIX you sent): pix.refund.received continues to be sent normally.