The central service of our Microservice architecture will be the checkout service. This service will offer an API for a checkout process that is common to many e-commerce systems. For each checkout process, we will require the following input data:
A cart that can contain an arbitrary number of articles
The customer's contact data
The checkout service will then be responsible for executing the actual checkout process, which will involve a number of additional services, each handling a single step or concern of the checkout process:
Our fictional e-commerce venture will handle physical goods (or more abstract goods, of which we can only have a limited quantity in stock). So, for each article in a cart, the checkout service will need to ensure that the desired quantity of said article is actually in stock, and if possible, reduce the available stock by that amount. This will be the responsibility of the inventory service.
After successfully completing a checkout process...