Pix transfer refunded
Webhook sent by the system when a pix payment is refunded.
Sometimes a PIX transfer will fail. Usually this happens for some reason related to the destination account. Anyway, when a Pix transfer fails our system delivers a POST webhook in the following format:
Webhook example:
Pix transfer refunded webhook example payload
{
"event": "refund",
"transaction": {
"created_at": "2022-02-02T21:34:07+0000",
"document_number": "****435****",
"e2e_id": null,
"email": "foo.bar@mail.net",
"error": {
"code": 4,
"message": "The transfer was rejected by the receiving bank",
"meta": [],
"type": "ERROR_BANK_CASH_OUT"
},
"events": [
{
"amount": "1.00",
"created_at": "2022-02-02T21:36:03+0000",
"event_type": "refund",
"id": "321-654-987",
"pix_key_type": null,
"pix_key_value": null,
"pix_message": null,
"qrcode": null,
"qrcode_image": null,
"success": true,
"updated_at": "2022-02-02T21:36:03+0000"
},
{
"amount": "1.00",
"created_at": "2022-02-02T21:34:07+0000",
"event_type": "payment",
"id": "123-456-789",
"pix_key_type": "email",
"pix_key_value": "email@server.com",
"pix_message": "This is NOT a test",
"processor_code": "1",
"processor_message": "pending",
"processor_transaction_id": "123-456-789",
"qrcode": null,
"qrcode_image": null,
"success": false,
"updated_at": "2022-02-02T21:34:10+0000"
}
],
"first_name": "Foo",
"flow_type": "cashout",
"id": "123-456-789",
"last_name": "Bar",
"merchant_id": "123-456-789",
"merchant_transaction_id": "0000001",
"processor_id": "123-456-789",
"statement": null,
"status": "failed",
"transaction_type": "pix",
"updated_at": "2022-02-02T21:36:03+0000",
"user_id": "123-456-789"
}
}
The webhook URL is defined by Processor and, for now, this configuration has to be requested to our team.