Webhooks

With Webhooks you can send event based information to a customized URL. When an event e.g. QR_CODE_SCANNED occurs, your given URL will be called (webhooked).

Webhook QR

Events

Event Triggered
QR_CODE_CREATED when a QR Code has been generated
QR_CODE_SCANNED when a QR Code has been scanned
VOUCHER_CREATED when a Voucher has been created
VOUCHER_UPDATED when a Voucher has been updated
VOUCHER_REDEEMED when a Voucher has been redeemed
VOUCHER_EXPIRED when a Voucher has been expired
LEAD_CREATED when a Lead has been created

Parameter

Your Webhook URL is called as a POST request sending parameters depending on the webhook to your server:

Default Parameters
event The name of the event occurred
e.g. QR_CODE_SCANNED
timestamp The time when the event occurred
user The user who created the voucher
code The short URL of the QR Code (Voucher).
secrettoken The secret API key from the user API. With this key you can validate a webhook request, that it comes from your account.

QR Code scanned
redirects The number of how many times a QR Code has been scanned.
visitors The number of unique Visitors that scanned the QR Code
device The device that scanned the QR Code
os The operating system that scanned the QR Code
country The country that QR Code has been scanned in
lng/lat An optional lng/lat pair, when user submits his GPS coordinates

Voucher Updated
title The title of the voucher
description The description of the voucher
type
The type of the voucher
UNIQUEIP Voucher can be redeemed once per IP
UNIQUEID Voucher can be redeemed only once

description

The description of the voucher
productname An optional product name on the voucher
website An optional website the coupon can link to
couponnumber An optional coupon number shown on the voucher
validfrom An optional date when the voucher starts to be valid
validto An optional date when the voucher expires

Voucher Redeemed
status The status of the redemption:
SUCCESS Voucher has been redeemed successfully
ALREADY_REDEEMED Voucher has been redeemed already
VOUCHER_EXPIRED Voucher has been expired
QUOTA_EXCEEDED The quota of the voucher has been exceeded

vouchertype The type of the voucher:
UNIQUEIP Voucher can be redeemed once per IP
UNIQUEID Voucher can be redeemed only once

uniqueid If the QR Code is a one-time redeemable coupon ,
the unique id of the voucher is returned.
This is one of the unique ids when creating
bulk QR Codes for a unique redeemable Voucher
See also:
Coupon API

Lead Created
email The email address of the new lead
name The name of the new lead

Debugging

If you want to debug what is sent to your server, when a Webhook occurs you might want to create the following sample script under your customized WebHook URL for testing.

<?php

    // Test WebHook and show post params

    error_log("Fired WebHook");

    foreach ($_POST as $param_name => $param_val) {
        error_log("$param_name: $param_val");
    }

Demo Account

You can evaluate Webhooks under our White Label QR Code Manager evaluation instance:

Test Webhooks
Top