Deep link feature allows a third-party (in further text referred to as a Developer) to use a predefined URL to open up the pre-installed Cardknox mobile application in order to process a transaction.
The Developer provides a number of required query parameters alongside any optional query parameters.
The Cardknox app will use xRedirectURL with required parameter to deliver the results of the processed transaction back to the caller. Results are provided as query parameters, appended onto the value provided by the xRedirectURL parameter. This is a GET request.
A list of phrases, words, and synonyms that appear in this document; along with their meaning
Refers to the Cardknox Transaction API, which can be found at https://kb.cardknox.com/api.
A combination of a Payment type and a Transaction type, delimited by a semicolon. For example, cc:sale denotes a Credit Card Payment type and a sale transaction type.
A type of payment, such as Credit Card (further abbreviated as “cc”), Check (further abbreviated as “check”). More payment types can be found on the Cardknox API site.
A type of transaction; such as Sale, AuthOnly, Capture etc. More transaction types can be found on the Cardknox API site.
Bare minimum, to integrate a mobile application capable of reacting to deep links with a website, is that the website should implement the logic that does the following:
Checks whether the application is installed on the mobile device or not.
If it’s not installed, the user is taken to the respective app store (AppStore for iOS or Google Play Store for Android).
if the software is installed, the target application is started.
Points 2 and 3 differ in the URLs that need to be invoked in order to achieve the described result (take the user to an app store or open the target application). Mobile browsers don’t offer an out-of-the-box API to detect if an application is installed on the device or not. As such, point 1 is the responsibility of the Developer to implement. This document assumes that the Cardknox app is preinstalled on a mobile device during the integration.
The Cardknox mobile app can be installed here:
The Cardknox app predefined URL is:
A Developer can use the predefined URL to open the Cardknox app in 2 ways:
Manually, by navigating to a predefined URL through a browser on a mobile device.
By having a website with an
HTML element that can handle URLs and specifying the predefined URL on that HTML element.
Android only -
adbtool can be used to deep link into the app with the following code:
adb shell am start -a android.intent.action.VIEW -d "dck://portal.cardknox.com/cardknoxdeeplink" com.gateway.cardknox.android
A Developer is required to pass in a couple of required parameters. These required parameters are first URL decoded and then validated by the application. Optionally, a number of optional parameters can be passed in in order to prefil the transaction process form:
Example URL with all the required parameters and no optional parameters
Validation is performed on the required and optional arguments. A failing required parameters validation results in an error screen displaying which one of the required arguments is missing or is invalid.
Optional arguments are also validated, but the application will not present an error screen describing which optional parameter failed the validation. For example, the app expects the
xCVV optional parameter to be an
int. The app will read a query parameter named
xCVV and try to convert its value to an
int. Passing a
double might break the conversion to an
int, in which case 0 is used as the
int default value.
Validation is done in 3 steps, where each step yields a different user interface:
The xRedirectURL is invalid - User is presented with a UI that indicates that the xRedirectURL is missing or the provided value is not a valid URL.
At least one of the required parameters is invalid - User is presented with a UI that indicates which parameter failed validation.
All required parameters are valid - User is presented with a UI to process a transaction.
Validation error UI for xRedirectURL
Validation error UI for all other required parameters. In this case, only xRedirectURL was provided
Response URL invoked by the app when only the xRedirectURL required parameter is supplied. The Developer can expect this GET request to occur at the https://www.test.com URL.
Process a transaction user interface
The user interface provides a button to process a transaction. The required parameters on the UI are the card number, expiration date, and the amount. The amount parameter is passed in through the URL. Expiration date defaults to the current month in the current year. The card number has to be typed in or provided as an optional argument with the
xCardNum query parameter.
After the transaction is processed, two things can happen:
Transaction is approved - User will see a summary of the processed transaction. User has an option to click “Done” or “Signature.” Clicking on the “Done” button opens the mobile device browser with the URL specified by the xRedirectURL parameter. Transaction details are converted into key/value pairs and appended as a query string onto the xRedirectURL value. This is a GET request.
Transaction resulted in an error - User will not see the processed transaction summary. User will see the error message about what went wrong in a popup. User has an option to send the response back to xRedirectURL by clicking on any of the 2 Send buttons.
A successfully processed transaction summary. Clicking on the Done button would deliver the results back to the xRedirectURL URL
A successful transaction URL encoded response sent to the xRedirectURL
A successfully processed transaction that resulted in an error response from the Cardknox API. The error is displayed ‘as is’ and the user has an option to instruct the app to deliver the Cardknox API response to the xRedirectURL URL
A erroneous transaction URL encoded response sent to the xRedirectURL
After the app sends the response back to the caller (by opening up the xRedirectURL in the mobile browser), the app’s UI is replaced with a full screen image displaying the Cardknox logo:
The UI presented in the application when the app delivers the results to xRedirectURL. User navigating back to the app from the browser would see this screen
Cardknox account key
Has to be a non-empty, non-pure-whitespace string.
Cardknox transaction type
Has to be lowercase.
Supported values are all values supported by the Cardknox API.
Total amount of the transaction, including tax and tip, if applicable.
A URL where the Cardknox app delivers the results of processing a transaction.
URL needs to have a schema/protocol alongside the domain name.
Results are delivered by the app, appending the Cardknox API response to this value and opening the URL on the mobile device’s browser.
This is a GET request.
By default, Cardknox rejects duplicate transactions within 10 minutes of the original transaction. This command overrides that safeguard. True/False allowed.
The card expiration number. Format: MMYY
The customer card number.
True/False value indicating if the email address specified in
The customer’s email address.
3-digit code from the back of the card (for Amex, 4-digit code from the front of the card).
The cardholder’s name.
The merchant’s invoice number for the transaction.
The merchant’s purchase order number for the transaction.
Additional data optionally passed along for reporting.
This is a description
The billing zip code of the cardholder.
The billing street address of the cardholder.
123 Any Street
Used to reference a previous transaction when doing a follow-up transaction, typically a refund, void, or capture.
3 custom fields are available for custom data, such as customer comments, etc. Use
The customer’s city for their billing profile.
The customer’s company name for their billing profile.
The customer’s country for their billing profile.
The customer’s first name for their billing profile.
The customer’s last/family name for their billing profile.
The customer’s state for their billing profile.
The customer’s street address for their billing profile.
123 Any Street
The customer’s phone number for their billing profile.
The customer’s zip code for their billing profile.
The customer’s city for their shipping profile.
The customer’s company name for their shipping profile.
The customer’s first name for their shipping profile.
The customer’s last/family name for their shipping profile.
The customer’s state for their shipping profile.
The customer’s street address for their shipping profile.
123 Any Street
The customer’s phone number for their shipping profile.
The customer’s zip code for their shipping profile.