API Reference

This documentation provides detailed instructions for integrating with the Transaction Monitoring API, offering support for both Webhook and WebSocket integrations. The integration allows you to securely upload, process, and monitor transaction data. Follow the steps below to connect either via Webhook or WebSocket, set up data processing, retrieve your encryption key, and ensure correct data transmission.

Integration Overview

Our system provides three flexible methods for integrating and uploading your historical data, so you can choose the option that best fits your needs and technical setup. These methods ensure seamless communication between your systems and ours, whether you're dealing with large datasets or need real-time transaction updates.


  1. Webhook Integration
    With Webhook Integration, our system will automatically send processed data to a specified URL endpoint that you configure. This method is ideal for receiving periodic updates or event-driven data, where you can quickly capture and process information without needing to poll our system. The data is delivered in real-time as events occur, making it an efficient solution for handling transactional data, such as payments or user activity.
    Key Features:
    1. Automated, real-time data delivery.
    2. Configurable URL endpoint.
    3. Reliable and efficient for periodic updates
    4. Ideal for event-driven use cases.
  2. WebSocket Integration
    For real-time communication, WebSocket Integration allows your client application to establish a persistent, encrypted connection to our system. This method is ideal when you need to stream data continuously or exchange high-frequency updates with minimal delay. Data is sent in both directions (from client to system and vice versa) over a secure WebSocket connection, enabling real-time transactions, event notifications, and updates.
    Key Features:
    1. Secure, encrypted real-time communication.
    2. Persistent connection for continuous data exchange.
    3. Low-latency and high-frequency updates.
    4. Suitable for applications requiring instantaneous data sync.
  3. Upload via Dashboard
    If you prefer a more manual approach, our system also supports uploading historical data through our intuitive dashboard interface. You can upload files (CSV, EXCEL) directly to the platform, where the data will be processed and integrated into our system. This method is ideal for bulk data transfers, such as historical transactions, and is an easy-to-use option for non-technical users.
    Key Features:
    1. Simple and user-friendly interface.
    2. Supports bulk uploads of historical data.
    3. Ideal for non-technical users or one-time data transfers.
    4. Provides a straightforward way to integrate large datasets.

Choosing the Right Option

Depending on your use case and technical preferences, you can choose either Webhook or WebSocket integration for real-time data handling, or opt for the dashboard upload method for batch processing. Webhooks are great for event-driven systems, while WebSockets provide a real-time, two-way communication channel. The dashboard upload is the easiest way to get started with historical data integration in bulk.


  1. Data Upload / Attribute Configuration
    The first step in the integration process is uploading your sample transaction data to the system. This allows the system to identify the relevant attributes within your data, such as names, transaction IDs, amounts, and other key details. Once identified, these attributes will be displayed in your dashboard, where you will need to map them to the corresponding system attributes for accurate validation.
    How to Upload Data:
    1. Prepare Your Sample Data: Ensure that your sample transaction data is formatted correctly (e.g., CSV, JSON, or other supported file formats).
    2. Upload the Data: Use the designated endpoint or dashboard interface to upload the data. This will trigger the system to process and parse the file, extracting all relevant attributes.
    3. System Attribute Detection: The system will automatically extract attributes from your data, displaying them for your review and mapping. These extracted attributes are those that the system recognizes based on your uploaded dataset.
      Example:
      Suppose you have a last_name attribute in your transaction data, but it appears as lname in your dataset. The system will identify lname as a candidate for mapping to the system’s predefined last_name attribute. You’ll need to confirm and map it to ensure proper data validation.
      By following this process, you ensure that your sample data aligns with the system’s expected attribute structure, which is crucial for accurate data processing and validation.
  2. Attribute Mapping
    Once your sample data is uploaded and the system has identified the relevant attributes, the next step is to map these attributes to the predefined attributes within the system. This mapping is essential for ensuring that data is validated correctly, and any discrepancies or variations in naming conventions are resolved.
    How to Map Attributes:
    1. Access the Settings Module:
      1. Go to the Settings section within your dashboard.
      2. Navigate to the Transaction Monitoring tab where the mapping interface is located.
    2. Review the Extracted Attributes:
      1. In this section, you will see a list of the attributes the system has extracted from your sample data.
      2. Carefully review these attributes to ensure they match the intended data fields (e.g., amount, transaction_id, last_name, etc.).
    3. Map to System Attributes:
      1. For each extracted attribute, select the corresponding predefined system attribute from the list.
      2. If necessary, manually adjust any attribute names to ensure they align with the system’s format and naming conventions.
      3. Once all attributes are correctly mapped, save the mappings.
        This step ensures that the data will be validated and processed correctly within the system, ensuring consistency across all transaction monitoring and reporting functions.
        Why Proper Mapping is Important
        Proper attribute mapping ensures that:
    4. Data consistency is maintained throughout the system.
    5. Data validation occurs seamlessly, preventing errors during transaction processing.
    6. Your data is integrated correctly into the system, facilitating accurate monitoring, reporting, and analysis.
  3. Setting Data Processing Frequency
    The frequency at which your transaction data is processed can be configured based on your business needs. By default, our system is set to process data in Real-Time, ensuring that your transactions are processed as soon as they are received. However, if you prefer to process data in batches (e.g., daily or weekly), you can easily adjust the frequency in the system settings.
    How to Set Processing Frequency:
    1. Access the Settings Module:
      1. Navigate to the Settings section in your dashboard.
      2. Click on the Transaction Monitoring tab to access data processing options.
    2. Select Your Preferred Processing Frequency
    3. Save Your Settings:
      1. After selecting your desired frequency, click Save to apply the changes.
      2. The system will now process your data according to the selected schedule.
        Why Choose Different Frequencies?
    4. Real-Time Processing is ideal for businesses that require immediate transaction validation and monitoring, such as financial institutions or e-commerce platforms.
    5. Batch Processing (Daily or Weekly) may be more suitable for scenarios where immediate processing is not necessary, or for organizations that process large volumes of data at specific intervals.
      By adjusting the data processing frequency, you can align the system’s operations with your internal workflows and business needs.
  4. Encryption and Decryption
    Security is a top priority when transmitting sensitive transaction data. To ensure the integrity and confidentiality of your data, each client is assigned a unique encryption key. This key is used to encrypt transaction data before sending it to the system and to decrypt responses received from the system. Proper handling of your encryption key is critical for maintaining secure communication between your systems and ours.
    How to Retrieve Your Encryption Key:
    1. Go to the Settings Module:
      1. Access the Settings section in your dashboard.
      2. Navigate to the Transaction Monitoring tab to find the encryption settings.
    2. Locate the Encryption/Decryption Key Section:
      1. In the Encryption/Decryption Key section, you will find your unique encryption key that has been assigned to your account.
    3. Copy Your Encryption/Decryption Key:
      1. Copy the encryption/decryption key from the section and securely store it. This key will be required when encrypting transaction data before sending it to the system or decrypting any responses received.
        Important Security Considerations:
    4. Keep Your Encryption Key Secure: Treat your encryption key like a password. Do not share it publicly or store it in insecure locations.
    5. Use the Key for Both Encryption and Decryption: The same key is used for both encrypting outgoing data and decrypting responses from the system.
    6. Regenerate if Necessary: If you suspect that your encryption key has been compromised, you can regenerate a new one through the dashboard for enhanced security.
      By securely managing your encryption key, you ensure that all data exchanged with the system remains protected and confidential
  5. Webhook Integration: Sending Data
    The Webhook Integration allows you to send encrypted transaction data to our system via a specified Webhook URL. This method is efficient for real-time or event-driven data transfer, where your system needs to communicate with ours as soon as a transaction occurs or specific conditions are met. By sending the data in an encrypted format, we ensure that the communication remains secure.
    To connect your system to ours via Webhook, use the following Webhook URL:
    Webhook URL:
    https://api.prembly.com/radar-transaction/webhook/connect
    This is the endpoint to which you will send the encrypted transaction data for processing and validation.
    How to Connect Using Webhook:
    1. Encrypt Your Transaction Data:
      1. Before sending any transaction data, you must encrypt it using your unique encryption key. This ensures that the data remains secure during transmission.
      2. Use your encryption key (which can be retrieved from your dashboard under the Transaction Monitoring settings) to encrypt the data in a supported format (e.g., AES encryption).
    2. Send the Encrypted Data via a POST Request:
      1. Once your data is encrypted, construct a POST request to the Webhook URL
      2. In the body of the POST request, include the encrypted data along with any additional headers or parameters required by your system.
        Example:
        POST https://api.prembly.com/radar-transaction/webhook/connect
        Content-Type: application/json
        x-api-key: YOUR_API_KEY
        {
        "data": "ENCRYPTED_TRANSACTION_DATA"
        }
  6. WebSocket Integration: Sending Data
    WebSocket Integration offers a real-time communication channel for securely sending encrypted transaction data to the system. Unlike traditional HTTP requests, WebSocket allows for a continuous, bidirectional connection, ensuring that data can be sent and received instantly without the overhead of re-establishing connections. This is ideal for use cases that require low-latency, real-time transaction processing and updates.
    To initiate the WebSocket connection, use the following URL:
    WebSocket URL:
    ws://api.prembly.com/radar-transaction/ws/connect/
    This URL is the entry point for establishing a WebSocket connection with the system. Once connected, you can send transaction data securely and receive real-time responses.
    How to Connect Using WebSocket:
    1. Establish a WebSocket Connection:
      1. Use a WebSocket client (e.g., WebSocket library in JavaScript, Python, etc.) to establish a connection with the provided WebSocket URL
      2. The connection will be persistent, meaning once it is established, you can continue sending and receiving data in real-time.
    2. Send Encrypted Transaction Data:
      1. After the WebSocket connection is established, encrypt the transaction data using your unique encryption key.
      2. end the encrypted data as a message through the WebSocket connection

Confirming Integration

Steps to Complete the Task:

Confirm URL:
https://api.prembly.com/radar-transaction/confirm-integration

  1. Use your unique encryption key to encrypt the transaction data. Ensure you understand how to retrieve this key from your dashboard under Transaction Monitoring settings
  2. Create a POST request to the webhook URL, including necessary headers such as Content-Type and x-api-key.
  3. Format the body of the request to include the encrypted transaction data.
  4. If the integration is successful, you should receive a success response. If there’s an error, the response will detail the cause.