Part of #393 (sticky routing). Status: implemented in #420 (commit 23f953b), pending review/merge.
POST /update-gateway-score gains three optional, backward-compatible fields:
- Payload wins; the decide-time
gateway_scoring_data_{payment_id} snapshot (which now also stashes customerId) is the fallback — so callers only need the fields when success webhooks can outlive the snapshot's 30-minute TTL.
- Two-pass hook in
check_and_update_gateway_score_: a payload-only pass runs before the snapshot fetch (a CHARGED webhook hours late still counts), the snapshot pass after.
- Writes only on CHARGED / AUTHORIZED / PARTIAL_CHARGED — the engine's wider success set includes lifecycle statuses (VOIDED, AUTO_REFUNDED, CAPTURE_FAILED, …) that would let a late webhook re-count an earlier attempt's connector. Retries are correct by construction: fail-on-A writes nothing, success-on-B increments B.
- No dedupe, by design: update-gateway-score is the source of truth — every event counts, N times if sent N times (matching the engine default SR behavior; its feedback locks are opt-in per merchant).
- Bug fixed en route: the GSM healthy-failure early-return now fires on failures only — previously a success carrying
errorInfo skipped both the SR reward and any snapshot-based work.
- Gated by the
sticky_routing_enabled FeatureConf; a sticky write failure is logged, never surfaced to the caller. openapi + api-refs updated.
Part of #393 (sticky routing). Status: implemented in #420 (commit
23f953b), pending review/merge.POST /update-gateway-scoregains three optional, backward-compatible fields:{ "customerId": "cust_123", "paymentMethod": "INTERAC", "paymentMethodType": "RTP", ... }gateway_scoring_data_{payment_id}snapshot (which now also stashescustomerId) is the fallback — so callers only need the fields when success webhooks can outlive the snapshot's 30-minute TTL.check_and_update_gateway_score_: a payload-only pass runs before the snapshot fetch (a CHARGED webhook hours late still counts), the snapshot pass after.errorInfoskipped both the SR reward and any snapshot-based work.sticky_routing_enabledFeatureConf; a sticky write failure is logged, never surfaced to the caller. openapi + api-refs updated.