Vizo Digital Api
Sign in

AEPS · Agents

Daily 2FA

Daily biometric authentication of the agent. Required once per day.

POST request

URL: https://uat-api.vizodigital.com/api/v1/aeps/agents/{agent_code}/daily-2fa

Body

{
    "reference_id": "TFA2026100300001",
    "channel": "APP",
    "device_id": "8f2d7c9a12bc45ef",
    "ip_address": "49.47.133.99",
    "user_agent": "Mozilla/5.0 Android",
    "latitude": "25.5899",
    "longitude": "85.1606",
    "bio_type": "0",
    "pid_data": "BASE64_ENCODED_PID_XML"
}

Include a valid Bearer token with every request

Code sample

curl -X POST "https://uat-api.vizodigital.com/api/v1/aeps/agents/AC12345678/daily-2fa" \
  -H "X-API-Key: YOUR_API_KEY_OR_TOKEN" \
  -H "X-Timestamp: $(TZ=Asia/Kolkata date '+%Y-%m-%d %H:%M:%S')" \
  -H "Content-Type: application/json" \
  -d '{
    "reference_id": "TFA2026100300001",
    "channel": "APP",
    "device_id": "8f2d7c9a12bc45ef",
    "ip_address": "49.47.133.99",
    "user_agent": "Mozilla/5.0 Android",
    "latitude": "25.5899",
    "longitude": "85.1606",
    "bio_type": "0",
    "pid_data": "BASE64_ENCODED_PID_XML"
}'

Success Response

{
    "status": "success",
    "message": "Daily Auth Completed Successfully",
    "data": {
        "reference_id": "TFA2026100300001",
        "status": "success",
        "is_chargeable": true,
        "charge": "0.9440"
    }
}

Failure response

{
    "status": "success",
    "message": "Authentication Failed. Invalid Biometric data.",
    "data": {
        "reference_id": "TFA2026100300002",
        "status": "failed",
        "is_chargeable": true,
        "charge": "0.9440"
    }
}

Overview

Authenticates the agent for the day. Needed when Agent Status returns daily_2fa_required: true. It is valid until 12:00 midnight IST.

Notes

  • Capture the PID block with an empty wadh.
  • The charge is taken from your wallet before the provider is called. Check is_chargeable and charge in the answer.
  • Every attempt the provider bills is charged, success or fail. If the provider does not bill the attempt, rejects it, or does not answer, the charge is refunded to your wallet automatically. The wallet history shows a debit and a matching refund.
  • A failed attempt is a normal 200 answer with data.status set to failed.
  • reference_id can be used once per account and environment, for both KYC and Daily 2FA. A repeated one is refused with 409 duplicate_reference_id.
  • 402 insufficient_wallet_balance: your wallet cannot cover the charge. Nothing was sent to the provider and the reference_id is not used up, so you can send it again after a top-up.
  • After a 502 provider_unavailable, retry with a new reference_id. The old one is used up.

Testing in UAT

  • Sandbox keys never reach the bank network and are never charged.
  • Send a reference_id that starts with FAIL- to get a failed answer.

Headers

  • X-API-Key · string required

    Your credential: either your `rr_live_` API key, or the Bearer token from `POST /api/v1/auth/client-credentials` (the same token every other API uses). The token may instead be sent as `Authorization: Bearer <token>`. A token follows the same IP whitelist as your keys, and all your tokens share one requests-per-minute allowance.

    Example: rr_live_xxxxxxxxxxxxx

  • X-Timestamp · string required

    Current time in IST as `YYYY-MM-DD HH:MM:SS` (or `YYYY-MM-DDTHH:MM:SS`). Do not add a timezone suffix such as `+05:30`. Must be within 15 seconds of our server time.

    Example: 2026-10-03 10:30:45

  • Content-Type · string required

    Request content type.

    Example: application/json

Parameters

  • agent_code · path · string required

    The `agent_code` you sent when onboarding the agent.

    Example: AC12345678

Body

application/json required

Daily 2FA request body

Schema

{
    "type": "object",
    "required": [
        "reference_id",
        "channel",
        "device_id",
        "ip_address",
        "user_agent",
        "latitude",
        "longitude",
        "bio_type",
        "pid_data"
    ],
    "properties": {
        "reference_id": {
            "type": "string",
            "description": "Your unique ID for this request."
        },
        "channel": {
            "type": "string",
            "enum": [
                "APP",
                "WEB"
            ],
            "description": "Where the request comes from."
        },
        "device_id": {
            "type": "string",
            "description": "Android ID of the agent device (16 hex characters) when `channel` is `APP`. Send `Browser` when `channel` is `WEB`. Max 40 characters."
        },
        "ip_address": {
            "type": "string",
            "description": "Public IPv4 address of the agent device."
        },
        "user_agent": {
            "type": "string",
            "description": "App or browser user-agent string. Max 50 characters."
        },
        "latitude": {
            "type": "string",
            "description": "Live latitude of the agent, exactly 4 decimal places. Must not be hardcoded."
        },
        "longitude": {
            "type": "string",
            "description": "Live longitude of the agent, exactly 4 decimal places. Must not be hardcoded."
        },
        "bio_type": {
            "type": "string",
            "enum": [
                "0",
                "1",
                "2"
            ],
            "description": "`0` = fingerprint, `1` = face, `2` = iris."
        },
        "pid_data": {
            "type": "string",
            "description": "Base64-encoded PID XML captured from a registered RD service device."
        }
    }
}

Example

{
    "reference_id": "TFA2026100300001",
    "channel": "APP",
    "device_id": "8f2d7c9a12bc45ef",
    "ip_address": "49.47.133.99",
    "user_agent": "Mozilla/5.0 Android",
    "latitude": "25.5899",
    "longitude": "85.1606",
    "bio_type": "0",
    "pid_data": "BASE64_ENCODED_PID_XML"
}

Responses

  • 200 · application/json default

    Success

    Example

    {
        "status": "success",
        "message": "Daily Auth Completed Successfully",
        "data": {
            "reference_id": "TFA2026100300001",
            "status": "success",
            "is_chargeable": true,
            "charge": "0.9440"
        }
    }
  • 200 · application/json

    Failed or rejected

    Example

    {
        "status": "success",
        "message": "Authentication Failed. Invalid Biometric data.",
        "data": {
            "reference_id": "TFA2026100300002",
            "status": "failed",
            "is_chargeable": true,
            "charge": "0.9440"
        }
    }

Errors

  • INVALID_API_KEY · HTTP 401

    Invalid or revoked API key.

    {
        "message": "Invalid or revoked API key."
    }
  • TIMESTAMP_OUT_OF_RANGE · HTTP 400

    Request timestamp is outside the ±15 second window.

    {
        "message": "Request timestamp is outside the ±15 second window."
    }
  • service_not_enabled · HTTP 403

    AEPS is not enabled for your account. Contact your account manager to activate it.

    {
        "status": "error",
        "code": "service_not_enabled",
        "message": "AEPS is not enabled for your account. Contact your account manager to activate it."
    }
  • RATE_LIMITED · HTTP 429

    Rate limit exceeded.

    {
        "message": "Rate limit exceeded."
    }
  • agent_not_found · HTTP 404

    Agent not found.

    {
        "status": "error",
        "code": "agent_not_found",
        "message": "Agent not found."
    }
  • agent_blocked · HTTP 403

    This agent is blocked. Contact support.

    {
        "status": "error",
        "code": "agent_blocked",
        "message": "This agent is blocked. Contact support."
    }
  • duplicate_reference_id · HTTP 409

    This reference_id was already used. Send a new one.

    {
        "status": "error",
        "code": "duplicate_reference_id",
        "message": "This reference_id was already used. Send a new one."
    }
  • insufficient_wallet_balance · HTTP 402

    Wallet balance is too low for the Daily 2FA charge of Rs 0.9440.

    {
        "status": "error",
        "code": "insufficient_wallet_balance",
        "message": "Wallet balance is too low for the Daily 2FA charge of Rs 0.9440."
    }
  • provider_rejected · HTTP 422

    The bank network refused the request. The message says why.

    {
        "status": "error",
        "code": "provider_rejected",
        "message": "The bank network refused the request. The message says why."
    }
  • provider_unavailable · HTTP 502

    The AEPS provider did not respond. Try again shortly.

    {
        "status": "error",
        "code": "provider_unavailable",
        "message": "The AEPS provider did not respond. Try again shortly."
    }
  • noble_credentials_unavailable · HTTP 503

    Provider credentials are not available. Contact your partner.

    {
        "status": "error",
        "code": "noble_credentials_unavailable",
        "message": "Provider credentials are not available. Contact your partner."
    }

Rate Limits

100/min