Skip to main content

Documentation Index

Fetch the complete documentation index at: https://bancofcalifornia-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The Kount data collector should be run immediately on a payment page, and may be run multiple times. Each call to createSession() will return a session ID. When submitting, use the latest value. Session IDs need to be provided to the payment API. If you don’t pass a Session ID, Kount will not run correctly.
1

Initialize Gateway.js

Start by initializing Gateway.js with your public key. You can view your existing public keys or create a new one in the merchant portal’s Security Keys page.
2

Initialize Kount

Initialize the Kount service by calling gateway.getKount().
3

Run the Kount data collector

Run the Kount data collector by calling Kount’s createSession() and retrieve the session ID using .then().
4

Build the transaction object

Create a Javascript object with the details of the transaction. The details should include the credit card information, currency, amount, email, city, address1, country, zip, first_name, last_name, and transaction_session_id.
5

Submit via the Payment API

Submit the transaction data via the payment API with your private key.
example.html
<html>
    <body>
    <script src="https://gateway.bancedge.com/js/v1/Gateway.js"></script>
    <script>
        // Initialize Gateway.js, use own Public Key
        const gateway = Gateway.create('collect_checkout_0000000000000000000000000');

        // Initialize the Kount service
        const kount = gateway.getKount();

        // Run Kount
        kount.createSession().then((res) => {
            //Store session id
            const transactionSessionId = res;

            //Code goes here...
            console.log(transactionSessionId);

        });

        // Listen for any errors that might occur
        gateway.on('error', function (e) {
            console.error(e);
        });
    </script>
    </body>
</html>