The payload sent to your webhook URL would have an event property that identifies what the event is about, a resource property identifying the transaction type and the data attribute which would contain the event data.
Below is a list of Deposit events broadcasted by Oval Finance:
payment_received : This webhook is sent to confirm receipt of payment made by the fintech partner
failed_settled : This webhook is sent when Oval doesn't get expected settlement amount from fintech within a day of generating payment details
settled : This webhook is sent when the savings into the investment pprotocol/portfolio has been done successfully
Sample JSON body for each event:
{
"id": "f7cf285f-297f-432e-9320-864ebb8c3836",
"event": "payment_received",
"resource_type": "deposit",
"data": {
"id": "f7cf285f-297f-432e-9320-864ebb8c3836",
"status": "processing",
"batch_date": [
"2022-07-24"
],
"transaction_amount": 25,
"currency": "USD",
"initiated_at": "2022-08-30T17:41:12.183534Z",
"completed_at": "2022-08-30T16:41:24.500048638Z",
"transaction_type": "deposit"
}
}
{
"id": "94855609-c3cc-4f4e-8373-0c82ada0cd19",
"event": "failed_settled",
"resource_type": "deposit",
"data": {
"id": "94855609-c3cc-4f4e-8373-0c82ada0cd19",
"status": "failed",
"batch_date": [
"2022-07-24"
],
"transaction_amount": 25,
"batch_amount": 25,
"currency": "USD",
"initiated_at": "2022-08-30T17:24:41.031847Z",
"completed_at": "2022-08-30T16:24:58.872290342Z",
"transaction_type": "deposit"
}
}
{
"id": "6eb05d92-73dd-4700-ad29-408b1d88705e",
"event": "settled",
"resource_type": "deposit",
"data": {
"id": "6eb05d92-73dd-4700-ad29-408b1d88705e",
"status": "settled",
"batch_date": [
"2022-07-24"
],
"transaction_amount": 2500,
"currency": "USD",
"initiated_at": "2022-08-30T17:48:54.397604Z",
"completed_at": "2022-08-30T16:49:23.617435137Z",
"transaction_type": "deposit"
}
}