Franpos DevelopersDevelopment

Webhooks

Instead of asking the API whether anything changed, let Franpos tell you. When a booking, customer, order, payment, membership, subscription or a product's stock changes, Franpos sends a signed JSON message to an address you choose. Use it to keep your own copy of the data current: when you hear about a change, fetch that one record.

Webhooks are for changes you need to know about. They are the supported way to keep an external copy current. Pulling pages of the whole catalogue on a timer is not.

Set up a subscription

Webhooks are part of the Public API app. A location without it can view and remove its subscriptions, but cannot create one or turn one on; turn the app on in Billing first.

  1. In Franpos, open Settings, Developer, Webhooks and add a subscription. Give it a description, your endpoint's URL, the locations it covers and the events you want, for example booking.*, customer.created or inventory.updated. * means every event listed in this guide, including events added to it later, and nothing else, except the full menu (menu_snapshot.updated), which is sent only to a subscription that names it.
  2. Copy the signing secret. It is shown once, when the subscription is created or its secret is rotated. Subscriptions are managed in Franpos, not on this site.
  3. Make your endpoint answer 2xx quickly, then process the message afterwards.

Franpos refuses to save a subscription that does not have:

  • a description, up to 512 characters;
  • a full http:// or https:// URL on the public internet. An address on a private or internal network, such as localhost, 10.0.0.5 or 192.168.1.20, is refused;
  • at least one location you have access to; and
  • at least one event, each written in lower case as *, a whole group such as booking.*, or a single event such as booking.created. There is no booking.cancelled pattern: BOOKING_CANCELLED is an eventCode, so subscribe to booking.updated and read the code.

What a delivery looks like

{
  "live": "true",
  "notificationItems": [
    { "NotificationRequestItem": {
        "eventCode": "BOOKING_CANCELLED",
        "eventType": "booking.updated",
        "eventDate": "2026-10-03T12:00:00.000Z",
        "pspReference": "6f1c...-7",
        "merchantAccountCode": "25552",
        "success": "true",
        "entityId": 7,
        "additionalData": { "hmacSignature": "base64..." },
        "data": { "bookingId": 7, "bookingType": "boarding", "statusId": 12 }
    } }
  ]
}
  • One item per changed record. pspReference is unique per item: dedupe on it. Delivery is at least once, and messages can arrive out of order.
  • One message holds at most 100 items. A change that touches more records arrives as several messages, each with its own pspReference prefix, signatures and retries.
  • merchantAccountCode is the location the change happened in.
  • data is a snapshot of the record when the event happened. It is null for a deletion, or when the snapshot could not be read. Fetch the record by entityId in that case.
  • entityId is Franpos's own permanent id and is the only key that never changes. Your own keys (sku, email, customerCode and so on) are inside data: use them to look records up, not as identity.
  • A pet or a household member is a customer whose own email and phone are usually blank. A customer's data has parentCustomerId, the owner's customer id, or null when there is no owner. A booking's data has the booked customer's own customerId, customerEmail, customerCellPhone and customerCode, and the owner's ownerCustomerId, ownerEmail, ownerCellPhone and ownerCustomerCode. The owner is the booked customer's parent when there is one, and the booked customer otherwise.
  • Instants such as createdAt are UTC. A booking's startDate and endDate are the store's local clock digits with a Z on the end, not UTC.
  • No card number, token, CVV, gateway response or bank account is ever sent.

Events

Each event has an eventCode and a matching eventType that subscriptions filter on. Several codes can share one eventType: BOOKING_UPDATED, BOOKING_RESCHEDULED and BOOKING_CANCELLED are all booking.updated, so a booking.* or booking.updated subscription receives all three. Read the eventCode to tell them apart. A deleted booking is a BOOKING_UPDATED whose data.isDeleted is true. The tables below are every event Franpos sends. A * subscription receives all of them except the full menu (menu_snapshot.updated, sent only to a subscription that names menu_snapshot.* or menu_snapshot.updated), including the events of entities added to these tables later, and nothing else: a change that is not listed here is not sent to any subscription. Changes made directly in the database by background services, and a line-only edit to an order that does not touch the ticket, are not reported.

Bookings

entityId is the booking id. data includes bookingType (appointment, class, boarding, daycare, mobile_grooming, pickup_dropoff), statusId, startDate, endDate, customerId with customerEmail, customerCellPhone and customerCode, and ownerCustomerId with ownerEmail, ownerCellPhone and ownerCustomerCode (the pet's owner for a pet booking, the customer themselves otherwise).

EventSent when
BOOKING_CREATED
booking.created
A booking is made.
BOOKING_UPDATED
booking.updated
A booking changes in a way that is neither a new time nor a cancel: notes, a status other than Cancelled, staff, price. Also sent for a later edit of a booking that is already cancelled, and for a time change made another way, such as an import. A deleted booking is a BOOKING_UPDATED whose data.isDeleted is true.
BOOKING_RESCHEDULED
booking.updated
A booking's start or end time moves. Sent instead of BOOKING_UPDATED for that change, when the change knows the old time: a move on the calendar or register, a customer rescheduling from their own appointment link, their online account or a reply to a text message, or an edit in the online store. eventType is still booking.updated, so a booking.* or booking.updated subscription receives it.
BOOKING_CANCELLED
booking.updated
A change moves a booking to the Cancelled status. Sent instead of BOOKING_UPDATED for that change, so a later edit of an already cancelled booking arrives as BOOKING_UPDATED. A change made another way, such as an import, is judged by the booking's status at that moment and can repeat BOOKING_CANCELLED.

Customers

entityId is the customer id. data includes email, cellPhone, phone, customerCode, parentCustomerId (the owner, for a pet or household member; null for anyone else) and the profile fields.

EventSent when
CUSTOMER_CREATED
customer.created
A customer is added.
CUSTOMER_UPDATED
customer.updated
A customer's details change.
CUSTOMER_DELETED
customer.deleted
A customer is removed. data is null.

Inventory

entityId is the product id. data includes quantityOnHand, reorderPoint, outOfStock, variants (each with its own quantityOnHand) and lastMovement (oldQuantity, newQuantity, change, reason, note, at).

EventSent when
INVENTORY_UPDATED
inventory.updated
Stock on hand moves, from a sale, return, purchase order receipt, count, import or manual edit. One event per product; a variant's move is reported on its parent.

Items

entityId is the product id. data includes sku, productCode, name, description, categoryId, brandId, price, memberPrice, isService, isMatrix, isKit, trackInventory, sellOnline and createdAt. Cost is never sent.

EventSent when
ITEM_CREATED
item.created
A product or a service is added to the catalog, from the back office, an import, the API or a copy to another location. isService tells them apart. Later changes are reported by INVENTORY_UPDATED and PRICE_UPDATED.

entityId is the menu id. data includes parentMenuId, menuName, menuCode, onlineName, availableOnPOS, availableOnline, availableThirdParty, isRestricted, showOnHomePage, availableFromDate, availableUntilDate, availableFromTime, availableUntilTime (the store's local wall clock; null = no limit), availableDays (null = every day), surcharge, isDeleted, createdAt and modifiedAt. The items on a menu come as Menu items events.

EventSent when
MENU_CREATED
menu.created
A menu is created, copied to a location, or a deleted menu is restored.
MENU_UPDATED
menu.updated
A menu's name, code, parent, hours, days, channels (register, online, third party), surcharge or online name changes. Re-ordering menus sends nothing.
MENU_DELETED
menu.deleted
A menu is deleted. Each live item on it also sends MENU_ITEM_REMOVED.

entityId is the menu item id (one product on one menu). data includes menuId, menuName, productId, sku, productCode, name, thirdPartyPrice, availableThirdParty, isDeleted and menuDeleted. MENU_ITEM_PRICE_CHANGED also carries oldThirdPartyPrice. thirdPartyPrice is null when none is set on the menu. The in-store price and cost are never sent.

EventSent when
MENU_ITEM_ADDED
menu_item.created
An item is put on a menu, or an item taken off it or a deleted menu comes back.
MENU_ITEM_PRICE_CHANGED
menu_item.updated
An item's third-party price on a menu changes. A change to the in-store price sends nothing.
MENU_ITEM_REMOVED
menu_item.deleted
An item is taken off a menu, or the menu it is on is deleted.

86'd items

entityId is the product id. data includes eightySixed, isAvailable, untilUtc (null = until further notice), reason, sku, productCode, name and modifiedAt.

EventSent when
ITEM_86ED
item_availability.updated
An item is 86'd (marked unavailable), now or until a set time, from the back office, a register or the API.
ITEM_AVAILABLE
item_availability.updated
An 86'd item is made available again, by hand or because its timed 86 ran out at untilUtc (sent shortly after, usually within a minute).

86'd modifiers

entityId is the modifier id. data includes eightySixed, isAvailable, untilUtc, reason, modifierSetId, name, modifierCode and modifiedAt.

EventSent when
MODIFIER_86ED
modifier_availability.updated
A modifier is 86'd (marked unavailable), now or until a set time.
MODIFIER_AVAILABLE
modifier_availability.updated
An 86'd modifier is made available again, by hand or because its timed 86 ran out.

86'd modifier-set items

entityId is the modifier-set item id. data includes eightySixed, isAvailable, untilUtc, reason, modifierSetId, productId, sku, name and modifiedAt.

EventSent when
MODIFIER_SET_ITEM_86ED
modifier_set_item_availability.updated
A product offered inside a modifier set is 86'd there, now or until a set time.
MODIFIER_SET_ITEM_AVAILABLE
modifier_set_item_availability.updated
An 86'd modifier-set item is made available again, by hand or because its timed 86 ran out.

Special orders

entityId is the special order id. data includes customerId, customerName, customerEmail, status, statusId, total, dueDate, closedAt, orderId and items (the live lines). Layaways, estimates and invoices are never reported.

EventSent when
SPECIAL_ORDER_CREATED
special_order.created
A special order is entered, from the back office, a device, a recurring order coming due or the API.
SPECIAL_ORDER_UPDATED
special_order.updated
The status moves (ordered, received, customer notified, charged, closed, cancelled), lines or notes change, or a deposit is taken or refunded.
SPECIAL_ORDER_DELETED
special_order.deleted
A special order is deleted.

Prices

entityId is the product id. data includes price, memberPrice, ecommercePrice, salePrice and variants (each with its own price and salePrice). Cost is never sent.

EventSent when
PRICE_UPDATED
price.updated
A product's selling price changes: price, member price, online price or sale price, from an edit, import, price book, online pricing or multi-location save. One event per product; a variant's change is reported on its parent.

Orders

entityId is the order id. data includes orderNumber, customerId, subtotal, tax, tips, discount, total, balanceDue, paymentStatus (none, paid, partial, unpaid), isReturn and items.

EventSent when
ORDER_CREATED
order.created
A new ticket: a register sale, online order or import. A ticket rung up offline is announced once, after it stops changing, so items is the whole ticket.
ORDER_UPDATED
order.updated
A payment is taken, the balance moves, shipping or pickup status changes, or the ticket is revived or cancelled but kept.
ORDER_DELETED
order.deleted
A ticket is removed from the books.

Payments

entityId is the payment id. data includes orderId, amount, paymentMethodId, paymentStatusId, cardBrandId and cardLast4. Never a card number, token or gateway response.

EventSent when
PAYMENT_CREATED
payment.created
A tender is taken.
PAYMENT_UPDATED
payment.updated
A tender is voided or refunded: its paymentStatusId moves.
PAYMENT_DELETED
payment.deleted
A payment leaves the books without a status change, such as the payments of a cancelled order.

Memberships

entityId is the plan id. data includes status, billingInterval, price, nextChargeDate, finishDate, balance, customerId and productId.

EventSent when
MEMBERSHIP_CREATED
membership.created
A membership is sold, signed up, imported or re-created on a store move.
MEMBERSHIP_UPDATED
membership.updated
Renewal, price change, pause, cancel, refund or any other change. A cancel is an update with status cancelled.

Subscriptions

entityId is the plan id. data includes the membership fields plus shippingMethod, isPaused, pausedUntil and scheduledSkipDays.

EventSent when
SUBSCRIPTION_CREATED
subscription.created
A customer signs up for a recurring product.
SUBSCRIPTION_UPDATED
subscription.updated
Renewal, price change, pause or resume, a skipped order, or cancel.

entityId is the location's company id. data includes storeId, hash, menus (the location's whole restaurant menu in DoorDash's menu format: hours, categories, items, modifier sets and options, both prices and what is 86'd) and upsells (per item SKU: items, the other items offered with it, and modifiers, the modifiers offered on it as impulse buys at their impulse price). A menu too large to send carries tooLarge and sizeBytes instead of menus and upsells.

EventSent when
MENU_SNAPSHOT_UPDATED
menu_snapshot.updated
Checked every 15 minutes: sent when anything in the location's menu or its upsells changed since the last one sent to this subscription, and once when the subscription first names it. Only a subscription that names menu_snapshot.* or menu_snapshot.updated receives it; * does not.

Match on your own key

If you would rather match on your key than ours, set an identifier on the subscription: sku, productCode, email, cellPhone, phone or customerCode. Each item then carries a top-level merchantReference with that value, or null when the record has none. For a booking, email, cellPhone and customerCode fall back to the owner's value (ownerEmail, ownerCellPhone, ownerCustomerCode) when the booked customer has none, which is the usual case for a pet. It is a convenience: entityId and pspReference remain the identity.

Verify every delivery

Anyone can post to your endpoint, so check the signature before you trust a message. Two signatures are sent, and either one is enough.

The whole-body header (recommended)

X-Franpos-Signature: t=<unix seconds>,v1=<hex>. The value is hex(HMAC_SHA256(secret, t + "." + rawBody)) over the exact bytes you received. Reject a request whose t is far from now. While a secret is being rotated two v1 values are sent: accept either.

import { createHmac, timingSafeEqual } from "node:crypto";

// rawBody must be the unparsed request body, exactly as received.
export function isFromFranpos(rawBody, header, secret) {
  const fields = header.split(",");
  const t = fields.find((f) => f.startsWith("t="))?.slice(2);
  const signatures = fields.filter((f) => f.startsWith("v1=")).map((f) => f.slice(3));
  if (!t || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
  const expected = createHmac("sha256", secret).update(t + "." + rawBody).digest("hex");
  return signatures.some((s) =>
    s.length === expected.length && timingSafeEqual(Buffer.from(s), Buffer.from(expected)));
}

Per item (Adyen style)

Each item's additionalData.hmacSignature is base64(HMAC_SHA256(secret, signingString)), where the signing string is pspReference:eventCode:merchantAccountCode:eventDate:success:entityId and a \ or : inside a field is escaped with a backslash. It covers those six fields, not data. If you already verify Adyen notifications, the same code works with these fields.

Answering, and retries

Reply with any 2xx within 10 seconds. Anything else, or a timeout, is retried: nine attempts in all, after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours, 24 hours and 48 hours, about 3.9 days. After the last attempt the delivery is dead. A subscription whose last 20 deliveries all died is switched off, and you turn it back on in Franpos once the endpoint is fixed. The Webhooks page in Franpos shows the last error and how many deliveries are being retried.

  • Redirects are not followed. A 3xx answer counts as a failed attempt, and the last error reads HTTP 307: redirects are not followed. Change the URL in the subscription to the final address.
  • Public addresses only. Franpos does not call an address on a private or internal network. A URL such as http://localhost/hook or http://10.0.0.5/hook cannot be saved, and a name that resolves to such an address fails each attempt with a message that starts Not sent:.
  • Every request is a POST with Content-Type: application/json, the X-Franpos-Signature header and User-Agent: Franpos-Webhook/1.0. Check the signature to know a message is ours. The User-Agent only helps you recognise us in your logs.
  • A subscription that is turned off sends nothing. While a subscription is paused, or after it was switched off, no new messages are created for it, and a message that falls due for sending in that time is marked dead (Not sent: the webhook is turned off.) and is not counted as a failure. Turning the subscription on again does not send those messages or the changes made meanwhile: fetch the records you missed by entityId.
  • A lost delivery is offered again. If a message was never picked up for sending, a check that runs every 5 minutes offers it again once it is 15 minutes overdue, so a message can arrive late.

Because delivery is at least once, the same item can arrive twice. Handling an item you have already processed must do nothing.

Good practice

  • Acknowledge first, work later. Put the message on a queue and answer 2xx.
  • Treat data as a hint. When exactness matters, fetch the record by entityId.
  • Do not rely on order. Use eventDate, or fetch the current record.
  • A new eventCode can appear under an existing eventType, as BOOKING_RESCHEDULED did under booking.updated. Handle a code you do not know by its eventType, for example as any other booking update, instead of failing the message. A * subscription also receives the events of entities added later, so acknowledge an eventType you do not know and skip it.
  • Rotate the signing secret in Franpos when someone who knew it leaves. Both secrets are accepted during the overlap.

Need a credential for the API calls you make in response? See Credentials.