Partner cashback & loyalty network:One backend for guests, restaurants, and the operator

75

partner restaurants connected

~100K

registered users

6

cashback types in one ledger
Backend Development
Web Development
FinTech
POS Integration
Admin portal screens of the cashback and loyalty network: overview with credit consumption by brand, diners growth dashboard and purchases report

About the client

The client runs a cashback and loyalty network for restaurants in the Middle East. Guests find restaurants in a mobile app, pay from an in-app wallet, and earn cashback. Restaurants join as partners and see what guests spend and earn.
Our role. Gilzor designed and built the backend and two web portals: one for restaurant partners and one for the client’s team. The guest mobile app runs on the same backend through its API.

Founders’ goals

One backend for the mobile app, restaurant partners, and the internal team, so everyone works from the same data
A dedicated partner portal, so restaurants don’t depend on the client’s team for reports
A cashback engine that stays accurate across currencies, refunds, and split bills
A platform ready for new cities and countries

The problem

The backend serves three audiences with very different access rights: guests, restaurant staff, and platform admins. A single balance field wouldn’t hold up under this cashback model; it would break on the first refund. On top of that, every payment needs two-way sync with the restaurant’s POS.

Challenges

01

Six cashback rules, not one

The platform runs six cashback types. They differ in how they’re earned, whether they expire, which currency they use, and in what order they’re spent. Every payment has to calculate taxes, apply the right balances in the right priority, handle refunds, and still reconcile to the cent. We built cashback as a ledger with explicit priorities instead of a single balance field, so every unit of cashback can be traced from earning to spending.

02

Access control that mirrors the restaurant business

Partners are organized as group → brand → branch: a restaurant group owns brands, and brands own individual venues. A partner user may see one branch, a whole brand, or the whole group, and may be allowed to view transactions but not add users. Admins are also bound to countries. Admins configure permissions per section and per hierarchy level, and the backend enforces them. The UI doesn’t just hide what a user shouldn’t see.

03

Bills that live in the POS, not in our database

Restaurants create orders in their own POS. A guest enters the order number in the app, and the backend reads the bill from the POS, calculates taxes and cashback, and writes the payment status back. A bill can be split between five or six people or paid in part, through the POS or manually. Every path has to end in the same state on both sides.
Solution development

What We Built

Three clients on one backend: the guest mobile app, a partner portal for restaurants, and an admin portal for the client’s team.

Cashback Wallet

Six cashback types, each with its own expiry, currency, and spending priority, all in one ledger.

Split and Partial Payments

Guests pay their share or part of the total. Every payment syncs with the restaurant’s POS.

POS Integration

The backend reads bills from the POS by order number, then calculates taxes, cashback, and payment status and writes them back automatically.

Referral Program

Once an invited friend makes three purchases, both get cashback. Admins configure thresholds and rewards in the admin portal.

Restaurant Search for the App

Search and filters run on Typesense, with the index kept in sync with the main database via CDC.

Partner Portal

Guest spending, cashback earned, credits used, and staff access management.

Admin Portal

Legal entities, groups, brands, branches, visitors, transactions, and top-ups, with reports and dashboards per country.
Tech stack

Cashback Platform Tech Stack

Backend

Nest.js

Web portals

React

Database

PostgreSQL

Search

Typesense
Synced with PostgreSQL via CDC

Payments

Payment aggregator integration
Webhooks
Idempotency keys
Retry and dead-letter queues

Integrations

Restaurant POS (two-way sync)
API for the guest mobile app

Access control

Role-based access per group, brand and branch
Country-bound admin roles
Admin portal overview: brands, diners, total purchases and remaining credit, brands over their credit threshold and top credit-consuming brandsReporting dashboard for diners: total, active and pending diners, average orders and basket size, growth of new diners and transactions over timePurchases report with totals, search, filters and a transaction table by branch, brand, group and payment status

Achieved

results

75 restaurants, ~100K users

75 partner restaurants and about 100,000 registered users run on this backend.

95%+

Over 95% of payments sync with the POS automatically, with no manual reconciliation.

0 unexplained discrepancies

Cashback balances reconcile to the cent at month-end.

Balance questions solved in minutes

Support sees every earning and spending entry in the ledger, so a guest’s cashback question takes minutes to answer.