1. Home
  2. Portfolio
  3. Deposit return system / Integrations
Deposit return system / Integrations

ReVend: a new system for a fleet of ~170 reverse vending machines, rebuilt while the machines kept working

We took over inherited software, moved it to a modern platform and connected it with seven operators of Poland’s deposit return system. Machines in shops kept running on the same API throughout.

ReVend: a new system for a fleet of ~170 reverse vending machines, rebuilt while the machines kept working screenshot
Industry
Deposit return system / reverse vending machines
System type
Fleet back office, machine API and integrations with deposit operators
  • PHP 8.3
  • Laravel 12
  • Vue 3
  • Inertia 2
  • MariaDB
  • Redis
  • Apache Kafka
  • OpenAPI 3.1
01

Business challenge

ReVend supplies and runs reverse vending machines in Poland’s deposit return system: the machine recognises a PET bottle or can by EAN and weight, collects it in a sealed bag and prints a deposit coupon redeemable at the till. Every transaction and every bag must be reported to the right deposit operator. The inherited back office ran on Laravel 5.8 with code outside the framework and an unversioned database schema, the machine software was procedural PHP built for another market, there were practically no tests and no automated deployment – and the deposit system launch required integrating several operators at once, each with its own API and rules. Machines working in shops could not stop during the rebuild.

02

Scope of work

  • Zero-downtime switch: the existing database schema moved into migrations of a new Laravel 12 application unchanged, and the machine API (v1) kept the same contract, so no machine needed an update on switch-over day
  • Machine API v2 for manufacturers: per-machine credentials with encrypted secrets and scopes, HMAC-SHA256 request signing with replay protection, idempotency keys, OpenAPI 3.1 spec and a test console in the panel
  • One pipeline for seven deposit operators (Kaucja, Polka, PSK, Reselekt, Zwrotka, COMP, Forcom) over REST, OAuth and Apache Kafka with TLS/SASL – no coupon or bag is reported twice
  • Integrations with the national product register CBDOK, three coupon APIs for POS systems and company verification by tax ID in the VAT white list
  • Operations panel: machine availability learned from 28 days of history, bag-fill forecasts every 10 minutes with collection plans and a morning email, anomaly detection feeding tasks into a built-in CRM
  • Service forms with signatures and PDFs, screen ads on machines, monthly reports and operator settlements for shops, roles, two-factor login and machine access closed by default
03

Business value

  • Migration with machines in shops running the whole time
  • Seven deposit operators served by one integration pipeline
  • Every change tested in CI on the same database engine as production
  • Performance fixes measured on real production traffic, before and after
Before and after

The system at takeover and today

AreaBeforeAfter
Automated tests2about 980 in 146 files
Database schema under version control2 migrations206 migrations, 81 tables
Routes and endpoints87 routes + 51 scripts outside the framework295 routes in one application
External integrations–about 13 systems, including 7 deposit operators
Machine API1 version2: v1 unchanged and secure v2
Scheduled processes–39 scheduled jobs
Panel languages–Polish and English
Project in numbers

ReVend in numbers (12.2024 – 10.2026)

~170machines in the network

Seven models, from compact single-bag units to high-capacity machines with separate PET and can bags.

500–1300requests per minute

Traffic from the machines handled by the machine API.

7deposit operators

Plus about six other external systems – around 13 in total.

~980automated tests

Up from 2 at takeover; run in GitHub Actions on MariaDB like production.

Business proof

What this kind of system gives the business

Not only the stack, but the workflow, data ownership, reliability and next commercial step.

  • Machine API v1/v2
  • Operator integrations
  • CBDOK and coupon APIs
  • Availability and bag forecasts
  • CRM and service
  • Shop area and reports
01

Zero-downtime migration to Laravel 12

02

Secure machine API v2

03

One pipeline for 7 deposit operators

04

Fleet operations panel with forecasts and anomaly detection

Delivery notes

What usually matters during this kind of implementation

Short project notes written without client names. They show the practical decisions that make the system easier to maintain, sell and scale.

Replace in pieces, never stop production

Old code was removed only when nothing used it any more. The machines never noticed the switch.

Measure before optimising

Every performance fix started with a measurement of real traffic and ended with a before/after comparison.

Idempotency everywhere

Machines resend data. Idempotency keys and duplicate filtering mean a resent transaction never doubles a coupon or a bag report.

How this translates into delivery

From business process to maintainable software

The same approach is useful for Laravel platforms, B2B systems, DPPC workflows, ecommerce, CRM and API integrations: define the data, build the workflow, measure the result and improve it after launch.

01

Data model

02

Backend

03

Frontend

04

API

05

SEO/GEO

FAQ

Common questions

How was the migration done without stopping the machines?

The database schema moved into the new application unchanged and the machine API kept its contract. Machines talked to the new system exactly as before, and old code was removed only when nothing used it.

How do you avoid reporting a coupon twice?

Each operator has a synchronisation queue with export status, and machine requests carry idempotency keys. 89% of machine packets turned out to be repeats; they are now discarded before processing.

Is this pattern useful outside deposit return?

Yes. Any fleet of devices or partners sending data – terminals, sensors, POS systems, partner APIs – needs the same: secure device API, idempotency, queues, monitoring and integrations that never double a record.

Need a similar software direction?

Send a short context. We will map the first sensible step for the system, integration or landing page that should support business growth.

Book a free call +48 887 883 084

#softwareThatDelivers

No noise. Real systems. Software that runs in production.

Talk about the project