Mobile app for fuel payment without internet with sync on connection.

Offline QR Payment: Mobile Fuel Stations in Brazil
November 10, 20245 min readAppStar Team

Offline QR Payment: Mobile Fuel Stations in Brazil

Mobile app for fuel payment without internet with sync on connection.

mobileQRpaymentsofflineBrazilcase-study

About the Project

For a network of mobile fuel stations in rural Brazil, we developed a QR payment system that works without a permanent internet connection.

Problem

Mobile fuel stations serve remote areas where:

  • No stable internet — 2G connection or none at all
  • Cash is inconvenient — security, accounting, collection
  • Terminals don't work — require online connection
  • Customers prefer QR — don't want to carry cash

Client Requirements

  • Accept payment without internet
  • Sync when connection appears
  • Work on basic Android devices
  • Accounting integration

Our Solution

Offline-First Architecture

Workflow: Customer → QR code → Terminal (offline) → Local DB → Synchronization → Central server

How It Works

  1. QR generation — customer shows code from app
  2. Scanning — terminal reads and verifies signature
  3. Local transaction — record in encrypted DB
  4. Fuel dispensing — confirmation on screen
  5. Synchronization — when internet appears

Offline Payment Security

  • Cryptographic signature — QR contains signed data
  • Transaction limits — offline operation amount limits
  • QR expiration — automatic invalidation
  • Blacklists — synchronization on connection

Mobile Applications

For Customers (iOS + Android)

  • Payment QR code generation
  • Transaction history
  • Balance and top-up
  • Nearby station search

For Station Operators (Android)

  • QR code scanner
  • Transaction log
  • Data synchronization
  • Shift reports

Results

MetricBeforeAfter
Payment method100% cash70% QR
Transaction time2-3 min15 sec
Accounting errors8%<1%
Cash collectiondailyweekly

Business Impact

  • Collection reduction: $24,000/year
  • Theft reduction: $18,000/year
  • Time savings: +20% customers per day
  • Customer loyalty: +35% repeat visits

Technical Features

Synchronization

  • Priority transaction queue
  • Conflict resolution
  • Retry logic with exponential backoff
  • Data compression for 2G

Security

  • AES-256 local DB encryption
  • RSA QR code signing
  • Certificate pinning
  • Replay attack protection

Reliability

  • Works offline up to 7 days
  • Automatic recovery
  • Audit logging
  • Backup systems

Technologies

  • Customer app: React Native
  • Station terminal: Android (Kotlin)
  • Backend: Laravel (PHP)
  • Database: PostgreSQL + SQLite (local)
  • Synchronization: Custom protocol

Need an offline solution? Let's discuss your project

Related Articles