Restaurant Mobile App QR Payment Development
QR payment in restaurant seems simple: scan — pay. In reality integration breaks at several layers — dynamic QR generation on POS side, payment status sync between waiter tablet and guest app, handling timeouts when acquiring responds later than bill closes.
Where Integration Most Often Breaks
Most common problem — race condition on QR payment via SBP (Fast Payment System). Guest scans dynamic QR, formed via YooKassa or CloudPayments API, makes transfer. Bank sends webhook to your server. But app already shows "Awaiting confirmation" and after 30 seconds — "Timeout expired." Reason — webhook came after 35 seconds due to network delays on bank side, while client polling stopped earlier.
Solution: WebSocket channel between server and mobile client instead of polling. Server on webhook receipt immediately pushes status to device. Client timeout increased to 3 minutes, but UI shows progress — animation shouldn't hang "forever" from UX perspective.
Second problem — QR scanning on iOS via AVFoundation. Standard AVCaptureMetadataOutput with .qr type sometimes can't read printed QR in poor restaurant lighting. Add torchMode = .auto and set videoZoomFactor programmatically on low brightness from AVCaptureDevice.exposureTargetBias.
What Stack and Architecture Look Like
On iOS — SwiftUI + Combine for payment screen state, AVFoundation for scanning, URLSession with async/await for backend requests. On Android — Jetpack Compose, CameraX with QRCodeAnalyzer on top of ML Kit Barcode Scanning, Retrofit + OkHttp.
Server side: dynamic QR generation via acquirer API (at YooKassa POST /v3/payments with confirmation.type = qr), get confirmation_url, WebSocket notifications to client, webhook processing with sha256 signature verification.
For menu and dishes — regular REST, cache data locally via Core Data (iOS) or Room (Android) so menu opens without internet.
Interaction Scheme
[Guest mobile app]
|
| Request bill (tableId)
v
[Restaurant backend]
|
| POST /v3/payments → YooKassa API
v
[YooKassa] → returns confirmation_url (QR)
|
| WebSocket push on webhook receipt
v
[Mobile app] → status "Paid"
Work Timeline
Start with audit of restaurant's POS system — understand which protocol it uses (iiko, r_keeper, Poster, or custom). iiko integration via iiko.transport API adds about 2 days. Then:
- Design screens: menu, cart, payment screen with QR
- Implement scanning and QR generation
- Integrate with payment provider
- Test webhooks in Sandbox
- Build and publish to App Store / Google Play
Timeline
MVP with QR payment and menu — 2–3 weeks. With full POS system integration and iOS and Android versions — up to 5 weeks. Cost calculated individually after requirements analysis.







