---
id: ADR-COM-ORD-005
title: Accounting calls follow the commit under stable keys
product_area: commerce
module: orders
revision: 1
status: proposed
design_intent: confirmed
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
decision: >-
  Commit domain records before keyed Accounting requests and recover unresolved outcomes without automatically
  rolling back the sale.
constrains:
  - WF-COM-ORD-002
  - WF-COM-ORD-003
  - WF-COM-ORD-004
  - WF-COM-ORD-005
  - WF-COM-ORD-007
  - SVC-COM-ORD-orders
origin: >-
  services-commerce:docs/milestones/plans/COMM-M2-plan.md#A1 and #A2 (approved: commerce-orders decisions 2
  and 6, ADR-05; COMM-M1 A3)
alternatives:
  - option: Request invoice creation during placement commit
    why_not: A remote financial request would extend the domain transaction.
  - option: Remove the sale after unanswered financial requests
    why_not: 'An unanswered request might already have charged money, leaving no sale record if undone.'
consequences:
  - The shared schedule provides recovery only when configured and healthy.
  - Deferred provisional-invoice deletion has no retry mechanism.
  - An attempt retains one financial key for repeated requests.
supersedes: []
evidence:
  - >-
    services-commerce at c8b66a98: modules/orders/services/billing/*.ts; services/tender/tender-order.ts;
    services/orders/void-order.ts, financial-sweeps.ts.
---

# Accounting calls follow the commit under stable keys

## Context

A remote service can complete a financial request even when its response is lost.

## Decision

Preserve stable keys for financial requests and record answers separately from domain commits. Recover by resuming known requests rather than guessing that failure means no remote effect.

## Alternatives Considered

Calling Accounting under a domain lock extends transaction duration. Removing the sale on a lost answer could leave a real remote charge without its purchase record.

## Consequences

Recovery has explicit gaps: provisional deletion is not retried, and missing transport can leave pending work silent. Declined purchases remain until their deadline or an authorized void.
