# Notifications

### Receipt

When a Receipt has been processed for a Card, a request is sent to the webhook implemented by a ReceiptHero partner. Receipt Identifier (*receipt\_id*) can then be used to fetch the Receipt in various data formats, as specified [here](https://docs.receipthero.io/partner-app-api/get-receipt).

<pre class="language-http"><code class="lang-http"><strong>POST: &#x3C;PARTNER_URL_HERE>
</strong>Authorization: &#x3C;PARTNER_API_KEY_HERE>
Host: &#x3C;PARTNER_HOST_HERE>

{
  "notification_type":"receipt_notification",
  "partner_card_id":"58907e9a-af14-4127-bc72-7a2f867b6252",
  "receipthero_card_id":"2f253eeb-1fd8-4725-af8f-f5cd2223fac3",
  "data": {
    "receipt_id": "bdb8fe66-eced-416c-ace8-c81524f68ed4",
    "merchant_name": "Coffee Shop Developer Fuel Inc",
    "timestamp":"2021-08-09T10:00:48Z",
    "amount":"1230",
    "merchant_id":"1245357457",
    "reference_number":"y4MvVQva2XW1B8Qr",
    "authorization_code":"A145G6",
    "transaction_type":"auth"
  }
}
</code></pre>

<table><thead><tr><th>Field</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>notification_type</td><td>Notification type</td><td>true</td></tr><tr><td>partner_card_id</td><td>External card indentifier provided by the partner</td><td>true</td></tr><tr><td>receipthero_card_id</td><td>ReceiptHero card identifier</td><td>true</td></tr><tr><td>receipt_id</td><td>ReceiptHero Receipt identifier</td><td>true</td></tr><tr><td>merchant_name</td><td>Name of the merchant</td><td>true</td></tr><tr><td>timestamp</td><td>Timestamp of the Card payment associated with the Receipt</td><td>true</td></tr><tr><td>amount</td><td>Amount of the Card payment associated with the Receipt</td><td>true</td></tr><tr><td>merchant_id</td><td>Merchant identifier</td><td>true</td></tr><tr><td>reference_number</td><td>Reference number of the Card payment associated with the Receipt</td><td>false</td></tr><tr><td>authorization_code</td><td>Authorization code of the Card payment associated with the Receipt</td><td>false</td></tr><tr><td>transaction_type</td><td>Type of Transaction (auth|clearing)</td><td>true</td></tr></tbody></table>

### Card Added

This event is published once a new Card has been successfully processed by ReceiptHero.

```http
POST: <PARTNER_URL_HERE>
Authorization: <PARTNER_API_KEY_HERE>
Host: <PARTNER_HOST_HERE>

{
  "notification_type": "card_added",
  "partner_card_id": "58907e9a-af14-4127-bc72-7a2f867b6252",
  "receipthero_card_id": "2f253eeb-1fd8-4725-af8f-f5cd2223fac3",
  "data": {
    "name": "John Doe",
    "masked_pan": "411111******1111",
    "exp_date": "2024-01-31T00:00:00.000Z"
  }
}
```

<table><thead><tr><th>Field</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>notification_type</td><td>Notification type (card_added)</td><td>true</td></tr><tr><td>partner_card_id</td><td>External card indentifier provided by the partner</td><td>true</td></tr><tr><td>receipthero_card_id</td><td>ReceiptHero card identifier</td><td>true</td></tr><tr><td>name</td><td>Card holder name</td><td>false</td></tr><tr><td>masked_pan</td><td>Masked card number</td><td>true</td></tr><tr><td>exp_date</td><td>Card expiration date</td><td>true</td></tr></tbody></table>
