Dev Tools · 1h ago
Payments Are Lifecycles, Not Objects: Why SDK Status Fields Mislead
A payment isn't a single status; it's a lifecycle of authorization, capture, refund, and settlement events. Many SDKs flatten this into a Payment object with one status field, leading to bugs when developers fulfill orders on authorizations instead of captures. Hyperswitch Prism models payments as state machines with 30+ states, exposing verbs instead of a mutable status.
Meridian48 take
This is a practical warning for developers building payment flows, but the real lesson is that simplifying complex state machines into single status fields is a design antipattern that causes production bugs.
payment-lifecyclesdk-design