A business application needs to know that a customer paid $138 for a subscription. Why should that application also possess merchant credentials, unrestricted refund authority, or access to financial records belonging to other customers?

Imagine a fictional enterprise publishing platform. Its checkout works. Receipts arrive. Subscriptions activate. Behind the screen, however, the same internet-facing application that renders articles can retrieve a powerful processor credential and issue financial commands.

Nothing has failed yet. That is precisely when the architecture deserves scrutiny.

The important question is what happens after someone finds a vulnerability in that application. Can they vandalize a publication? Read customer records? Or have they also acquired the authority to move money?

Domain isolation separates those consequences. It assigns commercial accounting, operational governance, and financial execution distinct responsibilities, identities, and enforceable permissions. The following architecture is an illustrative design, not a description of any organization's private systems or a compliance prescription.

Separate services are not necessarily separate security domains

Several useful architectural ideas address different problems. Domain-driven design uses bounded contexts to keep business concepts coherent: a subscription means something different to a publishing service than a payment means to a financial service. Microsoft's domain-analysis guidance explains how those business boundaries help identify services. A bounded context, however, does not itself enforce a security boundary. [1]

Microservices and service-oriented architecture organize execution and communication. Network segmentation restricts reachable systems. Authorization determines what an authenticated identity may do to a particular resource. Data ownership determines which domain may establish or change a fact.

Three services on three servers can still form one large compromise zone if they share a database administrator login, a secret vault readable by every workload, or a deployment account able to replace all three applications.

NIST's Zero Trust Architecture, SP 800-207, rejects implicit trust based simply on network location or ownership. Putting the payment service on an internal subnet does not make every request from the public application legitimate. [2]

A meaningful boundary needs separately enforced identities, permitted operations, resource ownership checks, and restricted access to secrets and data. Administrative access, backups, support tools, and deployment pipelines must respect that boundary too.

Three responsibilities, three kinds of authority

Domain A: commercial operations and accounting. The publishing application owns customer relationships, subscription terms, invoices, entitlements, and its business ledger. It decides what was sold and what service the customer should receive. It needs trustworthy transaction outcomes and reconciliation references. It does not need the financial service's administrative credential.

Domain B: operational governance and orchestration. A broker authenticates the calling platform, resolves its permitted tenant relationships, and checks the requested operation against independently maintained policy. It selects an authorized destination, records the request, and coordinates execution and status reporting.

The word independently matters. A broker that trusts any tenant ID, amount, or merchant destination supplied by its caller merely relocates the vulnerability. Its limits must constrain the caller even when that caller is compromised. Where pricing remains authoritative in Domain A, the broker can enforce separately configured ceilings, allowed transaction classes, and approval requirements; it cannot magically verify a corrupted invoice.

Domain C: financial execution. A dedicated service owns processor integrations, merchant connections, protected credentials, and the execution of authorized payments, refunds, and preauthorizations. It maintains financial execution records and reconciles them against the processor. Upstream systems receive scoped results rather than administrative access.

This model is architectural analysis, not a requirement to build three products. Smaller systems may combine deployments while retaining constrained identities and data access. But code sharing one process and credential set cannot claim the same protection against full process compromise as independently enforced execution boundaries.

Follow the $138 purchase

In our fictional platform, the customer selects a subscription. Domain A creates a durable order specifying the amount, currency, customer reference, and subscription terms. Payment details are collected through the chosen provider's supported secure collection flow; the commercial application retains only the references and display details it needs.

Domain A submits a purchase request to Domain B using its service identity. The broker derives the permitted tenant and merchant relationship from trusted configuration. It verifies that this application may request this transaction type for this customer and amount. The caller cannot choose an arbitrary bank destination by editing a request field.

Domain B records an operation identifier and routes the permitted instruction to Domain C. Domain C checks the receiving authorization and merchant binding, applies its financial controls, and communicates with the processor. The merchant credential stays within that execution boundary.

Suppose the processor completes the charge but the network drops the response. The platform must show a pending result while it investigates. A timeout is evidence of uncertainty, not proof of rejection. Automatically creating a fresh charge could collect $138 twice.

An idempotency key identifies the original financial intent across retries. It must be scoped to the authorized merchant and operation, associated with the original parameters, and reused under the provider's supported retention rules. A correlation identifier helps trace the request; it does not independently prevent duplicate execution. Amazon's guidance explains the distinction between retrying safely and accidentally repeating an operation. [3]

The financial service eventually establishes the authoritative outcome. The broker returns the permitted result to Domain A: the relevant operation, amount, currency, status, and reference. Domain A matches it to the order before recording payment and activating the subscription.

Authorization, capture, settlement, and later disputes remain different events. The entitlement policy must specify which state permits activation and how subsequent reversals are handled. A green checkout screen cannot erase that lifecycle.

The Payment Processor Doesn't Need Your Business Ledger.

The processor may legitimately require customer details, transaction descriptions, billing information, risk signals, or evidence supporting a dispute. Banks and processors can also require business information for underwriting and other obligations. Data minimization does not mean withholding information they legitimately require.

It means avoiding unnecessary access to the entire commercial system.

A publishing company's editorial workflows, negotiated subscription terms, internal margins, sales opportunities, and entitlement rules do not automatically belong in every payment request. Sending a complete customer object because serialization is convenient creates an unnecessary disclosure.

Likewise, the processor's record of a successful charge is not the business's complete accounting ledger. Fees, refunds, disputes, credits, taxes, and allocation of payments to invoices require explicit reconciliation. Preserve the reference linking the systems without giving either unrestricted authority over the other.

Design the interface around an allowlist of fields with stated purposes. Apply retention limits, restrict diagnostic payloads, and review what support personnel can export. A carefully isolated database offers little protection if debug logs copy its sensitive contents into a broadly accessible monitoring platform.

When the Public Application Is Compromised, What Can the Attacker Actually Reach?

With direct, broadly privileged processor access, an attacker may be able to execute whatever the stolen credential permits: retrieve payment information, submit charges, or issue refunds. The precise damage depends on that credential's permissions and the processor's controls. Direct integration is not inherently insecure; excessive authority is the central problem.

In the isolated design, stealing the publishing application's identity should not grant access to the processor secret. Nor should it confer refund approval, access to another tenant's payments, or permission to redirect merchant funds.

Two tests expose common failures. First, change an authorized request's payment reference to another tenant's reference. Does the receiving service reject it? OWASP calls this object-level authorization: knowing an identifier, including a UUID, is not authorization to access the object. [4]

Second, use the checkout identity to invoke a refund or merchant-administration operation. OWASP distinguishes this function-level failure from accessing the wrong object. Hiding a button does not remove the underlying capability. [5]

The attacker can still abuse permitted purchase requests, corrupt commercial records, steal information available to the application, or disrupt service. Independent limits, customer authorization evidence, anomaly detection, and revocation remain necessary. Isolation limits exposure; it does not establish immunity.

Also test supply-chain compromise: can a malicious dependency read every domain's secrets through a shared build account? OWASP's secrets-management guidance addresses restricted access, rotation, revocation, and auditing across the secret lifecycle. Credential separation must survive deployment and incident response, not merely appear on a diagram. [6]

Different financial data carries different risks

A card number, payment token, bank authorization reference, merchant credential, and invoice number are not interchangeable.

A token may avoid exposing the underlying card number while still enabling charges when combined with sufficient authority. A bank authorization reference points to consent whose permitted scope and evidence must be preserved; it is not blanket permission for future debits. Transaction metadata can expose personal and commercial information even when no card number is present.

PCI SSC's current document library lists PCI DSS v4.0.1. Its guidance explicitly states that outsourcing all processing does not eliminate a merchant's responsibility to ensure that its service providers protect account data. Scope depends on actual data flows and systems that can affect security, not the label placed on a component. [7] [8]

Tokenization and effective separation can reduce exposure and may reduce assessment scope. They are not automatic exemptions. One unambiguous example: PCI SSC says card verification codes must not be retained after authorization, even encrypted. [9]

NIST SP 800-53 Revision 5, whose publication page identifies Release 5.2.0, provides a broader control catalog spanning access control, audit, incident response, and supply-chain risk. These references support a control-based assessment; they do not certify this illustrative architecture or substitute for an organization's applicable obligations. [10]

Enterprise licensing should not depend on one merchant account

Now imagine the publishing platform is licensed to an enterprise that operates it on premises and insists on using its own processor.

The subscription logic should not require rewriting because the merchant changes. A governed interface can preserve commercial operations while an adapter implements the selected provider's financial behavior.

But interchangeable does not mean identical. Providers differ in supported payment methods, authorization lifetimes, refund semantics, webhook behavior, and idempotency guarantees. Model those capabilities explicitly. Reject unsupported operations rather than silently treating them as equivalent.

Governance and execution can run with the vendor, the customer, or across a hybrid boundary. Decide who holds credentials, approves policy changes, handles incidents, reconciles funds, and owns merchant onboarding. Customer-hosted software remains dependent on internet connectivity if its financial authority is hosted elsewhere.

Switching providers also does not guarantee that existing payment tokens can move. Migration may require provider cooperation or renewed customer authorization. A clean interface reduces code coupling; it cannot repeal contractual and operational constraints.

Fraud intelligence without opening every financial record

A financial service can evaluate transaction velocity, unusual amounts, repeated failures, refund patterns, and changes in behavior using appropriately governed data. Stripe, for example, documents AI-based payment risk evaluation using transaction factors and signals across its business network. This demonstrates a capability, not proof that any particular deployment will prevent fraud. [11]

An upstream application may need a decision such as allow, hold, or review, with a usable reason category. It does not necessarily need other merchants' raw records or a copy of the risk dataset.

Our architectural recommendation is to retain the model version, policy decision, relevant evidence references, and human overrides under controlled access. Measure false positives as well as missed fraud. Establish review and appeal paths: a legitimate customer blocked by an opaque score is an operational failure too.

NIST's AI Risk Management Framework supports evaluating trustworthiness throughout an AI system's lifecycle. Applied here, that means privacy controls, explainable review, monitoring, and accountable human decisions rather than treating a risk score as unquestionable authority. [12]

The broker adds failure modes. Engineer them deliberately.

Every additional service introduces latency, cost, credentials, deployments, and availability dependencies. The broker can become a concentrated target or a bottleneck. Redundant instances alone will not resolve corrupt policy, inconsistent state, or a shared administrative compromise.

A transactional outbox helps address one specific problem: committing a local business update while reliably recording the event that must follow it. AWS explains this dual-write failure and the need for idempotent consumers. An outbox does not make a database transaction and an external card charge one atomic operation. [13]

Record durable states, retry with limits and backoff, monitor aging work, and reconcile unresolved operations independently with the processor. A failed queue message needs an owner and a recovery path. Do not manufacture success to keep the interface moving.

Callbacks require authenticated origin and replay controls; duplicate and out-of-order notifications must be handled. Stripe explicitly documents signature verification, duplicate events, and lack of guaranteed event ordering. Controlled polling offers a complementary recovery mechanism, provided status endpoints enforce the same tenant and operation permissions. [14]

If authorization cannot be established, fail closed for the financial action. Preserve the customer's request and explain its pending status. Test credential revocation, callback loss, processor outage, and recovery after a crash between execution and recording the result.

The architecture should answer before the incident does

A system should possess only the information and authority necessary to perform its assigned responsibility. Financial execution, commercial accounting, and operational governance are different responsibilities—and treating them as separate security domains can fundamentally change the consequences of a breach.

  1. If your public application were compromised tonight, which financial actions could its identity perform without independent approval?
  2. Could an enterprise customer change processors or deployment models without exposing its ledger or rewriting your commercial logic?
  3. When a payment succeeds but its response disappears, can your systems prove what happened without charging again?

Sources

Primary guidance and provider documentation; reviewed November 4, 2026. Provider documentation is maintained continuously. The three-domain scenario and design recommendations are illustrative architectural analysis.

  1. Microsoft: Domain analysis
  2. NIST SP 800-207 (2020)
  3. AWS: Safe retries and idempotency
  4. OWASP API1:2023: Object authorization
  5. OWASP API5:2023: Function authorization
  6. OWASP: Secrets management
  7. PCI SSC: Current standards library
  8. PCI SSC: Outsourced processing responsibilities
  9. PCI SSC: Card verification code retention
  10. NIST SP 800-53 Rev. 5 / Release 5.2.0
  11. Stripe: Transaction risk prevention
  12. NIST: AI Risk Management Framework
  13. AWS: Transactional outbox
  14. Stripe: Webhook security and delivery