Payment Gateway System Design — How does the Stripe work?

Think Software
13 min readFeb 19, 2022

We recently introduced a new chapter on our course “Distributed System Design Interviews Bible” discussing the system design of a payment gateway service such as Stripe.

When we published the chapter on the Stripe System Design, we received complimentary emails from our students praising the details in the chapter. E.g. check the email that we received.

In that chapter we covered three different aspects of a payment gateway service as follows:

  • Storing customers’ payment information (e.g., credit card, or other similar payment information)
  • The payment processing to charge a customer
  • For a generic payment gateway service, how the money is transferred from a customer to a merchant in a secure and reliable manner

Payment System Examples

Let’s cover some real-life payment scenarios where a payment gateway is used.

1. Amazon Marketplace

Many of us now buy many things from the Amazon marketplace. To purchase something on Amazon, you need to have a customer account. You also provide your payment information (e.g., credit card information, etc.) to Amazon, which is stored securely on Amazon servers. Now, on Amazon, you can buy stuff not just from Amazon, but various third-party sellers have online shops on Amazon, and you can buy things from them as well. When you check out an item, you are only dealing with Amazon. Amazon deducts money from your credit card and provides the money to the seller.

2. App Stores

Now almost every adult has a mobile phone. Most people are either using Android or iPhones. If you are using iPhone, you go to Apple Appstore to install an app. You can also store your payment information (e.g…

--

--