Transaction API

Overview

The Cardknox API enables developers to process transactions via the Cardknox gateway. The API uses simple commands to make integrating with Cardknox a seamless experience.

Cardknox uses the same URL for both sandbox and live accounts and they are differentiated only by the authentication key that is used. Cardknox calls this xKey. Request a sandbox account.

The API supports Credit Card, Check (ACH), EBT, Gift Card, and Fraud Protection transactions. A web-based portal is available to search transactions, run reports, as well as other account features.

Cardknox also offers emulators for many popular gateways. Emulation enables developers to simply change the endpoint URL for systems currently integrated with 3rd-party gateways and use the existing commands supplied by those gateways, without the need for additional programming. You can find emulator endpoints here.

iFields

Cardknox’s iFields offers a secure solution for the client-side application, which significantly simplifies the PCI burden. It does so by hosting the sensitive payment fields (via iframes) so the cardholders’ sensitive payment information goes directly to our PCI DSS validated servers, while allowing you to retain full control of the look and feel of the payment flow. Using our iFields solution in conjunction with our API will allow you full flexibility while staying out of PCI scope. Click here to learn more about iFields.

Credentials

When you sign up for a Cardknox account, you will receive a sandbox xKey which is used to identify your account and enable you to perform test transactions. A separate xKey will be sent for your live account.

When sending a transaction, your Cardknox credentials xKey, name of your software xSoftwareName, version of your software xSoftwareVersion, and Cardknox API version xVersion are required on each request.

Getting started

Endpoints

Below are the endpoints URLs to send transactions to Cardknox: URL: https://x1.cardknox.com/gateway Alternate URL: https://b1.cardknox.com/gateway​

We now support both JSON and XML via the following URLs: JSON: https://x1.cardknox.com/gatewayjson XML: https://x1.cardknox.com/gatewayxml​

Request Method

Method:POST Cardknox Gateway requires POST method to be used for enhanced security. We do not support the GET method.

Credit Card

Sale

xCommand = cc:Sale

The Sale command is a combination of authorization and capture and intended when fulfilling an order right away. For transactions that are not fulfilled right away, use the authonly command initially and use the capture command to complete the sale.

The card to be charged can be communicated with 4 different approaches: xCardNum + xExp OR xMagstripe OR xToken OR SUT. Only one of these combinations can be used. Depending on a software or website’s security settings, cc:sale may also require xCVV, xStreet, or xZip and their related values.

​

Variables
Variables

Variable

Required

Description

Sample Data

xCardNum

Yes*

The customer card number. *Alternatively, xToken xMagStripe or SUT can be used.

4444333322221111

xExp

Yes*

The card expiration number. Format: MMYY. For sandbox test transactions, use any date in the future. *xExp is required when sending in xCardnum and cannot be used with xMagstripe

1249

xKey

Yes

Your Cardknox API Key.

[xkeycredentials]

xVersion

Yes

Gateway API Version. The current version is 4.5.9

4.5.9

xSoftwareName

Yes

Name of your software.

[xsoftwarecredentials]

xSoftwareVersion

Yes

Version number of your software.

[xversioncredentials]

xCommand

Yes

Cardknox transaction type.

cc:sale

xAmount

Yes

The total amount of the transaction, inclusive of tax and tip if applicable. This the total amount of the transaction.

9.99

xToken

No*

The Cardknox token that references a previously used payment method. When using a token, xCardNum xExp and xMagstripe should not be used.

61h72mmh68phn9q233634ph3g54p1499m69qhp4816pn528h84

xCustom01

No

20 custom fields are available for custom data such as customer comments, etc. Use xCustom01 through xCustom20

Register01

xCVV

No

3-digit code from the back of the card (4-digit code from the front of the card for Amex).

123

xStreet

No

The billing street address of the cardholder.

123 Any Street

xZip

No

The billing zip code of the cardholder.

11111

xMagstripe

No*

The magstripe data of a credit card. Magstripe data includes the card number and expiration date. When using this command, xCardNum xExp and xToken should not be used. Encrypted Card data can also be sent using xMagstripe

%B4444333322221111^TEST CARD/VISA^4912101123456789?;4444333322221111=4912101123456789?

xName

No

The cardholder’s name.

John Doe

xCardpresent

No

Yes, No. For use in retail environments to indicate if the card is present.

No

xDUKPT

No

The DUK/PT key for PIN Debit and EBT transactions.The first 16 characters are the encrypted pin block, followed by the 6 character long Key Set Identifier (KSID). The remaining characters are the PIN Pad serial number and transaction counter.

​

xTax

No

The tax portion that is included in the total transaction amount (xAmount).

.05

xTip

No

The tip portion that is included in the total transaction amount (xAmount).

.05

xInvoice

No

The merchant’s invoice number for the transaction. xInvoice is recommended when available for improved duplicate handling.

123456A

xPONum

No

The merchant’s purchase order number for the transaction.

123485B

xComments

No

Additional data optionally passed along to the receipt.

This is a comment

xDescription

No

Additional data optionally passed along for reporting.

This is a description

xIP

No

The customer’s IP address. Typically used for fraud detection.

1.1.1.1

xEmail

No

The customer’s email address.

​[email protected]​

xFax

No

The customer’s fax number.

8885551212

xBillFirstName

No

The customer’s first name for their billing profile.

John

xBillMiddleName

No

The customer’s middle name or initial for their billing profile.

Max

xBillLastName

No

The customer’s last/family name for their billing profile.

Doe

xBillCompany

No

The customer’s company name for their billing profile.

Acme

xBillStreet

No

The customer’s street address for their billing profile.

123 Any Street

xBillStreet2

No

The customer’s street address 2nd line for their billing profile.

Apt 4b

xBillCity

No

The customer’s city for their billing profile.

Anytown

xBillState

No

The customer’s state for their billing profile.

NY

xBillZip

No

The customer’s zip code for their billing profile.

12345

xBillCountry

No

The customer’s Country for their billing profile.

USA

xBillPhone

No

The customer’s phone number for their billing profile.

8005551212

xBillMobile

No

The customer’s mobile number for their billing profile.

8005551111

xShipFirstName

No

The customer’s first name for their shipping profile.

John

xShipMiddleName

No

The customer’s middle name or initial for their shipping profile.

Max

xShipLastName

No

The customer’s last/family name for their shipping profile.

Doe

xShipCompany

No

The customer’s company name for their shipping profile.

Acme

xShipStreet

No

The customer’s street address for their shipping profile.

123 Any Street

xShipStreet2

No

The customer’s street address 2nd line for their shipping profile.

Apt 4b

xShipCity

No

The customer’s city for their shipping profile.

Anytown

xShipState

No

The customer’s state for their shipping profile.

NY

xShipZip

No

The customer’s zip code for their shipping profile.

11111

xShipCountry

No

The customer’s Country for their shipping profile.

USA

xShipPhone

No

The customer’s phone number for their shipping profile.

8005551212

xShipMobile

No

The customer’s mobile number for their shipping profile.

8005551111

xAllowPartialAuth

No

True/False value indicating if an authorization amount is less than the initial request when full initial amount is unavailable. This variable is platform-dependent. Default is false.

True

xRxAmount

No

Specifies qualifying prescription amount for FSA transactions. xAllowPartialAuth must be set to True.

1.50

xDentalAmount

No

Specifies qualifying dental amount for FSA transactions. xAllowPartialAuth must be set to True.

1.50

xVisionAmount

No

Specifies qualifying vision amount for FSA transactions. xAllowPartialAuth must be set to True.

1.50

xTransitAmount

No

Specifies qualifying transit amount for commuter card transactions. xAllowPartialAuth must be set to True.

1.50

xCopayAmount

No

Specifies copay amount for FSA transactions. xAllowPartialAuth must be set to True.

1.50

xClinicalAmount

No

Specifies qualifying clinical amount for FSA transactions. xAllowPartialAuth must be set to True.

1.50

xOrderID

No

Unique Order Number for FraudWatch verification.

12356

xExistingCustomer

No

Yes/No value indicating if customer is a repeat customer.

No

xAllowDuplicate

No

By default, Cardknox rejects duplicate transactions within 10 minutes of the original transaction. This command overrides that safeguard. True/False allowed.

True

xCustReceipt

No

True/False value indicating if the email address specificied in xemail should receive a receipt containing the transaction details.

False

xCurrency

No

Used to specify an alternate currency. Only applicable for accounts that are using Multi-Currency Conversion (MCC). For accounts that are natively in a foreign currency, the currency does not need to be specified. (See list of all supported currencies)

CAD

AuthOnly

xCommand = cc:AuthOnly

The AuthOnly command authorizes an amount on a cardholder’s account and places a hold on the available credit for that amount, but does not submit the charge for settlement. AuthOnly is used to reserve funds from a cardholder’s credit limit for a sale that is not ready to be processed. AuthOnly is commonly used when an order is placed on a website prior to the order being shipped or when a customer makes a hotel or car rental reservation. If the authorization amount exceeds the cardholder’s available credit, a rejected response will be returned. When successful, the authorization number is returned as RefNum and can be used to reference the authorization for a follow-up transaction. The funds will remain held until the authorization is either captured, voided, or expires. To settle an AuthOnly transaction and complete the sale, use the capture command. If an AuthOnly transaction is captured after 24 hours, it may be subject to a higher processing rate by the acquiring bank.

An AuthOnly hold only reduces the cardholder’s credit limit, but will not appear as a charge on their account. If the authorization will not be converted to a charge, Void Release can be used to release the hold prior to the expiration. The expiration timeframe varies by the issuer but is typically 7-30 days for credit cards and 3-5 days for debit cards.

Variables
Variables

Variable

Required

Description

Sample Data

xCardNum

Yes*

The customer card number. *Alternatively, xToken xMagStripe or SUT can be used.

4444333322221111

xExp

Yes*

The card expiration number. Format: MMYY. For sandbox test transactions, use any date in the future. *xExp is required when sending in xCardnum and cannot be used with xMagstripe

1249

xKey

Yes

Your Cardknox API Key.

[xkeycredentials]

xVersion

Yes

Gateway API Version. The current version is 4.5.9

4.5.9

xSoftwareName

Yes

Name of your software.

[xsoftwarecredentials]

xSoftwareVersion

Yes

Version number of your software.

[xversioncredentials]

xCommand

Yes

Cardknox transaction type.

cc:authonly

xAmount

Yes

The total amount of the transaction, inclusive of tax and tip if applicable. This the total amount of the transaction.

9.99

xToken

No*

The Cardknox token that references a previously used payment method. When using a token, xCardNum xExp and xMagstripe should not be used.

61h72mmh68phn9q233634ph3g54p1499m69qhp4816pn528h84

xCustom01

No

20 custom fields are available for custom data such as customer comments, etc. Use xCustom01 through xCustom20

Register01

xCVV

No

3-digit code from the back of the card (4-digit code from the front of the card for Amex).

123

xStreet

No

The billing street address of the cardholder.

123 Any Street

xZip

No

The billing zip code of the cardholder.

11111

xMagstripe

No*

The magstripe data of a credit card. Magstripe data includes the card number and expiration date. When using this command, xCardNum xExp and xToken should not be used. Encrypted Card data can also be sent using xMagstripe

%B4444333322221111^TEST CARD/VISA^4912101123456789?;4444333322221111=4912101123456789?

xName

No

The cardholder’s name.

John Doe

xCardpresent

No

Yes, No. For use in retail environments to indicate if the card is present.

No

xDUKPT

No

The DUK/PT key for PIN Debit and EBT transactions.The first 16 characters are the encrypted pin block, followed by the 6 character long Key Set Identifier (KSID). The remaining characters are the PIN Pad serial number and transaction counter.

​

xTax

No

The tax portion that is included in the total transaction amount (xAmount).

.05

xTip

No

The tip portion that is included in the total transaction amount (xAmount).

.05

xInvoice

No

The merchant’s invoice number for the transaction. xInvoice is recommended when available for improved duplicate handling.

123456A

xPONum

No

The merchant’s purchase order number for the transaction.

123485B

xComments

No

Additional data optionally passed along to the receipt.

This is a comment

xDescription

No

Additional data optionally passed along for reporting.

This is a description

xIP

No

The customer’s IP address. Typically used for fraud detection.

1.1.1.1

xEmail

No

The customer’s email address.

​[email protected]​

xFax

No

The customer’s fax number.

8885551212

xBillFirstName

No

The customer’s first name for their billing profile.

John

xBillMiddleName

No

The customer’s middle name or initial for their billing profile.

Max

xBillLastName

No

The customer’s last/family name for their billing profile.

Doe

xBillCompany

No

The customer’s company name for their billing profile.

Acme

xBillStreet

No

The customer’s street address for their billing profile.

123 Any Street

xBillStreet2

No

The customer’s street address 2nd line for their billing profile.

Apt 4b

xBillCity

No

The customer’s city for their billing profile.

Anytown

xBillState

No

The customer’s state for their billing profile.

NY

xBillZip

No

The customer’s zip code for their billing profile.

11111

xBillCountry

No

The customer’s Country for their billing profile.

USA

xBillPhone

No

The customer’s phone number for their billing profile.

8005551212

xBillMobile

No

The customer’s mobile number for their billing profile.

8005551111

xShipFirstName

No

The customer’s first name for their shipping profile.

John

xShipMiddleName

No

The customer’s middle name or initial for their shipping profile.

Max

xShipLastName

No

The customer’s last/family name for their shipping profile.

Doe

xShipCompany

No

The customer’s company name for their shipping profile.

Acme

xShipStreet

No

The customer’s street address for their shipping profile.

123 Any Street

xShipStreet2

No

The customer’s street address 2nd line for their shipping profile.

Apt 4b

xShipCity

No

The customer’s city for their shipping profile.

Anytown

xShipState

No

The customer’s state for their shipping profile.

NY

xShipZip

No

The customer’s zip code for their shipping profile.

11111

xShipCountry

No

The customer’s Country for their shipping profile.

USA

xShipPhone

No

The customer’s phone number for their shipping profile.

8005551212

xShipMobile

No

The customer’s mobile number for their shipping profile.

8005551111

xAllowPartialAuth

No

True/False value indicating if an authorization amount is less than the initial request when full initial amount is unavailable. This variable is platform-dependent. Default is false.

True

xAutoRentalPickupDate

No*

Specific date for customer to pick up vehicle.

*Note: This field is required only for the auto rental industry.

2020-08-21

xAutoRentalPickupTime

No*

Specific time for customer to pick up vehicle.

*Note: This field is required only for the auto rental industry.

11:15:00

xAutoRentalReturnDate

No*

Specific date for customer to return vehicle.

*Note: This field is required only for the auto rental industry.

2020-08-21

xAutoRentalReturnTime

No*

Specific time for customer to return vehicle.

*Note: This field is required only for the auto rental industry.

11:15:00

xRxAmount

No

Specifies qualifying prescription amount for FSA transactions. xAllowPartialAuth must be set to True.

1.50

xDentalAmount

No

Specifies qualifying dental amount for FSA transactions. xAllowPartialAuth must be set to True.

1.50

xVisionAmount

No

Specifies qualifying vision amount for FSA transactions. xAllowPartialAuth must be set to True.

1.50

xTransitAmount

No

Specifies qualifying transit amount for commuter card transactions. xAllowPartialAuth must be set to True.

1.50

xCopayAmount

No

Specifies copay amount for FSA transactions. xAllowPartialAuth must be set to True.

1.50

xClinicalAmount

No

Specifies qualifying clinical amount for FSA transactions. xAllowPartialAuth must be set to True.

1.50

xOrderID

No

Unique Order Number for FraudWatch verification.

12356

xAllowDuplicate

No

By default, Cardknox rejects duplicate transactions within 10 minutes of the original transaction. This command overrides that safeguard. True/False allowed.

True

xCustReceipt

No

True/False value indicating if the email address specificied in xemail should receive a receipt containing the transaction details.

False

xCurrency

No

Used to specify an alternate currency. Only applicable for accounts that are using Multi-Currency Conversion (MCC). For accounts that are natively in a foreign currency, the currency does not need to be specified. (See list of all supported currencies)

CAD

Capture

xCommand = cc:Capture The Capture command is used to settle funds from a previous authorization and withdraw the funds from the cardholder’s account. The RefNumber from related authorization is required when submitting a Capture request. To perform an authorization and capture in the same command, use the Sale command.

Variables
Variables

Variable

Required

Description

Sample Data

xKey

Yes

Your Cardknox API Key.

[xkeycredentials]

xVersion

Yes

Gateway API Version. The current version is 4.5.9

4.5.9

xSoftwareName

Yes

Name of your software.

[xsoftwarecredentials]

xSoftwareVersion

Yes

Version number of your software.

[xversioncredentials]

xCommand

Yes

Cardknox transaction type.

cc:capture

xAmount

No

The total amount of the transaction, inclusive of tax and tip if applicable. This the total amount of the transaction.

9.99

xCustom01

No

20 custom fields are available for custom data such as customer comments, etc. Use xCustom01 through xCustom20

Register01

xStreet

No

The billing street address of the cardholder.

123 Any Street

xZip

No

The billing zip code of the cardholder.

11111

xRefNum

Yes

Used to reference a previous transaction when doing a follow-up transaction, typically a refund, void, or capture. (Note: xRefnum can be a 64-bit number and should be stored as BIGINT, Long, Int64 or String)

81234568

xName

No

The cardholder’s name.

John Doe

xCardpresent

No

Yes, No. For use in retail environments to indicate if the card is present.

No

xTax

No

The tax portion that is included in the total transaction amount (xAmount).

.05

xTip

No

The tip portion that is included in the total transaction amount (xAmount).

.05

xInvoice

No

The merchant’s invoice number for the transaction. xInvoice is recommended when available for improved duplicate handling.

123456A

xPONum

No

The merchant’s purchase order number for the transaction.

123485B

xComments

No

Additional data optionally passed along to the receipt.

This is a comment

xDescription

No

Additional data optionally passed along for reporting.

This is a description

xIP

No

The customer’s IP address. Typically used for fraud detection.

1.1.1.1

xEmail

No

The customer’s email address.

​[email protected]​

xFax

No

The customer’s fax number.

8885551212

xBillFirstName

No

The customer’s first name for their billing profile.

John

xBillMiddleName

No

The customer’s middle name or initial for their billing profile.

Max

xBillLastName

No

The customer’s last/family name for their billing profile.

Doe

xBillCompany

No

The customer’s company name for their billing profile.

Acme

xBillStreet

No

The customer’s street address for their billing profile.

123 Any Street

xBillStreet2

No

The customer’s street address 2nd line for their billing profile.

Apt 4b

xBillCity

No

The customer’s city for their billing profile.

Anytown

xBillState

No

The customer’s state for their billing profile.

NY

xBillZip

No

The customer’s zip code for their billing profile.

11111

xBillCountry

No

The customer’s Country for their billing profile.

USA

xBillPhone

No

The customer’s phone number for their billing profile.

8005551212

xBillMobile

No

The customer’s mobile number for their billing profile.

8005551111

xShipFirstName

No

The customer’s first name for their shipping profile.

John

xShipMiddleName

No

The customer’s middle name or initial for their shipping profile.

Max

xShipLastName

No

The customer’s last/family name for their shipping profile.

Doe

xShipCompany

No

The customer’s company name for their shipping profile.

Acme

xShipStreet

No

The customer’s street address for their shipping profile.

123 Any Street

xShipStreet2

No

The customer’s street address 2nd line for their shipping profile.

Apt 4b

xShipCity

No

The customer’s city for their shipping profile.

Anytown

xShipState

No

The customer’s state for their shipping profile.

NY

xShipZip

No

The customer’s zip code for their shipping profile.

11111

xShipCountry

No

The customer’s Country for their shipping profile.

USA

xShipPhone

No

The customer’s phone number for their shipping profile.

8005551212

xShipMobile

No

The customer’s mobile number for their shipping profile.

8005551111

xAllowDuplicate

No

By default, Cardknox rejects duplicate transactions within 10 minutes of the original transaction. This command overrides that safeguard. True/False allowed.

True

xCustReceipt

No

True/False value indicating if the email address specificied in xemail should receive a receipt containing the transaction details.

False

Adjust

xCommand = cc:Adjust You can use the Adjust command to update certain fields on a transaction, such as xOrderID. This action will not reprocess the transaction, but will only update the information. However, you can only update the xAmount, xTax, and xTip fields on an authorization before it is captured; you cannot change these fields on a transaction that was already processed.

​

Variable

Required

Description

Sample Data

xKey

Yes

Your Cardknox API Key.

[xkeycredentials]

xVersion

Yes

Gateway API Version. The current version is 4.5.9

4.5.9

xSoftwareName

Yes

Name of your software.

[xsoftwarecredentials]

xSoftwareVersion

Yes

Version number of your software.

[xversioncredentials]

xCommand

Yes

Cardknox transaction type.

cc:adjust

xAmount

Yes

The total amount of the transaction, inclusive of tax and tip if applicable. This the total amount of the transaction.

9.99

xCustom01 – xCustom03

No

Custom fields available for custom data such as customer comments, etc.

Register01

xStreet

No

The billing street address of the cardholder.

123 Any Street

xZip

No

The billing zip code of the cardholder.

11111

xRefNum

Yes*

The xRefNum from the related authorization is required when submitting an Adjust transaction.

Used to reference a previous transaction when doing a follow-up transaction, typically a refund, void, or capture. (Note: xRefnum can be a 64-bit number and should be stored as BIGINT, Long, Int64 or String)

81234568

xName

No

The cardholder’s name.

John Doe

xDescription

No

Additional data optionally passed along for reporting.

Transaction description

xOrderID

No

Unique Order Number for FraudWatch verification.

12356

xTip

No

The tip portion that is included in the total transaction amount (xAmount).

.05

xTax

No

The tax portion that is included in the total transaction amount (xAmount).

.05

xSignature

No

The Base 64 encoded customer signature.

​

xInvoice

No

The merchant’s invoice number for the transaction. xInvoice is recommended when available for improved duplicate handling.

123456A

Save

xCommand = cc:Save The Save command is used to send account information and request a token from Cardknox, but does not submit the transaction for processing. The response returns a token which references that account information. A token at a minimum references the credit card number, but if other data is sent, such as billing address, that will be associated with the token as well.

Variable

Required

Description

Sample Data

xCardNum

Yes*

The customer card number. *Alternatively, xToken xMagStripe or SUT can be used.

4444333322221111

xExp

Yes*

The card expiration number. Format: MMYY. For sandbox test transactions, use any date in the future. *xExp is required when sending in xCardnum and cannot be used with xMagstripe

1249

xKey

Yes

Your Cardknox API Key.

[xkeycredentials]

xVersion

Yes

Gateway API Version. The current version is 4.5.9

4.5.9

xSoftwareName

Yes

Name of your software.

[xsoftwarecredentials]

xSoftwareVersion

Yes

Version number of your software.

[xversioncredentials]

xCommand

Yes

Cardknox transaction type.

cc:save

xCustom01

No

20 custom fields are available for custom data such as customer comments, etc. Use xCustom01 through xCustom20

Register01

xStreet

No

The billing street address of the cardholder.

123 Any Street

xZip

No

The billing zip code of the cardholder.

11111

xMagstripe

No*

The magstripe data of a credit card. Magstripe data includes the card number and expiration date. When using this command, xCardNum xExp and xToken should not be used. Encrypted Card data can also be sent using xMagstripe

%B4444333322221111^TEST CARD/VISA^4912101123456789?;4444333322221111=4912101123456789?

xName

No

The cardholder’s name.

John Doe

xIP

No

The customer’s IP address. Typically used for fraud detection.

1.1.1.1

PostAuth

xCommand = cc:PostAuth Some authorizations will require a voice authorization before they can be approved. When a verbal authorization is issued by the bank, that number can be sent with the PostAuth command to verify the authorization.

Variable

Required

Description

Sample Data

xCardNum

Yes*

The customer card number. *Alternatively, xToken xMagStripe or SUT can be used.

4444333322221111

xExp

Yes*

The card expiration number. Format: MMYY. For sandbox test transactions, use any date in the future. *xExp is required when sending in xCardnum and cannot be used with xMagstripe

1249

xKey

Yes

Your Cardknox API Key.

[xkeycredentials]

xVersion

Yes

Gateway API Version. The current version is 4.5.9

4.5.9

xSoftwareName

Yes

Name of your software.

[xsoftwarecredentials]

xSoftwareVersion

Yes

Version number of your software.

[xversioncredentials]

xCommand

Yes

Cardknox transaction type.

cc:postauth

xAmount

Yes

The total amount of the transaction, inclusive of tax and tip if applicable. This the total amount of the transaction.

9.99

xToken

No*

The Cardknox token that references a previously used payment method. When using a token, xCardNum xExp and xMagstripe should not be used.

61h72mmh68phn9q233634ph3g54p1499m69qhp4816pn528h84

xCustom01

No

20 custom fields are available for custom data such as customer comments, etc. Use xCustom01 through xCustom20

Register01

xCVV

No

3-digit code from the back of the card (4-digit code from the front of the card for Amex).

123

xStreet

No

The billing street address of the cardholder.

123 Any Street

xZip

No

The billing zip code of the cardholder.

11111

xAuthCode

Yes

xAuthCode is a verificaton number provided by the issuing bank to be used with the cc:postauth command.

T4321A

xMagstripe

No*

The magstripe data of a credit card. Magstripe data includes the card number and expiration date. When using this command, xCardNum xExp and xToken should not be used. Encrypted Card data can also be sent using xMagstripe

%B4444333322221111^TEST CARD/VISA^4912101123456789?;4444333322221111=4912101123456789?

xName

No

The cardholder’s name.

John Doe

xCardpresent

No

Yes, No. For use in retail environments to indicate if the card is present.

No

xDUKPT

No

The DUK/PT key for PIN Debit and EBT transactions.The first 16 characters are the encrypted pin block, followed by the 6 character long Key Set Identifier (KSID). The remaining characters are the PIN Pad serial number and transaction counter.

​

xTax

No

The tax portion that is included in the total transaction amount (xAmount).

.05

xTip

No

The tip portion that is included in the total transaction amount (xAmount).

.05

xInvoice

No

The merchant’s invoice number for the transaction. xInvoice is recommended when available for improved duplicate handling.

123456A

xPONum

No

The merchant’s purchase order number for the transaction.

123485B

xComments

No

Additional data optionally passed along to the receipt.

This is a comment

xDescription

No

Additional data optionally passed along for reporting.

This is a description

xIP

No

The customer’s IP address. Typically used for fraud detection.

1.1.1.1

xEmail

No

The customer’s email address.

​[email protected]​

xFax

No

The customer’s fax number.

8885551212

xBillFirstName

No

The customer’s first name for their billing profile.

John

xBillMiddleName

No

The customer’s middle name or initial for their billing profile.

Max

xBillLastName

No

The customer’s last/family name for their billing profile.

Doe

xBillCompany

No

The customer’s company name for their billing profile.

Acme

xBillStreet

No

The customer’s street address for their billing profile.

123 Any Street

xBillStreet2

No

The customer’s street address 2nd line for their billing profile.

Apt 4b

xBillCity

No

The customer’s city for their billing profile.

Anytown

xBillState

No

The customer’s state for their billing profile.

NY

xBillZip

No

The customer’s zip code for their billing profile.

11111

xBillCountry

No

The customer’s Country for their billing profile.

USA

xBillPhone

No

The customer’s phone number for their billing profile.

8005551212

xBillMobile

No

The customer’s mobile number for their billing profile.

8005551111

xShipFirstName

No

The customer’s first name for their shipping profile.

John

xShipMiddleName

No

The customer’s middle name or initial for their shipping profile.

Max

xShipLastName

No

The customer’s last/family name for their shipping profile.

Doe

xShipCompany

No

The customer’s company name for their shipping profile.

Acme

xShipStreet

No

The customer’s street address for their shipping profile.

123 Any Street

xShipStreet2

No

The customer’s street address 2nd line for their shipping profile.

Apt 4b

xShipCity

No

The customer’s city for their shipping profile.

Anytown

xShipState

No

The customer’s state for their shipping profile.

NY

xShipZip

No

The customer’s zip code for their shipping profile.

11111

xShipCountry

No

The customer’s Country for their shipping profile.

USA

xShipPhone

No

The customer’s phone number for their shipping profile.

8005551212

xShipMobile

No

The customer’s mobile number for their shipping profile.

8005551111

xAllowPartialAuth

No

True/False value indicating if an authorization amount is less than the initial request when full initial amount is unavailable. This variable is platform-dependent. Default is false.

True

xRxAmount

No

Specifies qualifying prescription amount for FSA transactions. xAllowPartialAuth must be set to True.

1.50

xDentalAmount

No

Specifies qualifying dental amount for FSA transactions. xAllowPartialAuth must be set to True.

1.50

xVisionAmount

No

Specifies qualifying vision amount for FSA transactions. xAllowPartialAuth must be set to True.

1.50

xTransitAmount

No

Specifies qualifying transit amount for commuter card transactions. xAllowPartialAuth must be set to True.

1.50

xCopayAmount

No

Specifies copay amount for FSA transactions. xAllowPartialAuth must be set to True.

1.50

xClinicalAmount

No

Specifies qualifying clinical amount for FSA transactions. xAllowPartialAuth must be set to True.

1.50

xOrderID

No

Unique Order Number for FraudWatch verification.

12356

xExistingCustomer

No

Yes/No value indicating if customer is a repeat customer.

No

xAllowDuplicate

No

By default, Cardknox rejects duplicate transactions within 10 minutes of the original transaction. This command overrides that safeguard. True/False allowed.

True

xCurrency

No

Used to specify an alternate currency. Only applicable for accounts that are using Multi-Currency Conversion (MCC). For accounts that are natively in a foreign currency, the currency does not need to be specified. (See list of all supported currencies)

CAD

Credit

xCommand = cc:Credit The Credit command refunds money from a merchant to a cardholder’s card that is not linked to any previous transaction.

Variable

Required

Description

Sample Data

xCardNum

Yes*

The customer card number. *Alternatively, xToken xMagStripe or SUT can be used.

4444333322221111

xExp

Yes*

The card expiration number. Format: MMYY. For sandbox test transactions, use any date in the future. *xExp is required when sending in xCardnum and cannot be used with xMagstripe

1249

xKey

Yes

Your Cardknox API Key.

[xkeycredentials]

xVersion

Yes

Gateway API Version. The current version is 4.5.9

4.5.9

xSoftwareName

Yes

Name of your software.

[xsoftwarecredentials]

xSoftwareVersion

Yes

Version number of your software.

[xversioncredentials]

xCommand

Yes

Cardknox transaction type.

cc:credit

xAmount

Yes

The total amount of the transaction, inclusive of tax and tip if applicable. This the total amount of the transaction.

9.99

xToken

No*

The Cardknox token that references a previously used payment method. When using a token, xCardNum xExp and xMagstripe should not be used.

61h72mmh68phn9q233634ph3g54p1499m69qhp4816pn528h84

xCustom01

No

20 custom fields are available for custom data such as customer comments, etc. Use xCustom01 through xCustom20

Register01

xCVV

No

3-digit code from the back of the card (4-digit code from the front of the card for Amex).

123

xStreet

No

The billing street address of the cardholder.

123 Any Street

xZip

No

The billing zip code of the cardholder.

11111

xMagstripe

No*

The magstripe data of a credit card. Magstripe data includes the card number and expiration date. When using this command, xCardNum xExp and xToken should not be used. Encrypted Card data can also be sent using xMagstripe

%B4444333322221111^TEST CARD/VISA^4912101123456789?;4444333322221111=4912101123456789?

xName

No

The cardholder’s name.

John Doe

xCardpresent

No

Yes, No. For use in retail environments to indicate if the card is present.

No

xDUKPT

No

The DUK/PT key for PIN Debit and EBT transactions.The first 16 characters are the encrypted pin block, followed by the 6 character long Key Set Identifier (KSID). The remaining characters are the PIN Pad serial number and transaction counter.

​

xTax

No

The tax portion that is included in the total transaction amount (xAmount).

.05

xTip

No

The tip portion that is included in the total transaction amount (xAmount).

.05

xInvoice

No

The merchant’s invoice number for the transaction. xInvoice is recommended when available for improved duplicate handling.

123456A

xPONum

No

The merchant’s purchase order number for the transaction.

123485B

xComments

No

Additional data optionally passed along to the receipt.

This is a comment

xDescription

No

Additional data optionally passed along for reporting.

This is a description

xIP

No

The customer’s IP address. Typically used for fraud detection.

1.1.1.1

xEmail

No

The customer’s email address.

​[email protected]​

xFax

No

The customer’s fax number.

8885551212

xBillFirstName

No

The customer’s first name for their billing profile.

John

xBillMiddleName

No

The customer’s middle name or initial for their billing profile.

Max

xBillLastName

No

The customer’s last/family name for their billing profile.

Doe

xBillCompany

No

The customer’s company name for their billing profile.

Acme

xBillStreet

No

The customer’s street address for their billing profile.

123 Any Street

xBillStreet2

No

The customer’s street address 2nd line for their billing profile.

Apt 4b

xBillCity

No

The customer’s city for their billing profile.

Anytown

xBillState

No

The customer’s state for their billing profile.

NY

xBillZip

No

The customer’s zip code for their billing profile.

11111

xBillCountry

No

The customer’s Country for their billing profile.

USA

xBillPhone

No

The customer’s phone number for their billing profile.

8005551212

xBillMobile

No

The customer’s mobile number for their billing profile.

8005551111

xShipFirstName

No

The customer’s first name for their shipping profile.

John

xShipMiddleName

No

The customer’s middle name or initial for their shipping profile.

Max

xShipLastName

No

The customer’s last/family name for their shipping profile.

Doe

xShipCompany

No

The customer’s company name for their shipping profile.

Acme

xShipStreet

No

The customer’s street address for their shipping profile.

123 Any Street

xShipStreet2

No

The customer’s street address 2nd line for their shipping profile.

Apt 4b

xShipCity

No

The customer’s city for their shipping profile.

Anytown

xShipState

No

The customer’s state for their shipping profile.

NY

xShipZip

No

The customer’s zip code for their shipping profile.

11111

xShipCountry

No

The customer’s Country for their shipping profile.

USA

xShipPhone

No

The customer’s phone number for their shipping profile.

8005551212

xShipMobile

No

The customer’s mobile number for their shipping profile.

8005551111

xOrderID

No

Unique Order Number for FraudWatch verification.

12356

xExistingCustomer

No

Yes/No value indicating if customer is a repeat customer.

No

xAllowDuplicate

No

By default, Cardknox rejects duplicate transactions within 10 minutes of the original transaction. This command overrides that safeguard. True/False allowed.

True

xCustReceipt

No

True/False value indicating if the email address specificied in xemail should receive a receipt containing the transaction details.

False

xCurrency

No

Used to specify an alternate currency. Only applicable for accounts that are using Multi-Currency Conversion (MCC). For accounts that are natively in a foreign currency, the currency does not need to be specified. (See list of all supported currencies)

CAD

Refund

xCommand = cc:Refund The Refund command is used to refund a full or partial amount of a previous transaction using xRefNum. Partial check refunds aren’t currently supported.

Variable

Required

Description

Sample Data

xKey

Yes

Your Cardknox API Key.

[xkeycredentials]

xVersion

Yes

Gateway API Version. The current version is 4.5.9

4.5.9

xSoftwareName

Yes

Name of your software.

[xsoftwarecredentials]

xSoftwareVersion

Yes

Version number of your software.

[xversioncredentials]

xCommand

Yes

Cardknox transaction type.

cc:refund

xAmount

Yes

Refund amount. Can be equal or less than original transaction.

9.99

xCustom01

No

20 custom fields are available for custom data such as customer comments, etc. Use xCustom01 through xCustom20

Register01

xRefNum

Yes

Used to reference a previous transaction when doing a follow-up transaction, typically a refund, void, or capture. (Note: xRefnum can be a 64-bit number and should be stored as BIGINT, Long, Int64 or String)

81234568

xDescription

No

Additional data optionally passed along for reporting.

This is a description

xAllowDuplicate

No

By default, Cardknox rejects duplicate transactions within 10 minutes of the original transaction. This command overrides that safeguard. True/False allowed.

True

xCustReceipt

No

True/False value indicating if the email address specificied in xemail should receive a receipt containing the transaction details.

False

Void Refund

xCommand = cc:VoidRefund

The VoidRefund command will either void the pending transaction if it has not settled yet, or it will fully refund the transaction if it has already settled.

Variable

Required

Description

Sample Data

xKey

Yes

Your Cardknox API Key.

[xkeycredentials]

xVersion

Yes

Gateway API Version. The current version is 4.5.9

4.5.9

xSoftwareName

Yes

Name of your software.

[xsoftwarecredentials]

xSoftwareVersion

Yes

Version number of your software.

[xversioncredentials]

xCommand

Yes

Cardknox transaction type.

cc:voidrefund

xCustom01

No

20 custom fields are available for custom data such as customer comments, etc. Use xCustom01 through xCustom20

Register01

xRefNum

Yes

Used to reference a previous transaction when doing a follow-up transaction, typically a refund, void, or capture. (Note: xRefnum can be a 64-bit number and should be stored as BIGINT, Long, Int64 or String)

81234568

Void Release

xCommand = cc:VoidRelease The Void Release command releases a pending authorization amount back to the cardholder’s credit limit without waiting for the standard authorization timeframe to expire.

Variable

Required

Description

Sample Data

xKey

Yes

Your Cardknox API Key.

[xkeycredentials]

xVersion

Yes

Gateway API Version. The current version is 4.5.9

4.5.9

xSoftwareName

Yes

Name of your software.

[xsoftwarecredentials]

xSoftwareVersion

Yes

Version number of your software.

[xversioncredentials]

xCommand

Yes

Cardknox transaction type.

cc:voidrelease

xCustom01

No

20 custom fields are available for custom data such as customer comments, etc. Use xCustom01 through xCustom20

Register01

xRefNum

Yes

Used to reference a previous transaction when doing a follow-up transaction, typically a refund, void, or capture. (Note: xRefnum can be a 64-bit number and should be stored as BIGINT, Long, Int64 or String)

81234568

Void

xCommand = cc:Void The Void command voids a transaction that has not yet settled using xRefNum.

Variable

Required

Description

Sample Data

xKey

Yes

Your Cardknox API Key.

[xkeycredentials]

xVersion

Yes

Gateway API Version. The current version is 4.5.9

4.5.9

xSoftwareName

Yes

Name of your software.

[xsoftwarecredentials]

xSoftwareVersion

Yes

Version number of your software.

[xversioncredentials]

xCommand

Yes

Cardknox transaction type.

cc:void

xCustom01

No

20 custom fields are available for custom data such as customer comments, etc. Use xCustom01 through xCustom20

Register01

xRefNum

Yes

Used to reference a previous transaction when doing a follow-up transaction, typically a refund, void, or capture. (Note: xRefnum can be a 64-bit number and should be stored as BIGINT, Long, Int64 or String)

81234568

Check (ACH)

Sale

xCommand = check:Sale The Check Sale command debits funds from a customer’s checking or savings account using one of the following options:

  • xAccount and xRouting parameters

  • xCheckImageFront, xCheckImageRear, and xMICR parameters

The merchant must have a supported Check/ACH processing account to use either of these options.

​

Variable

Required

Description

Sample Data

xKey

Yes

Your Cardknox API Key.

[xkeycredentials]

xVersion

Yes

Gateway API Version. The current version is 4.5.9

4.5.9

xSoftwareName

Yes

Name of your software.

[xsoftwarecredentials]

xSoftwareVersion

Yes

Version number of your software.

[xversioncredentials]

xCommand

Yes

Cardknox transaction type.

check:sale

xAmount

Yes

The total amount of the transaction, inclusive of tax and tip if applicable. This the total amount of the transaction.

9.99

xToken

No*

The Cardknox token that references a previously used payment method. When using a token, xCardNum xExp and xMagstripe should not be used.

61h72mmh68phn9q233634ph3g54p1499m69qhp4816pn528h84

xCustom01

No

20 custom fields are available for custom data such as customer comments, etc. Use xCustom01 through xCustom20

Register01

xRouting

Yes*

The check ABA Routing number.

021202337

xAccount

Yes*

The check Account number.

1234567890

xName

Yes

Name on account

John Doe

xTax

No

The tax portion that is included in the total transaction amount (xAmount).

.05

xTip

No

The tip portion that is included in the total transaction amount (xAmount).

.05

xInvoice

No

The merchant’s invoice number for the transaction. xInvoice is recommended when available for improved duplicate handling.

123456A

xPONum

No

The merchant’s purchase order number for the transaction.

123485B

xComments

No

Additional data optionally passed along to the receipt.

This is a comment

xDescription

No

Additional data optionally passed along for reporting.

This is a description

xIP

No

The customer’s IP address. Typically used for fraud detection.

1.1.1.1

xEmail

No

The customer’s email address.

​[email protected]​

xFax

No

The customer’s fax number.

8885551212

xBillFirstName

No

The customer’s first name for their billing profile.

John

xBillMiddleName

No

The customer’s middle name or initial for their billing profile.

Max

xBillLastName

No

The customer’s last/family name for their billing profile.

Doe

xBillCompany

No

The customer’s company name for their billing profile.

Acme

xBillStreet

No

The customer’s street address for their billing profile.

123 Any Street

xBillStreet2

No

The customer’s street address 2nd line for their billing profile.

Apt 4b

xBillCity

No

The customer’s city for their billing profile.

Anytown

xBillState

No

The customer’s state for their billing profile.

NY

xBillZip

No

The customer’s zip code for their billing profile.

11111

xBillCountry

No

The customer’s Country for their billing profile.

USA

xBillPhone

No

The customer’s phone number for their billing profile.

8005551212

xBillMobile

No

The customer’s mobile number for their billing profile.

8005551111

xShipFirstName

No

The customer’s first name for their shipping profile.

John

xShipMiddleName

No

The customer’s middle name or initial for their shipping profile.

Max

xShipLastName

No

The customer’s last/family name for their shipping profile.

Doe

xShipCompany

No

The customer’s company name for their shipping profile.

Acme

xShipStreet

No

The customer’s street address for their shipping profile.

123 Any Street

xShipStreet2

No

The customer’s street address 2nd line for their shipping profile.

Apt 4b

xShipCity

No

The customer’s city for their shipping profile.

Anytown

xShipState

No

The customer’s state for their shipping profile.

NY

xShipZip

No

The customer’s zip code for their shipping profile.

11111

xShipCountry

No

The customer’s Country for their shipping profile.

USA

xShipPhone

No

The customer’s phone number for their shipping profile.

8005551212

xShipMobile

No

The customer’s mobile number for their shipping profile.

8005551111

xMICR

No

The routing, account and check number data from the bottom of a check in MICR (Magnetic Ink Character Recognition) format, typically generated by a check scanner.

t021000021t 123456789o _2542

xCheckNum

No

The Check number.

999

xCheckImageFront

No

The front image of the check, in Base 64 encoded image format.

data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAYEBAQFBAYFBQYJBgUGCQsIBgYICwwKCgsKCgwQDAwMDAwMEAwODxAPDgwTExQUExMcGxsbHCAgICAgICAgICD/2wBDAQcHBw0MDRgQEBgaFREVGiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICD/wAARCAABAAEDAREAAhEBAxEB/8QAFAABAAAAAAAAAAAAAAAAAAAACP/EABQQAQAAAAAAAAAAAAAAAAAAAAD/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AVIP/2Q==

xCheckImageRear

No

The back image of the check, in Base 64 encoded image format.

data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAYEBAQFBAYFBQYJBgUGCQsIBgYICwwKCgsKCgwQDAwMDAwMEAwODxAPDgwTExQUExMcGxsbHCAgICAgICAgICD/2wBDAQcHBw0MDRgQEBgaFREVGiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICD/wAARCAABAAEDAREAAhEBAxEB/8QAFAABAAAAAAAAAAAAAAAAAAAACP/EABQQAQAAAAAAAAAAAAAAAAAAAAD/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AVIP/2Q==

xOrderID

No

Unique Order Number for FraudWatch verification.

12356

xExistingCustomer

No

Yes/No value indicating if customer is a repeat customer.

No

xAllowDuplicate

No

By default, Cardknox rejects duplicate transactions within 10 minutes of the original transaction. This command overrides that safeguard. True/False allowed.

True

xCustReceipt

No

True/False value indicating if the email address specificied in xemail should receive a receipt containing the transaction details.

False

xCurrency

No

Used to specify an alternate currency. Only applicable for accounts that are using Multi-Currency Conversion (MCC). For accounts that are natively in a foreign currency, the currency does not need to be specified. (See list of all supported currencies)

CAD

Credit

xCommand = check:Credit The Credit command sends money from a merchant to a customer’s bank account that is not linked to any previous transaction. With check transactions, this is commonly used for paying third parties such as paying vendors. To refund a previous check sale, use Check:Refund instead.

Variable

Required

Description

Sample Data

xKey

Yes

Your Cardknox API Key.

[xkeycredentials]

xVersion

Yes

Gateway API Version. The current version is 4.5.9

4.5.9

xSoftwareName

Yes

Name of your software.

[xsoftwarecredentials]

xSoftwareVersion

Yes

Version number of your software.

[xversioncredentials]

xCommand

Yes

Cardknox transaction type.

check:credit

xAmount

Yes

The total amount of the transaction, inclusive of tax and tip if applicable. This the total amount of the transaction.

9.99

xToken

No*

The Cardknox token that references a previously used payment method. When using a token, xCardNum xExp and xMagstripe should not be used.

61h72mmh68phn9q233634ph3g54p1499m69qhp4816pn528h84

xCustom01

No

20 custom fields are available for custom data such as customer comments, etc. Use xCustom01 through xCustom20

Register01

xRouting

Yes*

The check ABA Routing number.

021202337

xAccount

Yes*

The check Account number.

1234567890

xName

Yes

The cardholder’s name.

John Doe

xTax

No

The tax portion that is included in the total transaction amount (xAmount).

.05

xTip

No

The tip portion that is included in the total transaction amount (xAmount).

.05

xInvoice

No

The merchant’s invoice number for the transaction. xInvoice is recommended when available for improved duplicate handling.

123456A

xPONum

No

The merchant’s purchase order number for the transaction.

123485B

xComments

No

Additional data optionally passed along to the receipt.

This is a comment

xDescription

No

Additional data optionally passed along for reporting.

This is a description

xIP

No

The customer’s IP address. Typically used for fraud detection.

1.1.1.1

xEmail

No