Overview
Gateway.js is a JavaScript library that enables advanced payment processing features including 3D Secure authentication and Kount fraud detection. This library provides merchants with additional layers of security and fraud prevention capabilities.Gateway.js is designed for modular integration, allowing merchants to activate only the security features they need.
Core Services
- 3D Secure
- Kount Fraud Detection
Implements 3D Secure authentication for enhanced card payment security.Key Benefits:
- Shift liability for fraudulent transactions
- Increase approval rates for authenticated transactions
- Meet regulatory requirements (e.g., PSD2 SCA)
- Reduce chargebacks
- 3D Secure 1.0
- 3D Secure 2.0 (EMV 3DS)
Installation
Include Gateway.js in your page:Gateway Object Reference
The Gateway object provides access to all Gateway.js services:Gateway.create()
Creates and initializes a Gateway instance:Gateway.get3DSecure()
Retrieves the 3D Secure service instance:Gateway.getKount()
Retrieves the Kount fraud detection service instance:Gateway.on()
Registers event handlers:3D Secure Integration
1
Initialize Gateway
Create a Gateway instance with your API credentials
2
Get 3D Secure Service
Retrieve the 3D Secure service from the Gateway instance
3
Initiate Authentication
Start the 3D Secure authentication flow
4
Handle Authentication Result
Process the authentication result and submit to Payment API
Implementation Example
3D Secure Response Fields
After authentication, submit these fields to the Payment API:| Field | Description |
|---|---|
cardholder_auth | Authentication indicator |
cavv | Cardholder Authentication Verification Value |
xid | Transaction identifier |
eci | Electronic Commerce Indicator |
Kount Fraud Detection
1
Initialize Gateway
Create a Gateway instance with Kount enabled
2
Get Kount Service
Retrieve the Kount service from the Gateway instance
3
Collect Device Data
Gather device fingerprinting data
4
Submit with Transaction
Include Kount session ID with your payment request
Implementation Example
Fraud Score Interpretation
Kount returns a fraud score with each transaction:- 0-20: Low risk (approve)
- 21-40: Medium-low risk (approve with monitoring)
- 41-60: Medium risk (review required)
- 61-80: Medium-high risk (decline or review)
- 81-100: High risk (decline)
Combined Integration
Use both 3D Secure and Kount together for maximum protection:Testing
3D Secure Testing
Use these test scenarios:| Card Number | 3DS Result |
|---|---|
| 4000000000001000 | Successful authentication |
| 4000000000001018 | Authentication unavailable |
| 4000000000001034 | Failed authentication |
Kount Testing
In sandbox mode, Kount returns predictable scores based on email patterns:[email protected]- Score: 10 (Low risk)[email protected]- Score: 50 (Medium risk)[email protected]- Score: 90 (High risk)

