architecture decision
ADR-005: Isolate Stripe behind PaymentGatewayService
Stripe integration details are contained behind PaymentGatewayService so payment orchestration is not coupled to a provider API.
Decision RecordJuly 11, 2024AcceptedIntegration
Context
Payment orchestration needs to support retries, provider failover, and future payment methods without leaking provider-specific fields through the catalog.
Decision
Stripe commands and events remain inside the PaymentGatewayService boundary. PaymentService talks to the gateway through provider-neutral contracts.
Consequences
Provider changes are localized to PaymentGatewayService. The gateway must maintain a mapping between provider identifiers and internal payment references.