architecture decision

ADR-007: Store payment state in a dedicated Postgres database

PaymentService owns its payment state in `payments-db` rather than sharing the order database.

Decision RecordSeptember 9, 2024AcceptedData ownership

Context

Payment state includes provider references, authorization attempts, refund history, and operational metadata. Sharing the order database would blur ownership between domains.

Decision

PaymentService owns payments-db. Other services learn about payment state through events and queries owned by PaymentService.

Consequences

Payment data can be secured and audited separately. Cross-domain workflows rely on events and read models rather than direct joins.