Cookies on softitland.com

We use essential storage to run this site. With your permission we would also like to use analytics cookies to see which pages help visitors, and marketing cookies to measure our ads. You can change your choice at any time with “Cookie settings” in the footer. Privacy Policy

Mobile apps

How to plan offline mode for a mobile or POS app

How to design a mobile or POS app that keeps working with no signal: local storage, sync queues, conflict rules, idempotent APIs and offline card payments.

Cover image for the article How to plan offline mode for a mobile or POS app
Key takeaways
  • Decide early which actions must work offline, which can wait, and which must never happen without a connection.
  • Store offline actions in a local queue with a unique ID each, and make the server endpoints safe to receive the same action twice.
  • Write conflict rules before you write code: the server owns stock and prices, while sales and notes are added rather than overwritten.
  • Offline card payments are authorized only when the device reconnects, so the business carries the decline risk and should set limits.

How do you plan offline mode for a mobile or POS app?

Decide which actions must work without a connection, save them on the device in a queue, send them to the server through endpoints that are safe to call twice, agree in advance how conflicts are resolved, and show people clearly what is waiting to sync. Offline mode is a design decision, not a feature you add at the end. Apps that treat it as an afterthought lose data, double-count sales or confuse staff the first time the Wi-Fi drops.

This is the planning checklist we use when a mobile app or POS system has to keep working in a basement, a warehouse, a market stall or a restaurant with patchy signal.

Which features need to work offline?

Start by sorting every action in the app into three groups. Do it with the people who use the app every day, not only the product owner.

GroupExamplesOffline behaviour
Must work offlineRing up a sale, scan a barcode, record a delivery, add a note, take a photoSaved locally and queued for sync
Can waitReports, dashboards, account settings, history beyond the last few daysShown from cache or marked as unavailable
Never offlineLarge refunds, price changes, new staff accounts, deleting recordsBlocked with a clear message until online

Keep the first group small. Every action in it needs local storage, sync logic, conflict rules and testing, so it is where most of the extra cost sits.

Where should offline data be stored?

Each device needs its own local database. Native and cross-platform apps usually use SQLite or a similar embedded store, and web apps use IndexedDB in the browser. Plan three kinds of local data:

  • Reference data the app reads, such as products, prices, customers and staff, refreshed whenever the device is online.
  • An outbox of actions the user took while offline, in the order they happened.
  • Sync state: the last successful sync time and any items that failed, so the app can retry and report problems.

Encrypt anything sensitive at rest, limit how much history each device keeps, and decide what happens when a device is lost or replaced before its queue was sent.

How should sync work when the connection returns?

The safest pattern is an outbox queue. Every offline action gets a unique ID created on the device. When the connection returns, the app sends the queue in order, and the server records each action once, even if the same request arrives twice because the first reply was lost.

  • Make endpoints idempotent. The server checks the action ID and ignores duplicates instead of creating a second sale or a second stock movement.
  • Send events, not final states. "Sold 2 of item 1043 at 14:05" merges cleanly with other devices; "stock is now 7" overwrites everyone else.
  • Retry with a back-off, and stop retrying an item that the server rejects for a real reason so it can be reviewed by a person.
  • Sync both ways. After sending its queue, the device downloads changes from the server, such as new prices or products.

How do you handle conflicts between devices?

Conflicts happen when two devices change the same thing while apart. Write the rules down before development starts, because the right answer is a business decision:

  • Server authority for prices, products, discounts and permissions. Offline devices use the last values they had and accept updates when they reconnect.
  • Append, never overwrite for sales, payments, notes and stock movements. They are events, so they can all be kept.
  • Last change wins only for simple fields where it truly does not matter, such as a customer's preferred name.
  • Human review for anything else, such as two staff editing the same booking. The system flags it rather than guessing.

What about card payments while offline?

Card payments are the riskiest part of an offline POS. With Stripe Terminal, for example, payment details are collected at the time of sale, but authorization is only attempted after connectivity returns and the payment is forwarded. Stripe states that the business assumes the decline and tamper risk for offline transactions, recommends restricting large offline amounts, and enforces its own offline maximum per transaction. A smart reader must also have connected online on the same local network within the last 24 hours to take offline payments (Stripe: collect card payments while offline).

So set limits per transaction and per day, give each offline payment your own reference so it can be matched later, and make sure staff can see how many payments are still waiting to be forwarded. Other providers have different rules, so check yours before promising offline cards.

What should users see while offline?

  • A clear, calm status indicator, such as "Offline: 12 sales waiting to sync", not an error screen.
  • Actions that cannot work offline disabled with a short reason, instead of failing after the user fills in a form.
  • Nothing the user typed is ever lost, even if the app is closed or the battery dies.
  • A manager view of failed sync items, so problems are fixed the same day.

How do you test offline mode properly?

Normal testing on fast office Wi-Fi will not find offline bugs. Test with flight mode on and off mid-action, with a slow and unstable network, with the app closed during sync, with two devices editing the same record, and with device clocks set slightly wrong. Run a pilot in one real location before rolling out everywhere. Our guide to custom POS systems covers that rollout, and for web-based tools our comparison of PWAs and native apps explains how far browser offline support goes. If your workflow needs software built around it, our custom software development team can plan the sync from day one.

Frequently asked questions

Can a web app or PWA work offline too?

Yes, within limits. A service worker can cache the interface and recent data, and IndexedDB in the browser can hold a queue of actions to send later. Background syncing is less reliable in browsers than in native apps, so a PWA suits light offline use, while heavy offline work is safer in a native or cross-platform app.

How long can a POS keep selling without internet?

As long as the device has storage and the payment provider allows it. For cash and non-card actions, the limit is mostly local storage. For cards, follow your provider's rules: Stripe Terminal, for example, needs a smart reader to have connected online recently and caps the size of offline payments, and you should add your own limits.

What happens if two tills sell the last item while offline?

Both sales are recorded, because refusing a sale at the counter is worse than a small oversell. When the tills sync, stock goes below zero and the system flags it. Good offline design makes that visible to a manager straight away, with a clear rule for refunds, backorders or substitutions.

Does offline mode make an app more expensive to build?

Yes, because it adds a local database, a sync engine, conflict rules and a lot of extra testing. The way to control the cost is scope: make only the actions that truly must work without a connection available offline, and keep everything else online-only with a clear message to the user.

Last updated

Start a project

Have a project in mind? Let’s build it.

Tell us what you need. You get a clear plan, a fixed quote and a timeline before any work starts.

Prefer email? info@softitland.com