Skip to content

Viva Wallet Integration

Overview

Viva Wallet is the primary payment provider for both online ordering and kiosk terminal payments. For online ordering, Viva Wallet processes web-based payments via payment orders (cards, iDEAL, Bancontact, etc.). For kiosks, physical card terminals attached to kiosks use Viva Wallet for processing.

Key Purpose: Process all customer-facing payments (online ordering and kiosk terminals).

Note: If Square POS is connected, Square Payments is used instead of Viva Wallet for all payment flows.

Purpose

This page lets you configure Viva Wallet credentials, source codes, and terminal devices so customers can pay via online ordering checkout and via physical card terminals at your locations.

Key Concepts

  • ISV (Independent Software Vendor) Model: Upvendo connects to Viva Wallet as an ISV partner, using platform-level client credentials combined with per-merchant IDs to process payments on behalf of each restaurant.
  • Terminal Session: Each kiosk payment creates a terminal session identified by an idempotency key; the session is sent to the physical terminal, and its status is polled until the customer taps/inserts their card.
  • Source Code: A Viva Wallet-specific identifier that determines the payment source type (physical terminal vs online); each location has separate source codes for physical and online payments.
  • Merchant ID: The Viva Wallet merchant identifier that scopes all API calls to a specific restaurant account, stored per-location in the location settings.
  • Pre-authorization Capture: For certain channels, Viva Wallet supports pre-auth payments where the amount is held first and captured later, controlled by the isVivaWalletPreauth flag on the transaction.

Actions

Configure Viva Wallet Credentials

Enter the Merchant ID, API Key, API Secret, and Source Code provided by Viva Wallet to authenticate the integration for a specific location.

Register Terminal Devices

Enable the terminal integration and register physical Viva Wallet card readers so they can receive payment requests from kiosk devices.

Switch Between Live and Demo Mode

Toggle between Viva Wallet's production and demo (sandbox) environments. Demo mode uses test API endpoints so no real charges are processed.

Process Kiosk Terminal Payments

When a kiosk order is submitted, the system initiates a terminal sale via Viva Wallet's API, sending the payment amount and tip to the assigned physical terminal for customer card interaction.

When Viva Wallet is Used

ChannelViva Wallet UsedSource Code Type
Online OrderingYes -- web payment ordersOnline source code
Kiosk (physical terminal)Yes -- terminal paymentsPhysical source code
Table QR OrderingYes -- web payment ordersOnline source code

Location

  • Backoffice Route: /settings/payments/viva-wallet
  • Backend Controller: app/Http/Controllers/Api/VivaWalletController.php
  • Vue Component: src/views/settings/payments/VivaWalletComponent.vue

Fields

Viva Wallet Enabled

PropertyValue
Field IDenabled
LabelEnable Viva Wallet
TypeToggle
Defaultfalse

Description: Enable Viva Wallet as payment provider.


Merchant ID

PropertyValue
Field IDmerchant_id
LabelMerchant ID
TypeText
RequiredYes

Description: Your Viva Wallet merchant ID.


API Key

PropertyValue
Field IDapi_key
LabelAPI Key
TypePassword
RequiredYes

Description: API key for authentication.


API Secret

PropertyValue
Field IDapi_secret
LabelAPI Secret
TypePassword
RequiredYes

Description: API secret for authentication.


Source Code

PropertyValue
Field IDsource_code
LabelSource Code
TypeText
RequiredYes

Description: Payment source code from Viva Wallet.


Live Mode

PropertyValue
Field IDlive_mode
LabelLive Mode
TypeToggle
Defaultfalse

Description: Use live (real) payments vs demo mode.


Terminal Settings

Terminal Integration

PropertyValue
Field IDterminal_enabled
LabelEnable Terminals
TypeToggle
Defaultfalse

Description: Use Viva Wallet payment terminals.


Terminals

PropertyValue
Field IDterminals
LabelRegistered Terminals
TypeList

Description: Connected Viva Wallet terminal devices.


Business Logic

Payment Flow (Online Ordering)

Customer completes online order
        |
        v
System creates Viva Wallet payment order
(using online source code)
        |
        v
Customer redirected to Viva Wallet checkout page
(card, iDEAL, Bancontact auto-selected by country)
        |
        v
Payment confirmed via webhook
        |
        v
Order confirmed

Payment Flow (Kiosk Terminal)

Customer completes kiosk order
        |
        v
System initiates terminal sale
(using physical source code + terminal ID)
        |
        v
Card terminal activated
        |
        v
Customer taps/inserts card
        |
        v
Payment confirmed
        |
        v
Order confirmed

Business Rules

  • If Square POS integration is active (isSquareIntegrated() returns true), Viva Wallet is bypassed entirely and all payments (both online ordering and kiosk terminal) are routed through Square instead.
  • Terminal sale initiation uses an idempotency key per transaction; if a 409 conflict occurs (duplicate session), the system generates a new idempotency key and retries the sale automatically.
  • Payment amounts are converted to the smallest currency unit (cents) using ceil() before being sent to Viva Wallet, ensuring fractional amounts always round up.
  • The Viva Wallet API base URLs switch automatically between production (vivapayments.com) and demo (demo.vivapayments.com) based on the isProduction flag, which is derived from the application environment.
  • Each kiosk device stores a latest_idempotency_key that is updated after every terminal sale initiation, allowing the system to track and abort stale sessions if needed.

FAQs

  • Is Viva Wallet only used for kiosk terminals? No. Viva Wallet handles both online ordering web payments (via payment orders) and kiosk terminal payments (via terminal sales). Each channel uses a different source code: an online source code for web payments and a physical source code for terminal payments.
  • What happens if the customer does not tap their card? The terminal session remains pending until it times out on Viva Wallet's side. The kiosk can cancel the session and allow the customer to retry or choose a different payment method.
  • Can I use Viva Wallet and Square terminals at the same location? No, the system checks isSquareIntegrated() at payment time and routes to one provider exclusively. You must disconnect Square to use Viva Wallet.
  • What countries does Viva Wallet support? Viva Wallet supports EU and US markets. The system uses country-specific configuration (EU vs US client credentials) based on the location's country code.
  • How are tips handled? Tips are included as a separate tipAmount parameter in the terminal sale request, so the tip is captured as part of the same transaction alongside the order total.

Troubleshooting

Problem: Connection failed

Causes:

  1. Invalid credentials
  2. Wrong merchant ID
  3. API key expired

Solutions:

  1. Verify credentials
  2. Check merchant ID
  3. Generate new API key

Problem: Terminal not responding

Causes:

  1. Terminal offline
  2. Wrong terminal ID
  3. Network issue

Solutions:

  1. Check terminal power
  2. Verify terminal assignment
  3. Check network connection

Examples

Basic Setup

json
{
  "enabled": true,
  "merchant_id": "your-merchant-id",
  "api_key": "your-api-key",
  "api_secret": "your-api-secret",
  "source_code": "your-source-code",
  "live_mode": true,
  "terminal_enabled": true
}