Magento Plugin

The Magento Cardknox plugin will allow you to charge credit cards via the Cardknox gateway. Cardknox enables credit card payments for both customers on the storefront and for merchants in the Admin portal. The plugin supports Authorize Only, Capture, Void, Cancel, and Refund transactions. As a merchant, your web servers remain out of scope of the transaction, keeping card data secure and simplifying PCI compliance.


Download the plugin

Install the Cardknox Plugin

To install the Cardknox plugin:
  1. 1.
    Unzip the folder to app/code/CardknoxDevelopment/Cardknox (create the directories if needed)
  2. 2.
    Run the below commands in the Magento root directory (bash).
If you are using versions 2.0 – 2.1, contact cardknox for a compatible version. For 2.1.0 - 2.1.3, comment out lines 278 – 282 in Cardknox/etc/di.xml. On higher versions, no changes are needed.
Enable the module
php bin/magento module:enable CardknoxDevelopment_Cardknox --clear-static-content
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Optionally flush the cache
php bin/magento cache:clean
php bin/magento cache:flush


Navigate to Stores > Configuration > Payment Methods > Cardknox which will bring you to the configuration page (see below).

Configuration Options

This enables the Cardknox Module. Set to ‘Yes’ to enable Cardknox payments.
Name of payment method. This will appear to users when selecting a payment method. We recommend selecting ‘Credit Card.’
Vault Enabled
This enables the customer to save cards for later use on the site.
Vault Title
Name of vault payment method. This will appear to users when selecting a card on file. We recommend selecting ‘Stored Cards.’
Cardknox Transaction Key
Your Cardknox API transaction Key.
Cardknox Token Key
Your Cardknox token key.
Logs transaction data for troubleshooting purposes.
Payment Action
Sets the transaction payment mode. If ‘Authorize’ is selected, all transactions will need to be captured when invoicing an order.
Cardknox Gateway Endpoint
Cardknox URL to which transactions are routed (this setting should not be modified unless advised to do so by Cardknox Support).
Payment from Applicable Countries
Select ‘Specific Countries’ to only allow payment from the ‘Payment From Specific Countries’ whitelist.
Payment from Specific Countries
Select countries you wish to whitelist.
Sort Order
Priority of Cardknox in list of payment methods.
If you do not have a key, you can obtain it by signing into your account in the Cardknox portal and navigating to Key Management.


New Order

Select Credit Card as the payment method in the Payment & Shipping Information section (see Title in the Configuration Options section of this document).


If ‘Authorize’ is selected as the Payment Action in the Cardknox module settings (see Payment Actions in the Configuration Options section of this page), select ‘Capture Online’ to capture the transaction before submitting the invoice. Please note that previously voided transactions cannot be captured and will result in an error.


Use ‘Void’ to cancel transactions on orders that have not yet been invoiced. This is only available if ‘Authorize’ is selected as the Payment Action in the Cardknox module settings (see Payment Actions in the Configuration Options section of this document). Once an order has been invoiced, use ‘Credit Memo’ to refund the transaction.
Please note that ‘Void’ cancels the credit card transaction but does not cancel the order. To cancel the order as well, see the Cancel section below.


Use Cancel to void an un-captured transaction and cancel the associated order.

Credit Memo

Issue a Credit Memo to refund an order that has already been invoiced.

Retrieving Cardknox Reference Number

Cardknox transaction reference numbers can be found in the Transaction History section of any order page and are listed as Transaction ID. This can be useful when viewing your transactions on the Cardknox Gateway portal or when contacting Cardknox Support regarding specific transactions.