# Webhook payload

**Webhook payload example**

```json
{
  "requestId": "bf9348b7-2c14-46d7-868c-b597852da319",
  "id": 1,
  "createdDate": "2022-03-15T12:13:05.909616",
  "level": "SUCCESS",
  "service": "INVOICE",
  "eventType": "INVOICE_CREATE_INVOICE",
  "data": {
    "parentExternalId": 3,
    "amount": 0.01,
    "currency": "ETH",
    "fiatcurrency": "USD",
    "message": "Invoice example",
    "createdDate": "2022-03-15T12:13:03.157015",
    "type": "INVOICE_CREATE_INVOICE",
    "idempotencyKey": "5b0ca8da-6af4-4a1c-9efd-5cbfc19ace09"
  }
}
```

Webhooks deliver the responses to your service in JSON format. The parameters that webhook payload inсludes are listed in the table below.

| Parameter   | Type   | Mandatory | Description                                                                           |
| ----------- | ------ | --------- | ------------------------------------------------------------------------------------- |
| requestId   | string | Yes       | id of the request that created webhook subscription.                                  |
| id          | number | Yes       | id of the event.                                                                      |
| createdDate | string | Yes       | creation date of the event.                                                           |
| level       | string | Yes       | level of the notification for the event. \[SUCCESS, INFO, WARNING]                    |
| service     | string | Yes       | group of events which the event belongs to.                                           |
| data        | object | Yes       | set of data depending on the event type. See list of field for each event type below. |

**Data object depending on event type**

Calypso supports a number of different event types, and you can filter your notification requests depending on types or group of events you send in the request.

There are two ways to subscribe to notifications. You can send values in one of following fields (or in both) using a POST request to the create webhook endpoint:

* **notificationServiceTypes** - groups of possible event types: \[INVOICE, PAYOUT]. Send values in this field to subscribe to all events of chosen group. See list of events in each group below in the section **Events by group**.
* **notificationEventTypes** - event types for which you can receive notifications. Send values in this field to subscribe to particular events. See list of events below in the section **Events by group**.
