> For the complete documentation index, see [llms.txt](https://docs.receipthero.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.receipthero.io/partner-app-api/notifications.md).

# Notifications

## Types

Partner application can receive 3 types of notifications:

#### Transaction notification

This notification is delivered immediately when ReceiptHero receives information about the upcoming receipt. Name of the Merchant is included in the notification payload.

#### Receipt notification

This notification is delivered immediately when the receipt is ready for fetching. The notification includes a receipt id for the receipt to fetch.

![](/files/ooP2s4jev3bbC9cGEs2c)

#### Connection revoke notification

This notification is delivered when a connection revoke is initiated from the ReceiptHero system.

![](/files/HQiSHYl80F0tgUH0lFic)

### Webhook Request <a href="#webhook-payload" id="webhook-payload"></a>

```
POST <WEBHOOK_PATH> HTTP/1.1
Host: <WEBHOOK_HOST>
Authorization: Token <API_KEY>
Content-Type: application/json
```

### Webhook Payload <a href="#webhook-payload" id="webhook-payload"></a>

#### Examples

{% code title="Receipt notification" %}

```json
{
  "notification_type":"receipt_notification",
  "receipthero_id":"7350515d-0f15-4663-8430-cf4d7f4057a1",
  "receipt_id":"93d22d66-f4bd-11e8-8eb2-f2801f1b9fd1",
  "partner_metadata": {
    "key1": "value1",
    "key2": "value2"
  }
}
```

{% endcode %}

{% code title="Transaction notification" %}

```json
{
  "notification_type":"transaction_notification",
  "receipthero_id":"7350515d-0f15-4663-8430-cf4d7f4057a1",
  "receipt_id":"93d22d66-f4bd-11e8-8eb2-f2801f1b9fd1",
  "data": {
    "merchant_name": "ReceiptHero Oy"
  },
  "partner_metadata": {
    "key1": "value1",
    "key2": "value2"
  }
}
```

{% endcode %}

{% code title="Connection revoke" %}

```json
{
  "notification_type":"oauth_authorization_revoke",
  "receipthero_id":"7350515d-0f15-4663-8430-cf4d7f4057a1",
  "partner_metadata": {
    "key1": "value1",
    "key2": "value2"
  }
}
```

{% endcode %}

#### Fields

| Parameter          | Value                                                                              | Explanation                                                                                                                                                                 |
| ------------------ | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| notification\_type | receipt\_notification \| transaction\_notification \| oauth\_authorization\_revoke | Notification type                                                                                                                                                           |
| receipthero\_id    | uuid                                                                               | User uuid                                                                                                                                                                   |
| receipt\_id        | uuid                                                                               | Receipt uuid                                                                                                                                                                |
| data               | object                                                                             | Additional data (Transaction notifications only)                                                                                                                            |
| partner\_metadata  | object                                                                             | Partner defined connection-specific key-value pairs. See also: [Get an authorization code](/partner-app-api/oauth-access.md#get-an-authorization-code) step in OAuth 2 flow |
