Redundancy and routing.
WHY MORE THAN ONE
Outages Different method coverage Cost differences Negotiating position
WHAT AN ABSTRACTION LAYER PROVIDES
One internal interface, with providers behind it.
WHAT IT SHOULD DEFINE
Initiating a payment Checking status Refunding Handling notifications
WHY THAT MATTERS
Provider-specific code spread through an application makes switching impractical.
WHAT ROUTING RULES MIGHT CONSIDER
Method and card type Amount Cost Provider availability Historical approval rate
WHAT FAILOVER REQUIRES
Detection of provider failure Rerouting without double-charging Clear state for transactions in flight
WHY THAT LAST POINT IS DIFFICULT
A transaction whose outcome is unknown must not be retried elsewhere blindly.
WHAT TO DO
Resolve the unknown state first, then decide.
WHAT TO RECONCILE
Per provider, separately, since each settles differently.
WHAT TO MONITOR
Approval rate by provider, which reveals when one degrades.
WHAT TO AVOID
Complexity exceeding the benefit, at low volume.