One number, three systems
The most common failure is not a broken API - it is three systems each holding a slightly different stock figure and updating on different schedules.
Pick a single source of truth
Decide which system owns the quantity and make every other system read from it. Push updates outward from that owner and never let a downstream system write back.
Design for the outage
- Queue writes instead of failing the sale.
- Reconcile on a schedule, not only on change.
- Log every conflict with both values so it can be investigated.
Test with real bad days
Simulate a scanner outage and a double sale. If the reconciliation cannot explain the difference after the fact, the integration is not finished.