Hellgate CPA

What is the difference between composition and aggregation in payments?

Aggregation bundles many functions into one component – for example, a gateway that ties fraud checks into authorization. It looks simpler at first but creates tight coupling: changing one behaviour means modifying shared logic, and swapping a provider becomes hard.

Composition keeps each capability as an independent service you arrange as needed – run fraud before auth, or auth before fraud, by configuration. CPA prefers composition because it keeps services testable, replaceable, and free of hidden dependencies.

→ Composition over aggregation, explained

Latest News