MDH GROUP · BLOG

Real‑time discounts at the POS via QR scan: Webhooks & API integration with Linkentra

A retail company distributes flyers with a QR code that redeems a discount in-store. The promotion runs only on certain days, vouchers must be valid only once per customer, and the checkout must immediately know whether redemption is authorized.

← All posts

Real‑time discounts at the POS via QR scan: Webhooks & API integration with Linkentra

Scenario: The printed coupon must be activated live

A retail company distributes flyers with a QR code that redeems a discount in-store. The promotion runs only on certain days, vouchers must be valid only once per customer, and the checkout system must immediately know whether the redemption is authorized. The flyers are already printed — the QR code itself must not change, but the behavior behind it may.

Why a dynamic QR code is the better choice here

A dynamic QR code separates the physical printed image from the digital target: the code remains on the flyer while the target (e.g., URL, PDF, coupon token) can be adjusted server‑side at any time. This makes it possible to control in real time whether a scan triggers a valid discount, shows an error page, or redirects to a promotion page. That reduces loss from outdated printed materials and enables tracking of redemptions.

How the real‑time integration with Linkentra works

Linkentra provides the tools to send events to external systems immediately upon scan: webhooks for push notifications and an API for queries and reporting. In combination with your POS, discounts can be released, coupons verified, and redemptions logged — in real time and controllable via the Linkentra interface or your own automations.

Typical flow (end‑to‑end)

  • Customer scans the dynamic QR code at the checkout.
  • Linkentra evaluates the scan and, if necessary, triggers a webhook to the configured POS endpoint URL.
  • The POS system receives the event (scan ID, QR campaign ID, timestamp, optional metadata such as location or device) and checks validity (validity period, single redemption, customer account).
  • POS responds (approved/declined) or performs a server‑side check via the Linkentra API.
  • Depending on the result, the discount is applied at the POS or the redemption is rejected; Linkentra logs the process in the statistics.

Why use webhooks and the API together?

Webhooks provide fast, push‑based notifications to your POS so the checkout can react immediately. The API complements this with on‑demand queries, bulk downloads for reporting, and the ability to automate changes to campaign rules (e.g., swap target URL, set time controls). This combination ensures responsiveness and control.

Concrete implementation: step by step

The following practical guide helps with integration into a typical POS setup:

1. Preparation in Linkentra

  • Create a dynamic QR code for the promotion and assign a campaign ID.
  • Configure the webhook endpoint in the Linkentra backend: the URL of your POS system and the events (e.g., "scan").
  • Optional: Define time rules or fallback targets (e.g., stop after expiration date).

2. Set up the POS endpoint

  • Develop a secure HTTP(S) endpoint that accepts POST requests with JSON payloads.
  • Implement authentication (e.g., HMAC signature or a bearer token) and verify the signature on every request.

3. Example payload (simplified)

A typical webhook event contains at minimum the following information that your POS can use for validation:

{
  "scan_id": "abc123",
  "qr_id": "camp-2026-fruehling",
  "timestamp": "2026-10-27T12:34:56Z",
  "location": "Filiale Berlin Mitte",
  "metadata": {"device":"kasse-05","user_id":"optional"}
}

4. Validation & response

  • Check validity (time window, maximum redemptions, customer status).
  • Ensure requests are processed idempotently (e.g., accept only one redemption per scan_id).
  • If needed, send a status confirmation to Linkentra or write the result to your own logging/reporting system.

5. Monitoring and error handling

  • Implement retries and backoff mechanisms: Linkentra supports webhook retries for transient errors.
  • Monitor error rates and processed events to detect problems early.

Best practices for secure, robust redemptions

  • Protection: Use HMAC signatures, TLS and IP whitelists to protect webhook endpoints.
  • Idempotency: Handle duplicate events so a redemption is not charged multiple times.
  • Fallbacks: Plan offline scenarios: if the POS API is unreachable, Linkentra can show an alternative target or temporarily block the redemption.
  • Transparency: Log scan IDs, timestamps and result codes for audits and reporting.
  • Limitation: Set rules for maximum redemptions per campaign or per customer to prevent abuse.

Practical example: Café with a Happy Hour coupon

A café distributes table signs with a QR code that grants 20% off all drinks during Happy Hour. Implementation:

  • Linkentra generates a dynamic QR code; the destination is set by time control according to the happy‑hour rules.
  • On scan, Linkentra triggers a webhook to the point‑of‑sale system; the POS checks whether the redemption occurs within the time window and whether the coupon has already been used.
  • The POS grants the discount and sends a confirmation to the reporting; Linkentra counts the scan and displays the redemption statistics.

Advantages: No need to reprint table tents, real‑time control of the promotion, precise evaluation, and, if required, a complete self‑hosted solution for operators who want data sovereignty.

Self‑Hosted or Cloud Option?

Linkentra offers both: Cloud‑SaaS for quick setup and a self‑hosted installation for companies that want full control over their infrastructure and data. For sensitive POS integration, the self‑hosted option is recommended because internal security policies, networks and compliance requirements can be met more easily.

Quick Checklist for Implementation

  • Create the QR campaign in Linkentra and configure the webhook.
  • Verify the POS endpoint with authentication and idempotency.
  • Run tests (successful/declined redemptions, timeouts, offline scenarios).
  • Enable monitoring and logging; set up alerts for errors.
  • Follow up: use scan statistics from Linkentra to optimize the campaign.

Conclusion

With dynamic QR codes, webhooks and API integration, redemptions at the POS can be controlled, validated and logged in real time. Linkentra provides the building blocks — from dynamic targets to webhooks and the self‑hosted option — enabling flexible, secure and auditable discount and coupon workflows without constant reprinting. For retailers, hospitality and event organizers this is an efficient solution to control promotions while collecting valuable usage data.

Discover Linkentra

Next step

Try Linkentra Yourself

Dynamic QR codes with control over hosting and data: change content afterward, adjust branding, manage media centrally and analyze scans — either on your own infrastructure (self‑hosted) or immediately in the Linkentra Cloud. Edition‑dependent features for teams, API and white‑label.

Discover Linkentra