How would you approach designing an in-app purchase system that works offline and syncs when online?

Interview question asked to Software Engineers, Engineering Managers, Machine Learning Engineers and other roles interviewing at Tradeshift, DataRobot, Atlassian and others: How would you approach designing an in-app purchase system that works offline and syncs when online?.