Skip to content

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 NameTypeDescription
receiptIdStringA GUID representing an identifier for the receipt. This ID can be used for further interactions with the receipt.
receiptNrStringIdentifier of the receipt issued by the POS that created the receipt.
storeIdStringA GUID representing the store in the anybill system where the receipt was issued.
externalStoreIdStringThe external store ID of the store where the receipt was issued.
externalIdStringIdentifies the user in your system.
vendorNameStringThe name of the vendor who issued the receipt.
amountDecimalThe total amount of the receipt, including VAT.
dateDateTimeOffsetThe date and time when the receipt was issued.
vendorAddressObjectThe address object corresponding to the store that issued the receipt. (defined below)
linesArray[Object]An array of line objects (defined below).

VendorAddress

Property NameTypeDescription
streetStringThe street name and number of the vendor's location.
postalCodeStringThe postal code of the vendor's location.
cityStringThe city where the vendor's store is located.
countryCodeStringThe country code (ISO 3166-1 alpha-3 format) corresponding to the vendor's location.

Lines

Property NameTypeDescription
amountDecimalThe total amount including VAT for the product group purchased.
nameStringThe product's name as it appears on the receipt, maintaining the original formatting.
numberStringThe SKU (Stock Keeping Unit) number identifying the product.
qtyDecimalThe quantity of the product purchased.
quantityMeasureQuantityMeasureA nullable enum indicating the unit of measure (e.g., liters, kg).
pricePerUnitDecimalThe 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

json
{
  "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
    }
  ]
}