# Receipt Notification Webhook
The Receipt Notification Webhook is the default webhook provided by anybill.
It notifies your system whenever a receipt is successfully added to the anybill platform for a specific user.
This webhook can be used in two main ways:
- As a push notification mechanism for end users, letting your application know immediately when a new receipt is available.
- As a data delivery mechanism, providing full receipt information in real time for further processing, integration, or analytics.
The example payload shown below represents the default structure. Depending on your integration, the payload can be extended with additional receipt information.
# Use Cases
Push notifications for end users
Notify your application when a receipt has been issued to a user.
This enables real-time features such as in-app notifications or alerts.
These events are triggered based on user receipt creation.Receipt data processing and analytics
Receive detailed receipt information for backend systems.
Use this data for loyalty programs, ERP/CRM syncing, storage, or downstream analytics.
The data push is triggered by receipt creation but can be extended to support additional workflows.
# Webhook Request Structure
The endpoint will receive the following properties as a JSON-formatted payload.
All property names are camelCased, ASCII-encoded strings.
# Properties
Property Name | Type | Description |
---|---|---|
receiptId | String | A GUID representing an identifier for the receipt. This ID can be used for further interactions with the receipt. |
receiptNr | String | Identifier of the receipt issued by the POS that created the receipt. |
storeId | String | A GUID representing the store in the anybill system where the receipt was issued. |
externalStoreId | String | The external store ID of the store where the receipt was issued. |
externalId | String | Identifies the user in your system. |
vendorName | String | The name of the vendor who issued the receipt. |
amount | Decimal | The total amount of the receipt, including VAT. |
date | DateTimeOffset | The date and time when the receipt was issued. |
vendorAddress | Object | The address object corresponding to the store that issued the receipt. (defined below) |
lines | Array[Object] | An array of line objects (defined below). |
# VendorAddress
Property Name | Type | Description |
---|---|---|
street | String | The street name and number of the vendor's location. |
postalCode | String | The postal code of the vendor's location. |
city | String | The city where the vendor's store is located. |
countryCode | String | The country code (ISO 3166-1 alpha-3 format) corresponding to the vendor's location. |
# Lines
Property Name | Type | Description |
---|---|---|
amount | Decimal | The total amount including VAT for the product group purchased. |
name | String | The product's name as it appears on the receipt, maintaining the original formatting. |
number | String | The SKU (Stock Keeping Unit) number identifying the product. |
qty | Decimal | The quantity of the product purchased. |
quantityMeasure | QuantityMeasure | A nullable enum indicating the unit of measure (e.g., liters, kg). |
pricePerUnit | Decimal | The price per unit of the product. |
WARNING
The string parameter quantity
in the Line object was deprecated and replaced with the decimal parameter qty
.
# QuantityMeasure Enum
- Count
- Kilogram
- Lbs
- Meters
- Inches
- Liter
- CubicMeters
- SquareMeters
- KilowattHour
# Example Payload
{
"receiptId": "123e4567-e89b-12d3-a456-426614174000",
"receiptNr": "32048",
"storeId": "123e4567-e89b-12d3-a456-426614174000",
"externalStoreId": "23123",
"externalId": "user_001",
"date": "2024-07-07T16:18:43+02:00",
"vendorName": "Examplemarket XYZ",
"amount": 95.27,
"vendorAddress": {
"street": "123 Example Street",
"postalCode": "12345",
"city": "Example City",
"countryCode": "DEU"
},
"lines": [
{
"amount": 50.00,
"name": "Organic Milk 1L",
"number": "SKU123456",
"qty": 2.0,
"quantityMeasure": "Count",
"pricePerUnit": 25.00
},
{
"amount": 45.27,
"name": "Whole Wheat Bread",
"number": "SKU654321",
"qty": 3.0,
"quantityMeasure": "Count",
"pricePerUnit": 15.09
}
]
}