SDK for Javascript


The purpose of the Cardknox JS SDK is to allow the developer to easily implement payments into their web based system. One of the benefits that this has over BBPOS is that it does not require an application to be installed on each computer that uses a device and it can run on multiple different platforms. This SDK currently only supports PAX devices.

Sample Page

Find us on GitHub

Getting Started

Load our SDK.

SDK Functions


Process a transaction.

  Args Returns
Type TransactionRequest TransactionResponse
var Key = "xxxxxxxxxxxxxx";
var SoftwareName = "CardknoxJSSDK";
var SoftwareVersion = "1.0";
var Command = "cc:sale";
var Amount = "1";
var IpAddress = "";
var IpPort = "10009";
    xKey: Key,
    xSoftwareName: SoftwareName,
    xSoftwareVersion: SoftwareVersion,
    xCommand: Command,
    xAmount: Amount,
    settings: {
        deviceIpAddress: IpAddress,
        deviceIpPort: IpPort
}).then(function (response) {
}).catch(function (error) {


Prompts for signature on the device. This returns a base64 encoded PNG without the data header.

  Args Returns
Type Settings String
var ipAddress = "";
var ipPort = "10009";
        deviceIpAddress: ipAddress,
        deviceIpPort: ipPort
}).then(function (response) {
}).catch(function (error) {

Transaction Request Parameters


Name Type Description Valid values
xCommand String Transaction type Enum xCommand
xKey String Your Cardknox sale-only key
xSoftwareName String Your software name
xSoftwareVersion String Your software version
xAmount Number Transaction amount
settings Settings Transaction settings, these should be the same for all transactions

Setting Parameters


Name Type Description Valid values
deviceIpAddress String IP address of your device
deviceIpPort String IP port of your device. Default is “10009”

xCommand parameters


List of supported transaction types. These enums are available from the SDK. See more details about each command at

Name Command
CC_SALE cc:sale
CC_CREDIT cc:credit
CC_AUTHONLY cc:authonly
CC_CAPTURE cc:capture
CC_POSTAUTH cc:postauth
CC_VOID cc:void
CC_VOIDRELEASE cc:voidrelease
CC_VOIDREFUND cc:voidrefund
CC_BALANCE cc:balance
EBTFS_SALE ebtfs:sale
EBTFS_CREDIT ebtfs:credit
EBTFS_BALANCE ebtfs:balance
EBTCB_SALE ebtcb:sale
EBTCB_BALANCE ebtcb:balance
GIFT_REDEEM gift:redeem
GIFT_ISSUE gift:issue
GIFT_BALANCE gift:balance