Docs/Reference/Operation hash

Operation hash

How brands correlate internal database records with Loyfin signed operations, receipts, and onchain events.

Purpose#

Connect brand records to Loyfin receipts without leaking internal IDs.

operationHashis the brand's correlation key. It is stored with signed operations and emitted in completed issuance/redemption events, so your backend can connect a Loyfin receipt to an internal issuance, redemption, order, campaign, or support record.

Recommended format#

  • Use a deterministic bytes32 hash of an internal operation ID, for example keccak256("issuer:conversion:12345").
  • Do not put raw customer IDs, order IDs, emails, or CRM IDs onchain. The hash gives you correlation without public business data.
  • Store both the raw internal ID and the resulting operationHash in your own database.
  • Use 0x000...000 only for tests or operations that truly do not need reconciliation.

Reconciliation#

After posting an issuance or redemption, poll GET /operations/:id for status. For completed receipts, query GET /issuances?operationHash=... or GET /redemptions?operationHash=.... The same hash should appear in your internal row, the stored signed operation, and the mined event receipt.