# 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 |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.receipthero.io/partner-app-api/notifications.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
