4D Payments SDK 2016 .NET Edition

Questions / Feedback?

EncryptedKeyIndex Property

Specifies the current keys that are in use in the PIN pad and by Paymentech.


public int EncryptedKeyIndex { get; set; }
Public Property EncryptedKeyIndex As Integer

Default Value



The EncryptedKeyIndex specifies the current keys that are in use on the host (Paymentech) and in the PIN pad. This EncryptedKeyIndex is updated after every transaction, and is required to be sent in all transactions except a RequestCurrentKeys transaction. The normal range is from 1 through 9. The default is zero (0), and indicates that no encryption keys have been established. Transaction requests should never be sent with a value of zero (0). Note that MACReversals must be sent with the EncryptedKeyIndex from the original transaction to insure that the EncryptedPIN can be properly translated by the host.

Keys are required to be renewed every:

  • 200 Transactions
  • 24 Hours
  • Each time a Batch is released for settlement
  • Whenever the PIN pad loses sync with the server
When the host changes the key, a new key index is assigned and returned in the EncryptedKeyIndex property. The component needs to update the PIN pad with the PINKey and MACKey after each transaction in order to stay in sync with the host. If the keys and/or the EncryptedKeyIndex become out of sync, you must use the RequestCurrentKeys method to retrieve a valid set of keys and restore the synchronization.

If the ForceKeyRequest field is True after any transaction, you must immediately perform a RequestCurrentKeys transaction before sending any more authorizations.

Copyright (c) 2021 4D Payments Inc. - All rights reserved.
4D Payments SDK 2016 .NET Edition - Version 16.0 [Build 8017]