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

    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 SDK for initializing and reporting events and the Integration Gateway API for reporting bet and withdrawal conclusions.
    The expected flow is:
    1.
    Report initiated bet-event via the SDK.
    2.
    Report settled bet-events via the Integration Gateway API.
    3.
    Report initiated withdraal via the SDK.
    4.
    Report settled withdrawal via the Integration gateway API.
    Note:
    1.
    This order is important in accurately reporting the outcome of these events.
    2.
    Reported events as immutable, once reported they can not be edited. Subsequent calls with the same data will return an error.

    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#

    The SDK validates all required fields and provides clear error messages. Ensure all required user fields are provided with accurate data before calling the SDK methods.

    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".

    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#


    Testing & Validation#

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

    NIN Verification#

    Overview#

    Operators are required to verify a player's National Identification Number (NIN) as part of identity validation for reporting betting or withdrawal events to ERMC.
    The NIN Verification endpoint allows operators to validate a user's NIN. A successful verification returns the user’s registered identity information which can be used for KYC, taxation, and compliance reporting.
    POST /external/nin/verify

    Base URL (Staging)#

    https://staging-api.ermc.nrs.gov.ng/integration-gateway

    Authentication#

    All requests must include a valid API key.
    x-api-key: your-api-key
    Content-Type: application/json

    Request Format#

    Body#

    {
      "nin": "12345678901"
    }
    Field Description
    Field	Type	Required	Description
    nin	string	Yes	11-digit National Identification Number
    
    The NIN must contain exactly 11 numeric characters.
    
    Example Request
    cURL
    curl -X POST https://staging-api.ermc.nrs.gov.ng/integration-gateway/external/nin/verify \
      -H "Content-Type: application/json" \
      -H "x-api-key: YOUR_API_KEY" \
      -d '{"nin":"12345678901"}'
    Successful Response
    
    When the NIN is successfully verified, the endpoint returns the associated identity details.
    
    {
      "success": true,
      "status": 200,
      "message": "NIN verified successfully",
      "data": {
        "requestID": "unique-request-id",
        "pseudoID": "pseudo-identifier",
        "consentID": "consent-identifier",
        "biographicData": {
          "firstName": "John",
          "middleName": "Olakunle",
          "lastName": "Doe",
          "dateOfBirth": "1990-01-15",
          "gender": "M",
          "residenceAddressLine1": "123 Main Street",
          "residenceAddressLine2": "Lagos, Nigeria"
        },
        "biometricData": [
          {
            "biometricType": "FINGERPRINT",
            "biometricSubType": "THUMB",
            "image": "base64-encoded-image-data"
          }
        ],
        "contactData": {
          "phone1": "+234XXXXXXXXXX"
        },
        "tax_details": {
          "tax_id": "1234567890123"
        }
      }
    }

    Response Summary#

    ScenarioHTTP CodesuccessNotes
    Staging (NIN: 99...)200trueMock success response
    Staging (NIN: other)200falseMock failure response
    Production (valid NIN)200trueReal NRS verification data
    Production (invalid NIN)200falseNRS returned verification error
    Invalid request format400-Request validation error
    Missing API key401-Authentication guard
    Invalid API key401-Authentication guard
    Rate limited429-Rate limiting applied
    Testing (Staging Environment)
    Operators can test their integration using the staging environment.
    For testing purposes, NIN values starting with 99 will return a successful mock verification response.
    Example:
    99123456789
    Other NIN values may return a failed verification response in the staging environment.

    Support#

    For further assistance, contact the eRMC support through your state IRS or the NRS.
    Modified at 2026-03-04 15:44:24
    Next
    report-settled-bet-event
    Built with