Bouncer

Devices

Configure physical and virtual devices for verification

Devices

Devices in Bouncer represent physical or virtual verification points such as kiosks, vending machines, point-of-sale systems, or tablets.

Overview

Devices provide a simplified verification flow:

  1. Device displays a QR code
  2. User scans the code with their phone
  3. Verification happens on the user's device
  4. Result is sent back to the device

Creating a Device

Via Dashboard

  1. Log in to your Bouncer dashboard
  2. Navigate to Devices
  3. Click Add Device
  4. Configure the device settings:
    • Name: A descriptive name (e.g., "Store Front Kiosk #1")
    • Age Target: Default age to verify
    • Redirect URL: Where users go after verification
    • Webhook URL: Endpoint for verification events
    • Force KYC: Always require ID verification
    • Expiration Time: Session timeout in seconds

Device Code

Each device receives a unique code (e.g., ABC123) used for:

  • Direct verification URLs: /d/{deviceCode}
  • Dynamic session URLs via API

Device Verification Flows

Direct URL Flow

For static QR codes printed on devices:

https://your-bouncer-instance.com/d/ABC123

When scanned:

  1. Creates a new session with device settings
  2. Cancels any incomplete sessions for this device
  3. Redirects to verification page

Dynamic URL Flow

For devices that display dynamic QR codes:

# Generate a new session URL
curl -X POST https://your-bouncer-instance.com/api/v2/device/ABC123/session-url \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "qr_size": 400,
    "ttl": 300
  }'

Response:

{
  "url": "https://your-bouncer-instance.com/s/XyZ12AbC",
  "qr": "data:image/png;base64,iVBORw0KGgo...",
  "expires_at": "2024-01-15T10:35:00Z"
}

Display the QR code on your device screen. The short URL expires after the TTL.

Device Configuration

Settings

SettingDescriptionDefault
nameDevice identifierRequired
device_codeUnique code (auto-generated)Auto
age_targetAge to verifyOrganization default
redirect_urlPost-verification URLRequired
webhook_urlEvent notification URLOptional
force_kycAlways require ID scanfalse
expiration_timeSession TTL (seconds)300
is_activeEnable/disable devicetrue

Example Device Flow

// Kiosk Application

class VerificationKiosk {
  constructor(apiToken, deviceCode) {
    this.apiToken = apiToken;
    this.deviceCode = deviceCode;
    this.currentSession = null;
  }

  async displayNewQR() {
    const response = await fetch(
      `https://bouncer.example.com/api/v2/device/${this.deviceCode}/session-url`,
      {
        method: 'POST',
        headers: {
          'Authorization': `Bearer ${this.apiToken}`,
          'Content-Type': 'application/json',
        },
        body: JSON.stringify({
          qr_size: 500,
          ttl: 300
        })
      }
    );

    const data = await response.json();

    // Display QR on screen
    this.showQRCode(data.qr);

    // Set up auto-refresh before expiration
    setTimeout(() => this.displayNewQR(), 280000); // Refresh at 4:40
  }

  showQRCode(base64Image) {
    document.getElementById('qr-display').src = base64Image;
  }
}

// Initialize kiosk
const kiosk = new VerificationKiosk('YOUR_TOKEN', 'ABC123');
kiosk.displayNewQR();

Webhook Integration

Configure webhooks to receive real-time verification results:

// Express.js webhook handler
app.post('/webhooks/device/:deviceCode', (req, res) => {
  const { deviceCode } = req.params;
  const { session_id, success, status } = req.body;

  if (success) {
    // User verified - unlock content, dispense product, etc.
    deviceController.onVerificationSuccess(deviceCode, session_id);
  } else {
    // Verification failed
    deviceController.onVerificationFailed(deviceCode, session_id);
  }

  res.status(200).send('OK');
});

Device Branding

Devices inherit your organization's branding:

  • Logo: Displayed on verification page
  • Primary Color: UI accent color
  • Secondary Color: Background color

Customize branding in Settings > Organization > Branding.

Use Cases

Vending Machines

User approaches vending machine

Selects age-restricted item

QR code displayed on screen

User scans, completes verification on phone

Webhook notifies machine

Item dispensed

Point of Sale

Cashier initiates age check

Customer tablet shows QR code

Customer scans with their phone

Verification completes

POS system updated via webhook

Transaction proceeds

Event Entry

Guest arrives at venue

Scans QR code at gate

Completes verification on phone

Gate system receives webhook

Access granted

Device Management

Activating/Deactivating

Devices can be temporarily disabled without deleting:

  1. Go to Devices
  2. Find the device
  3. Toggle Active status

Inactive devices cannot create new sessions.

Monitoring

View device statistics:

  • Total verifications
  • Success rate
  • Average completion time
  • Recent activity

Device Events

Each verification creates events:

  • session_created
  • page_visited
  • biometry_started
  • kyc_started (if applicable)
  • completed

Best Practices

  1. Use meaningful names: "Main Entrance Gate" not "Device 1"
  2. Set appropriate timeouts: Longer for complex flows, shorter for quick checks
  3. Monitor webhook delivery: Ensure your endpoint is reliable
  4. Implement fallbacks: Handle cases when Bouncer is unreachable
  5. Secure your devices: Protect API tokens on physical devices

On this page