---
id: ADR-PFM-INT-006
title: Settlement records one completion event
product_area: platform
module: integrations
revision: 1
status: proposed
design_intent: confirmed
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
decision: >-
  Use the shared settlement writer and an outcome compare-and-set. When later notification is required, save
  the completion event in the same transaction as the settled result.
constrains:
  - DOM-PFM-INT-003
  - DOM-PFM-INT-004
  - STATE-PFM-INT-007
  - WF-PFM-INT-012
  - WF-PFM-INT-013
  - SVC-PFM-INT-integrations
alternatives:
  - option: Emit separately after each writer commits.
    why_not: 'A crash could lose notification, and competing writers could create duplicate events.'
  - option: Leave unanswered synchronous calls without later notification.
    why_not: Their applications could never learn the result established by lookup or manual resolution.
consequences:
  - Losing settlement writers preserve the committed outcome and do not create another completion event.
  - 'Transport remains at least once, so consumers deduplicate the saved event identity.'
origin: docs/milestones/INTG-M2-calls-through-the-gateway.md#Decisions M2-D6 (Andrew)
supersedes: []
---

# Settlement records one completion event

## Context

One saved event and one delivery are separate guarantees.

## Decision

Use the shared settlement writer and an outcome compare-and-set. When later notification is required, save the completion event in the same transaction as the settled result.

## Alternatives Considered

Emit separately after each writer commits. A crash could lose notification, and competing writers could create duplicate events.

Leave unanswered synchronous calls without later notification. Their applications could never learn the result established by lookup or manual resolution.

## Consequences

Losing settlement writers preserve the committed outcome and do not create another completion event.

Transport remains at least once, so consumers deduplicate the saved event identity.
