1. A system comprising: a key database; and a transaction processing server computer coupled to the key database, wherein the transaction processing server computer comprises a processor and a non-transitory computer readable medium coupled to the processor, the non-transitory computer readable medium comprising code executable by the processor for implementing a method comprising: receiving from a terminal, an envelope associated with a transaction, wherein the envelope includes unencrypted transaction details, a token derived from a key associated with a terminal and an account identifier, and at least a first portion of the transaction details in an encrypted format, the at least first portion of the transaction details encrypted using the key associated with the terminal, wherein the envelope further includes a hashed message authentication code computed using the key and the at least first portion of the unencrypted transaction details; retrieving the key associated with the terminal from the key database; converting the token to the account identifier using the key; verifying that the account identifier is associated with a valid account; and conducting an audit on the transaction, the audit ensuring that the envelope has not been modified between the terminal and the transaction processing server computer, wherein the audit includes decrypting the at least first portion of the transaction details and comparing the decrypted at least first portion of the transaction details with the unencrypted transaction details in the envelope associated with the transaction, and recalculating the hashed message authentication code using the key and the at least first portion of the unencrypted transaction details and comparing the recalculated hashed message authentication code with the hashed message authentication code received in the envelope.