eRMC
    eRMC
    • Operator Integration Guide for ERMC & SDK
    • report-settled-bet-event
      POST
    • settle-withdrawal
      POST
    • Schemas
      • settle withdrawal

    Operator Integration Guide for ERMC & SDK

    Overview#

    This document provides a comprehensive guide for operators integrating with the ERMC system. It covers the use of the Integration Gateway for reporting bet and withdrawal conclusions and the SDK for initializing and reporting events.

    Integration Gateway API#

    The Integration Gateway allows operators to report finalized betting and withdrawal events. Below are the key endpoints and their usage.

    Authentication#

    All requests to the Integration Gateway require an API key for authentication. Include the following headers in your requests:

    Endpoints for Reporting Events#

    MethodEndpointPurpose
    POST/external/report-settled-bet-eventReport a finalized bet conclusion
    POST/external/settle-withdrawalReport a finalized withdrawal event

    Example: Reporting a Settled Bet Event#

    Example: Reporting a Settled Withdrawal#


    SDK Integration#

    The ERMC SDK simplifies the process of reporting bet and withdrawal events by handling location detection and API communication. Below are the key methods and their usage.

    Installation#

    Install the SDK via npm:

    Reporting Events#

    Reporting Bet Events#
    To report a bet event using the SDK, use the reportBetEvent method:
    Reporting Withdrawal Events#
    To report a withdrawal event using the SDK, use the reportWithdrawalEvent method:

    Using the SDK via jsDelivr#

    The ERMC SDK can also be used directly in the browser via the jsDelivr CDN. This is useful for projects that do not use a module bundler or package manager.
    Include the SDK in your HTML file:
    The SDK will be available globally as LocationSDK.
    Example: Reporting Bet Events#
    Example: Reporting Withdrawal Events#
    The SDK automatically attaches location data to events using the following methods:
    1.
    Browser Geolocation API: If available and in a secure context, the SDK uses the browser's geolocation API for precise location data.
    2.
    IP Geolocation Services: If the browser geolocation fails, the SDK falls back to IP-based geolocation services, including ipapi.co, ipinfo.io, and freeipapi.com.
    3.
    Client IP Forwarding: For server-side implementations, you can pass the clientIP parameter to forward the user's IP address for location resolution.

    Error Handling#

    If both geolocation methods fail, the SDK will throw an error unless a custom location is provided. In such cases, the custom location will be used as a fallback.

    Setting the Environment (Staging or Production)#

    By default, the SDK sends events to the staging environment. You can specify the environment explicitly using the environment parameter (either "staging" or "production") in all event reporting methods:
    Tip: For most testing, use the default (staging). For live/production, set environment to "production".

    Testing & Validation#

    Use the staging environment for testing your integration:
    Base URL: https://staging-api.ermc.africa/integration-gateway
    Ensure all events are correctly reported and initialized before moving to production.

    Support#

    For further assistance, contact the eRMC support through your state IRS or the NRS.
    Modified at 2026-01-21 11:28:41
    Next
    report-settled-bet-event
    Built with