| Checkout / Merchant | Owns client protocol, request identity, retry, and resume behavior. In this design it participates in: Authenticate merchant, validate amount/currency, and atomically create intent/idempotency result. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents the external caller from also owning the contract and failure behavior of Payment API. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Client times out after successful capture” to the external caller. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Checkout / Merchant boundary before extracting or scaling it. |
| Payment API | Owns authentication, validation, quotas, deadlines, and routing. In this design it participates in: Score risk and resolve a tokenized funding instrument without exposing raw card data. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Checkout / Merchant from also owning the contract and failure behavior of Idempotency Store. | Put protocol, authentication, quotas, and business transitions in one process. Acceptable at low scale, but it couples external traffic risk to domain releases. Here that simpler choice would couple “Processor returns unknown outcome” to Checkout / Merchant. | Costs another hop, policy distribution, and a high-blast-radius fleet. Introduce it when many clients or services need one protocol and protection boundary. Measure the latency, saturation, lag, or mismatch at the Payment API boundary before extracting or scaling it. |
| Idempotency Store | Owns authoritative versioned state or immutable evidence. In this design it participates in: Route to a processor and record each uncertain attempt before external I/O. | Defines the source of truth and commit boundary. It prevents Payment API from also owning the contract and failure behavior of Payment Orchestrator. | Let each service persist its own interpretation. That removes one clear commit boundary and makes retries, support, and reconciliation ambiguous. Here that simpler choice would couple “Webhook arrives before synchronous response” to Payment API. | Costs schema migration, replication, backup, and shard ownership. Split storage only when access patterns, retention, or compliance boundaries materially differ. Measure the latency, saturation, lag, or mismatch at the Idempotency Store boundary before extracting or scaling it. |
| Payment Orchestrator | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Conditionally transition intent and append balanced ledger postings in one boundary. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Idempotency Store from also owning the contract and failure behavior of Risk Engine. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Ledger posting is unbalanced” to Idempotency Store. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Payment Orchestrator boundary before extracting or scaling it. |
| Risk Engine | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Verify/dedupe webhooks and reconcile provider settlements against internal attempts/ledger. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Payment Orchestrator from also owning the contract and failure behavior of Token Vault. | Embed policy in every caller. Rules then drift by deployment version and emergency changes require fleet-wide redeployment. Here that simpler choice would couple “Settlement file disagrees with captured amount” to Payment Orchestrator. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Risk Engine boundary before extracting or scaling it. |
| Token Vault | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Authenticate merchant, validate amount/currency, and atomically create intent/idempotency result. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Risk Engine from also owning the contract and failure behavior of Processor Router. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Client times out after successful capture” to Risk Engine. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Token Vault boundary before extracting or scaling it. |
| Processor Router | Executes idempotent asynchronous work under lease and retry policy. In this design it participates in: Score risk and resolve a tokenized funding instrument without exposing raw card data. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Token Vault from also owning the contract and failure behavior of Processor Adapter. | Perform the work before acknowledging the caller. This gives simpler consistency but unbounded tail latency and fragile retries. Here that simpler choice would couple “Processor returns unknown outcome” to Token Vault. | Costs leases, checkpoints, retries, DLQs, and lag operations. Separate once execution time or burstiness no longer fits the request deadline. Measure the latency, saturation, lag, or mismatch at the Processor Router boundary before extracting or scaling it. |
| Processor Adapter | Executes idempotent asynchronous work under lease and retry policy. In this design it participates in: Route to a processor and record each uncertain attempt before external I/O. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Processor Router from also owning the contract and failure behavior of Webhook Gateway. | Perform the work before acknowledging the caller. This gives simpler consistency but unbounded tail latency and fragile retries. Here that simpler choice would couple “Webhook arrives before synchronous response” to Processor Router. | Costs leases, checkpoints, retries, DLQs, and lag operations. Separate once execution time or burstiness no longer fits the request deadline. Measure the latency, saturation, lag, or mismatch at the Processor Adapter boundary before extracting or scaling it. |
| Webhook Gateway | Owns authentication, validation, quotas, deadlines, and routing. In this design it participates in: Conditionally transition intent and append balanced ledger postings in one boundary. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Processor Adapter from also owning the contract and failure behavior of Payment State DB. | Put protocol, authentication, quotas, and business transitions in one process. Acceptable at low scale, but it couples external traffic risk to domain releases. Here that simpler choice would couple “Ledger posting is unbalanced” to Processor Adapter. | Costs another hop, policy distribution, and a high-blast-radius fleet. Introduce it when many clients or services need one protocol and protection boundary. Measure the latency, saturation, lag, or mismatch at the Webhook Gateway boundary before extracting or scaling it. |
| Payment State DB | Owns authoritative versioned state or immutable evidence. In this design it participates in: Verify/dedupe webhooks and reconcile provider settlements against internal attempts/ledger. | Defines the source of truth and commit boundary. It prevents Webhook Gateway from also owning the contract and failure behavior of Double-Entry Ledger. | Let each service persist its own interpretation. That removes one clear commit boundary and makes retries, support, and reconciliation ambiguous. Here that simpler choice would couple “Settlement file disagrees with captured amount” to Webhook Gateway. | Costs schema migration, replication, backup, and shard ownership. Split storage only when access patterns, retention, or compliance boundaries materially differ. Measure the latency, saturation, lag, or mismatch at the Payment State DB boundary before extracting or scaling it. |
| Double-Entry Ledger | Owns authentication, validation, quotas, deadlines, and routing. In this design it participates in: Authenticate merchant, validate amount/currency, and atomically create intent/idempotency result. | Defines the source of truth and commit boundary. It prevents Payment State DB from also owning the contract and failure behavior of Outbox / Kafka. | Let each service persist its own interpretation. That removes one clear commit boundary and makes retries, support, and reconciliation ambiguous. Here that simpler choice would couple “Client times out after successful capture” to Payment State DB. | Costs schema migration, replication, backup, and shard ownership. Split storage only when access patterns, retention, or compliance boundaries materially differ. Measure the latency, saturation, lag, or mismatch at the Double-Entry Ledger boundary before extracting or scaling it. |
| Outbox / Kafka | Preserves durable ordering, replay, and consumer checkpoints. In this design it participates in: Score risk and resolve a tokenized funding instrument without exposing raw card data. | Decouples bursts and failure from user acknowledgment. It prevents Double-Entry Ledger from also owning the contract and failure behavior of Reconciliation. | Call every downstream consumer synchronously. That couples user latency and availability to analytics, notification, indexing, and audit dependencies. Here that simpler choice would couple “Processor returns unknown outcome” to Double-Entry Ledger. | Costs eventual consistency, schema evolution, replay tooling, idempotent consumers, and lag operations. Earn it when bursts or downstream failure must not block acknowledgment. Measure the latency, saturation, lag, or mismatch at the Outbox / Kafka boundary before extracting or scaling it. |
| Reconciliation | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Route to a processor and record each uncertain attempt before external I/O. | Proves correctness and supports controlled recovery. It prevents Outbox / Kafka from also owning the contract and failure behavior of Refund / Dispute. | Infer correctness from request logs. Logs do not prove durable business state, detect silent drift, or safely repair ambiguous outcomes. Here that simpler choice would couple “Webhook arrives before synchronous response” to Outbox / Kafka. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Reconciliation boundary before extracting or scaling it. |
| Refund / Dispute | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Conditionally transition intent and append balanced ledger postings in one boundary. | Separates a distinct scale, ownership, policy, or failure boundary. It prevents Reconciliation from also owning the contract and failure behavior of Audit / Compliance. | Keep this behavior inside an adjacent service. Prefer that simpler option until independent scale, ownership, policy, or failure isolation is measurable. Here that simpler choice would couple “Ledger posting is unbalanced” to Reconciliation. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Refund / Dispute boundary before extracting or scaling it. |
| Audit / Compliance | Owns one bounded domain decision, transition, or operational capability. In this design it participates in: Verify/dedupe webhooks and reconcile provider settlements against internal attempts/ledger. | Proves correctness and supports controlled recovery. It prevents Refund / Dispute from also owning the contract and failure behavior of operators and repair tooling. | Infer correctness from request logs. Logs do not prove durable business state, detect silent drift, or safely repair ambiguous outcomes. Here that simpler choice would couple “Settlement file disagrees with captured amount” to Refund / Dispute. | Costs an interface, deployment, telemetry, ownership, and failure mode. Keep it in-process first; extract when independent scale or reliability pays for the boundary. Measure the latency, saturation, lag, or mismatch at the Audit / Compliance boundary before extracting or scaling it. |