I was thinking little bit beyond the computer science system design part. And I need answers how those factors work in real world. Let’s say there is userA and userB. userA adds 20$ to their account. userB adds 50$ to their account. 1. Does Starbucks maintain cash value of these two users in one bank account? If so, 70$ in bank and in Backend they maintain 20$ from userA and 50$ from userB. When userA buys coffee everyday worth of 5$(including tips etc.) they can deduct 5$ for up to 20$ from the bank pool. If userB buys 7$ burger they deduct from pool up to 50$. Is this how things are done? 2) I don’t think there is a need of something like stripe treasury here because, the user doesn’t maintain their own finances. They put money, they can’t take back, they can do purchases. That’s it. Or does Starbucks use some services like this? This gets really interesting. Could someone help me here? Just curious.
Transactions in bank side are not done real time. Most of the logic would be handled by a smaller service which will listen in for client deductions. It will update clients db with the money deduction. And after certain time there would be a batch job which will concile all the transactions credit and debit and send it to the bank db. So basically bank transfers will be not done based on each transaction but instead based on bulk. Where as customer credits would be triggered individually on their app there would be a different service which will handle this. In total think about 4 different services. Customer credit Customer Debit Bank reconciliation in banking it is called as circling Bank updates Reconciliation could be a batch job triggered at certain time. Bank update would be a Streming based backend Customer credit debit would be a api with a producer consumer kind of arch Hope this helps
You also need to consider that loading money to this card is not reversible. Not spendable at other companies. Also not transferable. This will help inform the ideal design.
Yes. I think mentioned that in my post about kit able to get the money bank once deposited to your account.
Yeah. Odds are adding money to your account is just another payment transaction just like buying a gift card. At that point the money is now Starbucks' to do with as they please. Their system will just note how much credit you have and you can use that instead of cash.
Cold hard truth: every time you load $5 on your Starbucks card and you don’t use it. You are essentially given SBUX an interest free loan 😃
Sounds more like an accounting question than a systems design one
Tech Industry
Yesterday
595
Join Databricks rn, purely for future financial gains?
Tech Industry
Yesterday
589
Modi is the worst dictator!
Tech Industry
Yesterday
3022
The job market is absolutely brutal right now
Tech Industry
Yesterday
1777
Cute girl on the floor
Software Engineering Career
Yesterday
1403
Cleared Amazon onsite, but lowballed.
Starbucks spends that money, when you get a $5 coffee from your account, money doesn’t move, just the balance of your account changes If you are thinking about tax and balancing accounts, you can think about at as an on going process. You add 50 to your card today, someone else adds 20 to their card tomorrow and so on