Notifications

ReceiptHero delivers webhook notification on new receipt arrival with receipt details.

Types

Partner application can receive 2 types of notifications:

Transaction notification

This notification is delivered immediately when ReceiptHero receives information about the upcoming receipt. The notification includes name of the merchant and estimated receipt delivery time in secs.

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

Get Webhook url

Request

GET /api/v1/webhooks/ HTTP/1.1
RECEIPTHERO-APIKEY: <RECEIPTHERO_API_KEY>
Host: api.dev.receipthero.io

Response

{"webhook_url":"https://www.webhookexample.com/"}

Set Webhook url

Request

POST /api/v1/webhooks/ HTTP/1.1
RECEIPTHERO-APIKEY: <RECEIPTHERO_API_KEY>
Host: api.dev.receipthero.io
{"webhook_url":"https://www.new_url_to_set.com/"}

Response

{"webhook_url":"https://www.new_url_to_set.com/"}

Webhook payload

Webhook will return data that can be used to get receipt

{
"receipthero_id":"124124124",
"notification_type":"receipt_notification",
"receipt_id":"93d22d66-f4bd-11e8-8eb2-f2801f1b9fd1"
}

Parameter

Value

Explanation

receipthero_id

number

User id

notification_type

receipt_notification

Notification type. Receipt notification for now

receipt_id

uuid

Receipts uuid