Account Boarding Merchant Agreement
Overview
In order to be boarded every Merchant needs to agree to Go Plus Terms and Conditions. To help Developers integrate Agreement API into their website we are supporting Agreement API through Cardknox iFields.
Integrate Agreement API using ifields
Obtain your iFields xKey from your Cardknox Partner Portal account settings.
Adding Reference to iFields
Step 1: Check the latest stable iFields version here: https://cdn.cardknox.com/ifields/versions.htm
Step 2: Add the ifields.js file after the <head> tag on your website:
<script src=https://cdn.cardknox.com/ifields/**ifields-version-number**/ifields.min.js></script>
Adding iFrame and JavaScript Objects for Merchant Agreement
Step 1: Add the following iFrame JS snippet inside the <body> where Merchant Agreement is desired.
Make sure you have an attribute
data-ifields-id="agreement"
as part of <iframe> tag
<iframe id="agreement" class="agreement" data-ifields-id="agreement" src="https://cdn.cardknox.com/ifields/**ifields-version-number**/agreement.htm"></iframe>
Step 2: Create JavaScript function to handle Agreement API callback
For response
object reference refer here: Agreement Response
Step 3: Enable Customer Agreement to get the token
There are two ways to get the token:
Asynchronously (a callback will be performed once the customer agrees to Terms and Conditions) Just add
enableAgreement
call when the document is loaded (autoAgree
the parameter is set totrue
):
Synchronously (Explicitly calling
getToken
function for example on Submit) AddenableAgreement
call when the document is loaded (autoAgree
the parameter is set tofalse
):
In your Submit
function add the following code:
Objects Reference
iStatus
Agreement Response
The object holding the response with token from Agreement API.
Name | Type | Description |
| There are 2 possible cases:
| |
| String | When |
| String | When |
Last updated