The Debit Arrived. Where Is the Credit?

P-42 is debited for INR 800 at 10:01.

profile_img

When the switch and the ledger disagree

P-42 is debited for INR 800 at 10:01. The merchant calls before the credit feed catches up. Support sees a debit; operations sees a healthy connector. Neither observation answers the customer's question. The missing piece is a lifecycle for the transfer, not another dashboard of total messages.

At 10:01 the switch reports a successful debit. At 10:03 the ledger feed still has no credit. Is money missing, or is the confirmation simply late? A nightly total cannot tell the support desk which payment to investigate.

The turning point

Match on the payment reference, currency and expected amount, not on the account alone. Two transfers for the same amount can belong to different customers. Keep the source event ID as well: a retried debit is evidence about one transfer, not a second transfer.

Use the transfer reference plus source namespace as the correlation key. Deduplicate by source event ID, which is different: a debit and its credit must share a correlation key but must not cancel each other as duplicates. If a channel can reuse a reference across business days, include that scope in the contract.

What actually happens to one record?

 Illustrative event or assumption Expected consequence
10:01 D1 debit INR 800Pending, deadline registered
10:02 D1 replayStill one pending debit
10:06 watermark passes deadlineOpen exception E42 once
10:08 C1 arrives lateResolve E42, preserve its audit history

Late is not the same as lost

A bounded join can produce matches, but an inner join does not emit a missing credit. An event-time timer can open an exception when the matching deadline passes. A later credit must resolve that same exception rather than disappear outside the join window.

If the credit stream stops advancing, silence across thousands of accounts is a feed incident. Opening a case per payment will bury the underlying outage. Alert on feed freshness separately and agree who can pause escalation without discarding evidence.

The architecture behind the decision

Operating architecture

Figure 1. Data travels across the top; the management plane observes and governs changes separately.

Ingest the switch feed and PostgreSQL or Oracle ledger changes through approved connectors. Normalize business identifiers and amounts before keying. Isolate unmatched events with no reliable reference for manual reconciliation.

The design trade-off

Publish exceptions into a review queue, not back into the payment authorization path. Analysts need the two source IDs, the reason for the mismatch and the event times. A missing confirmation alone is not authorization to reverse a payment.

Active unmatched keys are approximately arrival rate multiplied by mean unmatched lifetime. At 500 transfers/s and 90 seconds to match, budget first for 45,000 pending transfers, then add the deduplication horizon, timers, and delayed-feed backlog. These are planning inputs, not a measured cluster size.

What OSS Manager changes, and what it does not

Payments operations owns the exception deadline; ledger engineering owns amount and currency semantics. A refund is a new business movement with its own identity, not merely a negative credit injected to make sums balance.

Use a stable exception ID per transfer and rule version. Store the last disposition at the sink. Retain unmatched state beyond the escalation window for the approved correction period; send older corrections to a reconciliation process.

Use the reviewed service configuration to identify endpoints and operating roles. The business rule belongs to the job and its downstream contract, not to a green infrastructure status.

The failure modes worth rehearsing

 Exercise Observable pass condition
Debit D1 twice; credit C1 onceOne matched transfer; no duplicate posting
Delay C2 past the deadlineOne open exception, later resolved under the same ID
Send a different currency or amountA mismatch, never an automatic reversal

Run the new matcher in shadow mode against an agreed ledger cutoff. Disable case publication first if exception counts diverge, retain input offsets, then replay into an isolated exception namespace. Compare by reference and disposition before enabling the writer.

A human operating model

Compare distinct source references against matched, pending and exception totals. Investigate watermark age before widening a deadline: a stalled feed can look like a wave of missing credits.

Where this pattern earns its place

Bank settlement: debit versus credit confirmations. Retail: order versus captured payment. Insurance: approved claim versus actual disbursement. In each case the matching key, deadline, and correction policy differ.

Companion technical solution: Reconciling Payment Events with Apache Flink.

Technical reference and scope

Apache Flink documentation:

https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/datastream/operators/joining/

The timelines are illustrative, not customer measurements. Confirm connectors, state compatibility, metrics and available OSS Manager actions against the release selected for the pilot.