Skip to content
Menu

PAYMENT GATEWAY

[THK] F.6.8 Data Integrity and Consistency Controls

Production-ready integrations must ensure that all transaction data remains accurate, consistent, and reliable across the full transaction lifecycle and across all participating systems.

In SIBS Payment Gateway (SPG) integrations, data integrity is critical to guarantee that transaction outcomes, amounts, identifiers, and states are correctly represented and preserved, even under asynchronous processing, retries, and failure conditions.

A system that does not enforce strong data integrity controls will produce inconsistencies, reconciliation issues, and potential financial discrepancies.

Integrity of Transaction Data

All transaction data exchanged with SPG must be:

  • Correctly structured and validated
  • Consistently represented across systems
  • Preserved without unintended modification

This includes:

  • Transaction identifiers (transactionID, merchantTransactionId)
  • Monetary values (amount.value, amount.currency)
  • Transaction metadata (timestamps, descriptions)
  • Transaction state (paymentStatus, returnStatus)

Incorrect or inconsistent data may result in:

  • Rejected API requests
  • Misinterpretation of transaction outcomes
  • Reconciliation mismatches

See C.2 Field Semantics and Validation Rules.

Consistency Across System Boundaries

Transaction data must remain consistent between:

  • SPG platform
  • Merchant system
  • Downstream business systems

This requires that:

  • The same transaction identifiers are used consistently across all interactions
  • Data values (e.g., amount, currency) remain unchanged throughout the lifecycle
  • Internal representations reflect the authoritative state returned by SPG

Any divergence between systems must be:

  • Detectable through observability mechanisms
  • Resolvable through reconciliation processes

Authoritative Source of Truth

Transaction state and data must always be derived from authoritative sources and kept aligned with them throughout the lifecycle.

In SPG integrations:

  • The Status API provides the authoritative transaction state
  • Webhooks provide event-driven updates but are not authoritative

A production-ready system must:

  • Align internal data with the authoritative state
  • Avoid relying on intermediate or inferred data
  • Ensure that final transaction records reflect confirmed outcomes

See F.6.3 Asynchronous Flow Readiness and F.6.4 Webhook Reliability and Processing Guarantees.

Protection Against Data Corruption and Drift

Data must remain stable throughout the transaction lifecycle.

This requires:

  • Preventing unintended modification of transaction records
  • Ensuring immutability of critical fields once a transaction is initiated
  • Avoiding duplication or divergence of transaction data across components

Controls must ensure that:

  • Reprocessing or retries do not alter original transaction data
  • Duplicate events do not create conflicting records
  • State transitions do not introduce inconsistent values

See F.6.2 Transaction Idempotency and Duplicate Protection.

Handling of Concurrent and Asynchronous Updates

Asynchronous processing introduces scenarios where multiple updates may affect the same transaction.

A production-ready system must:

  • Ensure that updates are applied in a controlled and consistent manner
  • Prevent race conditions and conflicting updates
  • Validate state transitions before applying changes

This includes:

  • Handling duplicate or out-of-order webhook notifications
  • Coordinating updates from multiple processing paths
  • Ensuring that final states are not overridden or regressed

See F.6.4 Webhook Reliability and Processing Guarantees.

Reconciliation and Data Validation

Reconciliation processes must ensure that transaction data is consistent across all systems.

This requires:

  • Comparing internal transaction records with SPG authoritative data
  • Identifying discrepancies in state, amount, or identifiers
  • Resolving inconsistencies through controlled correction processes

Reconciliation must be:

  • Periodic and event-driven
  • Capable of handling delayed or missing updates
  • Supported by observability and traceability mechanisms

See F.6.7 Production Observability Prerequisites.

Validation of Data Throughout the Lifecycle

Data validation must be applied at all stages:

  • Input validation before API requests
  • Response validation after API calls
  • Event validation during webhook processing
  • Final validation during reconciliation

This ensures that:

  • Invalid data is detected early
  • Inconsistencies are prevented from propagating
  • Transaction integrity is maintained end-to-end

Operational Controls for Data Integrity

Production systems must enforce controls that guarantee data reliability.

This includes:

  • Strict validation rules for all transaction fields
  • Controlled update mechanisms for transaction state
  • Auditability of all data changes

These controls must ensure that:

  • Data remains consistent under retries, failures, and asynchronous updates
  • All changes are traceable and verifiable
  • Transaction records reflect the true and authoritative state

Final Consideration

Data integrity is a foundational requirement for financial correctness.

A production-ready integration ensures that:

  • Transaction data remains accurate and consistent across all systems
  • Authoritative state is always respected
  • Asynchronous and concurrent updates do not introduce inconsistencies
  • Reconciliation processes can reliably confirm correctness

Without strong data integrity and consistency controls, even technically correct integrations may produce incorrect financial outcomes and operational risk.

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Strictly Necessary Cookies

Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.