Introduction

No payment integration is too complex.

Credentials

Across all Cardknox products we use a key (xKey) to identify on what account to process a specific transaction. Each Cardknox product doc will guide you where to set the xKey (for example: in the body of the request along with all other parameters, in the request header as “Authorization”, in the app settings etc.). You will have a unique xKey for sandbox and production accounts.

Best practices

  • Transaction response Transaction responses contain valuable information that you can utilize. The most important one is xResult; this will inform your system if the transaction was approved or declined. xAuthAmount will indicate how much was actually authorized by the bank, so it is a good idea to make sure that it matches the requested amount. By default, transactions will only approve for the full amount. If the full amount is not available, the transaction will be declined. Every transaction will receive a unique xRefnum that is used to identify this unique transaction. It is helpful during troubleshooting and is also used in case of a follow-up transaction (void refund, etc.). It is a good idea to display this xRefNum to the user and add it to receipts. You can find a full list of available response parameters here.

  • Declines When a payment fails, you will get a xResult of D or E. Typically, you would simply want to display the failure notification to the user and show them the xError in the response that may, at times, contain helpful information to identify the reason for the decline. You can choose to allow the user to try another card. There is no need to handle different error messages or error codes specifically.

  • Duplicates It is a good idea to pass in a unique xInvoice with each transaction that is sent for processing so Cardknox can try to catch unintentional duplicate payments. You can also give the user an option to intentionally process a duplicate payment by incrementing the invoice number or adding xAllowDuplicate=true to the transaction request. You can see more about duplicate payment handling here.

Vendor Settings (optional)

A Vendor ID is a unique identifier associated with your vendor account. This feature is useful when you will be processing payments across multiple Cardknox accounts. It allows for specific settings to be configured on your vendor account, and these settings will be applied on transactions that include your Vendor ID in the transaction request. When using this feature, It is optimal to include your vendor ID across all transactions that you process on the Cardknox gateway.

Setup

Our support team can enable your vendor account and provide you with the ID.

Usage

To use Vendor settings, include the xVendorID = {yourvendorid} in the transactions request.

Features/Benefits

iFields key: Use a single iFields key across all your accounts.

Tokenization: Tokens can be used across accounts.

Licenses: Unlimited device licenses

Tokenization

Tokenization is the process of replacing sensitive payment data with a non-sensitive algorithm-generated string called a token (xToken). Each time you send a card or bank account number with a transaction, the response will include a token represented by xToken.

As a merchant’s PCI-compliance scope significantly increases when storing sensitive data, the best practice is to store the token in your database rather than sensitive data. You use the token for follow-up transactions.

With this approach, sensitive data will not be at risk if a data breach occurs on your local system.

Cardknox references the payment information on our servers associated with the token sent and processes the transaction. A new token will be returned on every new transaction processed.

You can reuse the original token multiple times. However, you should use the new returned token in the following scenarios:

  • If the card has a new expiration date.

  • If a response flag indicates, the card was updated/modified.

A token only stores the data sent with a transaction that is necessary to process future transactions. Tokens store the expiration date, street address, and zip code for credit card transactions. Tokens do not store customer information, such as billing or contact information, other than street address and ZIP codes, sometimes required for validation by Address Verification System (AVS).

Cardknox servers will never store the 3 or 4 digit CVV number as per PCI regulations and, in extension, is not associated with tokens.

Only when a cardholder is processing an initial transaction, with a physical card in hand, is CVV data used.

Tokens can be used only on the account it was generated on unless linked to another account via cross tokenization

You can request account linking for tokenization via Support.

The best practice is to generate tokens on one account and link all other accounts to your first account instead of generating tokens for each.

To generate a token for a payment method without processing a transaction, use the save command.

  • For credit card transactions: cc:save.

  • For check transactions: check:save.

Duplicate Handling

The Cardknox Gateway automatically blocks a transaction considered a “duplicate” of another transaction based on certain identifying features and if the transactions are within 10 minutes (default timeframe) of each other. The transaction will error with a message of: Duplicate Transaction

Identifying Features:

  • Key

  • Credit Card Number

  • Transaction Amount

  • Invoice Number

  • Check Account Number

  • Check Routing Number

You can allow the transaction to go through by changing any of the above. Alternatively, you can pass through "xAllowDuplicate = True" in the transaction request.

You can set xDuplicateWindow with the number of minutes on a transaction request to override the default 10-minute timeframe of the duplicate checker.

By default, you can set it up to 1440 (24 Hours) max. Your account can be set to allow up to 43200 (30 Days) via Support.

Batches

Each day, batch files capture all of your transactions.

Cardknox automatically “batches out” once the batch cutoff time is reached (determined by the processing bank) and sends the related transactions to the bank for settlement. A batch report is available in the Cardknox Merchant Portal.

Response Parameters

Transactions that are submitted to the Cardknox API will return a response with one or more of the fields below. Below are the standard parameters and their values. The field names in parentheses are the fileds for the reporting API.

Sandbox Account Testing Info and Triggers

A sandbox account is used to simulate transactions as if it is in production. It is designed to act exactly like a production account. However, there can sometimes be unique account setups where the production account won't match the sandbox account exactly to a T. Therefore, we recommend that you do all your testing in the sandbox account and then doing one final test when going live and swapping out your sandbox key with your production key.

Credit Card and Account Numbers

You can use any valid card number to submit transactions while using a sandbox account. The card will not actually be charged as long as you are using your sandbox key. To avoid your system unintentionally going live while still configured with your sandbox credentials, transactions in the sandbox account are limited to $10. You can bypass that limit by using the below numbers.

Triggers

The Cardknox gateway does not require developers to go through a certification process. We do provide a process to self-certify if developers choose to do so. You can download the Cardknox Self-certification Guide.

Last updated