Skip to main content
Webhooks are a great way to get real-time notifications on events that happen in your CodeQR project. Webhooks on CodeQR follow the following format:
webhook-payload.json
There are four types of webhook events you can listen to:
Plan requirements for subscribing. Receiving webhook deliveries is not plan-gated, but the events you can subscribe to are:
  • CRUD events (link.*, qrcode.*, page.* created/updated/deleted), lead.created, and sale.created require the Pro plan or above.
  • High-volume events — link.clicked, qrcode.scanned, and page.visited — require the Business plan or above.
  • Attaching a specific link, QR Code, or Page to a webhook also requires the Business plan or above.

Project-level events

These events are triggered in the context of your entire project: This event is triggered when a new link is created in your CodeQR project. The event payload contains the created link’s details. Here’s an example payload:
link.created
This event is triggered when a link is updated in your CodeQR project. The event payload contains the updated link’s details. Here’s an example payload:
link.updated
This event is triggered when a link is deleted in your CodeQR project. The event payload contains the deleted link’s details. Here’s an example payload:
link.deleted

qrcode.created

This event is triggered when a new QR code is created in your CodeQR project. The event payload contains the created QR code’s details (under data.qrcode).
qrcode.created

qrcode.updated

This event is triggered when a QR code is updated in your CodeQR project. The event payload contains the updated QR code’s details (under data.qrcode).

qrcode.deleted

This event is triggered when a QR code is deleted in your CodeQR project. The event payload contains the deleted QR code’s details (under data.qrcode).

page.created

This event is triggered when a new page is created in your CodeQR project. The event payload contains the created page’s details (under data.page).
page.created

page.updated

This event is triggered when a page is updated in your CodeQR project. The event payload contains the updated page’s details (under data.page).

page.deleted

This event is triggered when a page is deleted in your CodeQR project. The event payload contains the deleted page’s details (under data.page).

lead.created

This event is triggered when a new lead is created via CodeQR Conversions. The event payload contains the following:
  • eventName: The name of the event that was tracked.
  • customer: Details about the customer that signed up.
  • interaction: The click/scan/view event that led to the lead (same shape as data.interaction for link.clicked, qrcode.scanned, page.visited).
  • link / qrcode / page: Details about the referral resource the lead is associated with, when applicable.
Here’s an example payload:
lead.created

sale.created

This event is triggered when a new sale is tracked via CodeQR Conversions. The event payload contains the following:
  • eventName: Optional; the name of the event that was tracked.
  • customer: Details about the customer that made the purchase.
  • interaction: Optional; the click/scan/view event that led to the sale (when available; e.g. not sent from Stripe checkout).
  • link / qrcode / page: Details about the referral resource the sale is associated with, when applicable.
  • sale: Amount, currency, payment processor, invoice ID.
Here’s an example payload:
sale.created

Payload field: interaction

“Interaction” is not an event type. It is a field inside the data object that we send for click, scan, and view events. We always use the same key data.interaction and the same structure (the click-event shape: timestamp, clickId, url, ip, continent, country, city, device, browser, os, ua, bot, qr, referer, etc.) for:
  • Link-level link.clickeddata.interaction (click event) + data.link
  • QR Code-level qrcode.scanneddata.interaction (scan event, same shape) + data.qrcode
  • Page-level page.visiteddata.interaction (view event, same shape) + optionally data.page
  • Project-level lead.createddata.interaction (the click that led to the lead) + data.customer, data.link / data.qrcode / data.page
We do not send data.click, data.scan, or data.view; we send data.interaction for all of these. We do not send a separate webhook event named “interaction”. Only the event types listed in this document are sent. Due to the high volume nature of these events, these events are scoped to a specific link. This means that you need to specify the link when creating a webhook – though you can select multiple links for the same webhook if you’d like. This event is triggered when a user clicks on a link. The event payload contains data.interaction (the click event) and data.link (full link details). Here’s an example payload:
link.clicked

QR Code-level events

Due to the high volume nature of these events, they are scoped to a specific QR code. You need to specify the QR code(s) when creating a webhook.

qrcode.scanned

This event is triggered when a user scans a QR code. The event payload contains data.interaction (the scan event, same shape as click event) and data.qrcode (full QR code details).
qrcode.scanned

Page-level events

Due to the high volume nature of these events, they are scoped to a specific page. You need to specify the page(s) when creating a webhook.

page.visited

This event is triggered when a user visits a page. The event payload contains data.interaction (the view event, same shape as click event) and optionally data.page (full page details).
page.visited