Skip to content

Instantly share code, notes, and snippets.

@mimoo
Last active February 15, 2021 05:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mimoo/3f960ffa97fc5f619f05fde1398bca12 to your computer and use it in GitHub Desktop.
Save mimoo/3f960ffa97fc5f619f05fde1398bca12 to your computer and use it in GitHub Desktop.
What happens when you insert/swipe your bank card in a point of sale?

Developers have this infamous interview question "what happens when you type google.com into your browser's address box and press enter?"

Let's answer a set of similar questions, but in the money space :$

what happens when you insert or swipe your bank card in a point of sale?

  1. The point of sale (PoS) prompts for your PIN, or read information in your magnetic stripe or via RFID (touchless payment)
  2. It then needs to ask for an authorization to your bank (issuing bank, as they "issued" the credit or debit card).
  3. The PoS uses the internet to talk to its acquiring bank (the one that acquired the business, asking them if they wanted to support bank cards and providing the PoS).
  4. The acquiring bank talks to the VISA/Mastercard network.
  5. The VISA/Mastercard network do a bunch of fraud check, then talk to the issuing bank (your bank).
  6. The issuing bank approves the transfer (after checking for fraud as well).
  7. The VISA/Mastercard network forwards the authorization back to the acquiring bank, who forward it to the PoS.
  8. The transaction is done from your point of view.
  9. Later during the day, the merchant files all of the receipts into a system
  10. The acquiring bank sends all of these transactions to the Visa/Mastercard network
  11. Settlement then needs to happen: the issuing bank needs to pay the acquiring bank.
  12. It is not clear what happens here, but it seems like if the two banks (issuing and acquiring) are in the same country, then the country's national settlement system can be used (usually provided by a central bank)
  13. If the country does not have a national settlement system, they can use SWIFT and find a route of pairs of banks (think dominos) that correspond with one another (a pair of bank A and B are correspondent banks if bank A has an account at bank B, and bank B has an account at bank A).
  14. If the transaction is cross-country, either SWIFT can be used (where at some points two correspond banks operate in different countries), or the central bank of central banks (BIS)
  15. Eventually, each bank on the path needs to update their databases to reflect the movement of money.

what happens when you pay online

what happens when you send a money transfer to someone else from your bank

what happens when you use transferwise to transfer money

Resources

Articles

Courses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment