CASE STUDY
Desetak (SES)
Voucher commerce backend for multi-center retail operations.
Snapshot
- Industry: Retail / Shopping centers / Vouchers
- Client: SES (operator of Citypark Ljubljana, Europark Maribor, Citycenter Celje, Center Vič Ljubljana, Aleja Ljubljana)
- Deliverable: Custom backend for voucher commerce on desetak.si
- Role: System architecture, backend implementation, integrations, operational tooling
- Integration points: Card payments (Saferpay), bank transfer flows, FURS fiscalization, Pošta Slovenije eSpremnica, email notifications
- Status: Production system
Context
SES runs one voucher program across five of the largest shopping centers in Slovenia. The desetak.si site needed a backend that could reliably sell vouchers, generate printable and physical formats, and handle the operational realities of payment, invoicing, and shipment compliance for each center.
Problem
A simple checkout is not enough for voucher operations. The system needed to handle:
- multiple shopping centers with separate merchant setups and operational flows
- physical shipment vs. print-at-home vouchers
- asynchronous payment outcomes (card vs. bank transfer)
- strict fiscal compliance and invoice confirmation (FURS)
- postal logistics and shipment documentation (Pošta Slovenije)
- automated customer communication based on order status
Project Goals
- Enable customers to purchase Desetak vouchers online
- Generate vouchers (PDF with barcode and branding)
- Track order status across payment, issuing, and fulfillment
- Send customer emails based on state transitions
- Support card payments and bank transfers
- Fiscalize invoices and record confirmation (FURS)
- Generate shipping documents for Pošta Slovenije
Constraints & Challenges
- Each shopping center required distinct merchant configuration and operational handling.
- Orders had to remain consistent across asynchronous payment flows.
- Fiscalization required compliant invoice numbering and confirmations.
- Physical shipments needed structured postal data and export.
- The system had to support both B2C and B2B ordering scenarios.
Solution Overview
We built a custom backend that orchestrates the full voucher lifecycle: checkout and order session management, payment initiation and return handling, voucher generation and issuance, order status transitions, fiscalization and invoice recording, postal handover integration, and automated customer emails.
The result is a production-ready system that ties together payments, compliance, voucher issuance, and delivery for a multi-center retail organization.
Architecture & Technical Approach
The system is a PHP + MySQL application with API endpoints, a back-office UI, and scheduled processes. The core of the workflow is a status-driven order model:
- `abond` → active cart/session in progress
- `invalid` → order placed but unpaid (bank transfer or pending card confirmation)
- `valid` → paid
- `redeem` → voucher issued / fulfilled
Key components:
- Checkout & cart API: session-based ordering, shipping/invoice data, item management
- Payment gateway: Saferpay PaymentPage for card payments and a bank transfer flow for TRR payments
- Voucher generation: branded templates, barcode encoding, PDF output
- Email workflows: transactional templates based on state transitions
- Fiscalization service: FURS (Davčne blagajne) with EOR/ZOI/QR handling
- Shipping integration: Pošta Slovenije eSpremnica (SOAP), RF/VF reference generation, bulk submissions
- Admin dashboard: order review, status updates, reporting, shipment batch management
- Background tasks: abandoned cart follow-ups and state reconciliation
Technology Stack
- PHP
- MySQL
- Saferpay JSON API (PaymentPage)
- FURS fiscalization (Davčne blagajne)
- Pošta Slovenije eSpremnica (SOAP)
- PHPMailer for transactional emails
- Imagick + Picqer Barcode for PDF voucher generation
- DataTables + Dompdf for admin exports and reports
Implementation Process
- Modeled the order lifecycle and status transitions across payment and fulfillment.
- Implemented checkout, cart, and session endpoints for B2C/B2B orders.
- Integrated card and bank transfer payment flows.
- Built voucher rendering and barcode issuance logic.
- Added fiscalization endpoints and invoice tracking.
- Integrated Pošta Slovenije submission workflow.
- Delivered admin tooling for operations and reporting.
Results & Impact
- End-to-end voucher commerce pipeline for five major shopping centers
- Reliable payment handling with clear order state transitions
- Automated voucher issuance and customer communication
- Fiscal compliance and invoice confirmation built into the flow
- Operational tooling for shipping batches and order management
Reflection
This project highlights how a well-structured order state model simplifies complex operational requirements. By treating fiscalization, fulfillment, and shipping as first-class stages (not afterthoughts), the system stays reliable under real-world constraints.
Summary
The Desetak backend provides SES with a production-grade voucher commerce platform: multi-center aware, compliant, and operationally robust. It connects checkout, payments, voucher generation, fiscalization, and postal logistics into one cohesive system.