Webhook sent by the system when a pix payment is refunded.
Flow: cashout
Event: refund
Sometimes a PIX transfer fails. This usually happens due to a reason related to the destination account. In any case, when a PIX transfer fails, the system delivers a POST request in the format below.
Payload Example
{
"event": "refund",
"transaction": {
"id": "123-456-789",
"merchant_id": "123-456-789",
"user_id": "123-456-789",
"processor_id": "123-456-789",
"merchant_transaction_id": "0000001",
"transaction_type": "pix",
"first_name": "Foo",
"last_name": "Bar",
"email": "[email protected]",
"document_number": "12345678435",
"status": "failed",
"flow_type": "cashout",
"e2e_id": null,
"created_at": "2022-02-02T21:34:07+0000",
"updated_at": "2022-02-02T21:36:03+0000",
"error": {
"type": "ERROR_BANK_CASH_OUT",
"code": 4,
"message": "The transfer was rejected by the receiving bank",
"meta": []
},
"events": [
{
"id": "321-654-987",
"success": true,
"status": "pending_settlement",
"event_type": "refund",
"amount": "1.00",
"ip_address": null,
"processor_code": null,
"processor_message": null,
"processor_transaction_id": null,
"batch_id": null,
"qrcode": null,
"qrcode_image": "",
"pix_key_type": null,
"pix_key_value": null,
"pix_message": null,
"created_at": "2022-02-02T21:36:03+0000",
"updated_at": "2022-02-02T21:36:03+0000"
},
{
"id": "123-456-789",
"success": false,
"status": "declined",
"event_type": "payment",
"amount": "1.00",
"ip_address": null,
"processor_code": "1",
"processor_message": "pending",
"processor_transaction_id": "123-456-789",
"batch_id": null,
"qrcode": null,
"qrcode_image": "",
"pix_key_type": "email",
"pix_key_value": "[email protected]",
"pix_message": "This is NOT a test",
"created_at": "2022-02-02T21:34:07+0000",
"updated_at": "2022-02-02T21:34:10+0000"
}
],
"statement": []
}
}