Getting started overview
Integrating with Kount involves several steps, from initial account setup to making a successful API call. This guide provides a structured approach for developers to quickly get Kount's fraud detection capabilities operational within an application. The primary goal is to establish connectivity and execute a basic transaction inquiry, serving as a foundation for more complex integrations.
Kount's architecture typically involves sending transaction data to their API, which then returns a fraud score and recommended action. This interaction is facilitated by API keys and a merchant ID, unique to each Kount account. Developers will use these credentials to authenticate requests and identify their account within the Kount system. Understanding the basic request-response flow is crucial for effective integration.
Before proceeding, ensure you have access to Kount's official support documentation, which provides detailed API references and integration guides for specific products like Kount Command or Kount Control Kount Support documentation portal.
Quick start summary
The following table summarizes the key steps to get started with Kount:
| Step | What to Do | Where |
|---|---|---|
| 1. Account Creation | Contact Kount Sales to set up a merchant account. | Kount Contact Sales page |
| 2. Obtain Credentials | Receive Merchant ID, API Key, and other credentials from Kount. | Kount Account Manager / Kount Admin Portal |
| 3. Review API Docs | Familiarize yourself with the specific API endpoints and request formats for your Kount product. | Kount Developer Documentation |
| 4. Configure Environment | Set up your development environment to make HTTP POST requests. | Your preferred programming environment (e.g., Python, Node.js, Java) |
| 5. First Request | Construct and send a test transaction inquiry to a Kount API endpoint. | Your application's backend / API client |
| 6. Interpret Response | Parse the Kount API response for fraud score and decision. | Your application's backend |
Create an account and get keys
To begin using Kount, you must first establish a merchant account. Kount's pricing model is custom and enterprise-focused, requiring direct engagement with their sales team Kount's sales contact page. During the account setup process, Kount will provision your merchant account and provide you with the necessary authentication credentials.
Obtaining your credentials
Upon successful account creation, Kount will typically provide the following key pieces of information:
- Merchant ID (MERCH): A unique identifier for your Kount account. This is often a numerical string.
- API Key: A secret key used to authenticate your API requests. This key must be kept confidential and never exposed in client-side code.
- API URL/Endpoint: The base URL to which your API requests should be sent. This may vary depending on the Kount product (e.g., Kount Command, Kount Control) and environment (test/production).
These credentials are usually accessible through your Kount Admin Portal, or they may be provided directly by your Kount account manager. Always store your API key securely, following best practices for API key management, such as using environment variables or a secrets management service, as recommended by security guidelines from organizations like Google Cloud's secure API key practices.
Your first request
Making your first request to Kount involves constructing an HTTP POST request to the appropriate API endpoint with your merchant ID, API key, and relevant transaction data. For this example, we'll outline a generic transaction inquiry that is common across many Kount integrations. The exact parameters and endpoint may vary based on your specific Kount product and configuration as detailed in the Kount API documentation.
Example API endpoint
A typical Kount API endpoint for transaction inquiries might look like this (this is illustrative; refer to your specific documentation):
https://risk.kount.net
Request parameters
Kount APIs generally expect data in a key-value pair format, often URL-encoded. Essential parameters for a basic transaction include:
MERCH: Your Kount Merchant ID.APIKEY: Your Kount API Key.MODE: Typically 'Q' for inquiry.MACK: A message authentication code, often an HMAC-SHA256 signature of the request parameters.TRAN: A unique transaction ID from your system.IPAD: The customer's IP address.EMAL: The customer's email address.NAME: The customer's billing name.CCNO: The last four digits of the credit card number (if applicable).TOTL: Total transaction amount.CURR: Currency code (e.g., USD).PTYP: Payment type (e.g., CC, PAYPAL).
The MACK parameter is critical for securing your requests. It's a hash generated using your API Key and a specific set of request parameters, ensuring the integrity and authenticity of the data sent to Kount. The exact MACK generation algorithm is detailed in the Kount API Integration Guides.
Example request (cURL)
Here's a conceptual cURL example. Replace placeholder values with your actual credentials and data. Note that MACK generation is complex and typically handled by SDKs or specific functions in your backend, not manually in cURL.
curl -X POST \
'https://risk.kount.net' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'MERCH=YOUR_MERCHANT_ID&APIKEY=YOUR_API_KEY&MODE=Q&TRAN=TRN1234567890&IPAD=192.0.2.1&[email protected]&NAME=John+Doe&CCNO=1234&TOTL=10000&CURR=USD&PTYP=CC&MACK=GENERATED_MACK_HASH'
In this example, TOTL=10000 represents $100.00 if Kount expects amounts in cents or the smallest currency unit.
Interpreting the response
A successful response from Kount will typically be in a key-value pair format, often indicating:
SCOR: The fraud score.DEC: The recommended decision (e.g., 'A' for Approve, 'D' for Decline, 'R' for Review).ERRO: Error code, if any.- Additional risk indicators and data points.
Refer to the Kount API reference documents for a complete list of response parameters and their meanings.
Common next steps
Once you've made a successful initial API call, consider these next steps to fully integrate Kount into your workflow:
- Implement MACK Generation: Develop or integrate the secure MACK generation logic into your application. This is crucial for production environments.
- Integrate Kount SDKs: Kount provides SDKs in various programming languages to simplify API interaction, including MACK generation and response parsing. Check the Kount developer resources for available SDKs.
- Handle All Kount Decisions: Design your application to respond appropriately to all possible Kount decisions (Approve, Decline, Review) and error codes.
- Event Updates: Implement Kount's Event Update API or webhook functionality to inform Kount of post-transaction events, such as order fulfillment, chargebacks, or refunds. This data helps Kount improve its fraud models.
- Data Collection: Integrate Kount's client-side data collection mechanisms (e.g., JavaScript tags, mobile SDKs) to gather device and browser data, which enhances fraud detection accuracy.
- Custom Rules and Policies: Work with your Kount account manager to configure custom rules and policies within the Kount Admin Portal that align with your business logic and risk tolerance.
- Testing and Monitoring: Thoroughly test your integration with various scenarios (e.g., high-risk transactions, legitimate transactions) and establish monitoring for API call success rates and fraud decision outcomes.
Troubleshooting the first call
Encountering issues during your first API call is common. Here are some troubleshooting tips:
- Incorrect Credentials: Double-check your Merchant ID and API Key. Ensure there are no typos or extraneous spaces.
- MACK Signature Error: This is a frequent cause of failure. Verify that your MACK generation logic precisely matches Kount's specification. Ensure all parameters used in the MACK signature are correctly ordered and formatted.
- Missing Required Parameters: The Kount API will reject requests that are missing mandatory fields. Consult the specific API documentation for your product to confirm all required parameters are included.
- Incorrect Endpoint: Ensure you are sending requests to the correct Kount API URL for your environment (test vs. production) and product.
- Content-Type Header: Verify that your HTTP request includes the correct
Content-Typeheader, typicallyapplication/x-www-form-urlencodedfor many Kount APIs. - IP Whitelisting: In some configurations, Kount may require you to whitelist the IP addresses from which your server will make API calls. Confirm this with your Kount account manager.
- Network Issues: Check your server's network connectivity to Kount's API endpoints. Firewall rules or proxy settings can sometimes block outbound requests.
- Error Codes and Messages: Always examine the Kount API response for any error codes or messages. These are the primary source of information for diagnosing failures. The Kount Support portal provides extensive documentation on error codes.
- Logging: Implement comprehensive logging for both your outgoing requests and Kount's responses. This data is invaluable for debugging.