Basic data for every webhooks.
Every webhooks will contain callback token, server client should refuse connection if the token is invalid. Callback token located in request header. You can change the callback token via Monit WebApp.
{
"CALLBACK-TOKEN": "secretcallbacktoken",
"USER-AGENT": "Monit"
}
This is the basic request data for every webhooks.
{
"event_id": "0bae6dfc-8200-009e-9c16-c149ce5b019b",
"timestamp": "2022-12-13 17:03:39",
"event_type": "TRANSACTION",
"event_detail": "NEW_TRANSACTION"
"data": {}
}
{
"event_id": "0bae6dfc-8200-009e-9c16-c149ce5b019b",
"timestamp": "2022-12-13 17:03:39",
"event_type": "PAYMENT",
"event_detail": "PAYMENT_PROCESSED"
"data": {}
}
{
"event_id": "0bae6dfc-8200-009e-9c16-c149ce5b019b",
"timestamp": "2022-12-13 17:03:39",
"event_type": "ACCOUNT",
"event_detail": "ACCOUNT_ACTIVE"
"data": {}
}
Field | Type | Description |
---|---|---|
event_id | String UUID | Event ID, expect unique for every webhook. |
timestamp | Datetime | Server time when the webhook is sent, format "yyyy-mm-dd HH:MM:SS" |
event_type | String | Event type, currently we have TRANSACTION, PAYMENT, CARD and ACCOUNT. |
event_detail | String | Event type, please check the section below for details. |
data | Object | Details data of the webhooks, please check the next section for every webhooks. |
Event Type and Detail
Event type and event detail is corresponding with each other. Currently we have 5 different event details :
- NEW_TRANSACTION, for event type TRANSACTION.
- UPDATED_TRANSACTION, for event type TRANSACTION.
- PAYMENT_PROCESSED, for event type PAYMENT.
- ACCOUNT_ACTIVE, for event type ACCOUNT.
- CARD_ACTIVE , for event type CARD.
For event type TRANSACTION, we have NEW_TRANSACTION and UPDATED_TRANSACTION. NEW_TRANSACTION is value of event detail when new transaction created for client such as card transaction, transfer between account (when transaction still in pending), creating new card (when transaction still in pending), cancel card (refund transaction).UPDATED_TRANSACTION is event that triggered when a transaction's status updated, for example status update from transaction that created from payment.