I am doing a database project for Uni and am trying to figure out how a 'Pay at Table' app would work for restaurants. I Have found this example company that does this https://readytopay.com/ but i cant figure out how they have set up their databases.
My best Guess is that they connect to the restaurant POS API, from this they use an Ajax call to pull data from each table at the restaurant and duplicate it into their own tables. So they would have;
Restaurants Restaurant_ID . PK Name Address City email Tables table_ID . PK Restaurant_ID . FK Table_Number API endpoint (API endpoint for that table in restaurant POS) Bills Bill_ID . PK Restaurant_ID . FK Table_ID . FK Food Item (Pulled From API) Food Price (Pulled From API) Quantity (Pulled From API) Payment Status (has the item been paid for yet) Date
I presume that hey would need some way to send data back to the restaurants API to tell it that certain items have been paid for with the app.
If anyone has an idea of wha the best way to go about this and how the tables should be set up would be please let me know. any help would be appreciated.