Vizo Digital Api
Sign in

AEPS · Transactions

Generate OTP

Send an OTP to the customer for a high-value cash withdrawal.

POST request

URL: https://uat-api.vizodigital.com/api/v1/aeps/otp

Body

{
    "agent_code": "AC12345678",
    "reference_id": "TXN2026100300001",
    "amount": 6000,
    "bank_iin": "607094",
    "customer_mobile": "9876543210",
    "customer_aadhaar": "123456789012",
    "channel": "APP",
    "device_id": "8f2d7c9a12bc45ef",
    "ip_address": "49.47.133.99",
    "user_agent": "Mozilla/5.0 Android",
    "latitude": "25.5899",
    "longitude": "85.1606"
}

Include a valid Bearer token with every request

Code sample

curl -X POST "https://uat-api.vizodigital.com/api/v1/aeps/otp" \
  -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 '{
    "agent_code": "AC12345678",
    "reference_id": "TXN2026100300001",
    "amount": 6000,
    "bank_iin": "607094",
    "customer_mobile": "9876543210",
    "customer_aadhaar": "123456789012",
    "channel": "APP",
    "device_id": "8f2d7c9a12bc45ef",
    "ip_address": "49.47.133.99",
    "user_agent": "Mozilla/5.0 Android",
    "latitude": "25.5899",
    "longitude": "85.1606"
}'

Success Response

{
    "status": "success",
    "message": "OTP sent to the customer.",
    "data": {
        "otp_required": true,
        "otp_reference": "OTP64564123"
    }
}

Failure response

{
    "status": "error",
    "code": "provider_rejected",
    "message": "Daily 2FA is pending for this agent."
}

Overview

Asks the bank network to send an OTP to the customer's mobile. Needed only when Agent Status shows otp_amount and the cash withdrawal is at or above it. Otherwise skip this step.

Notes

  • The agent must have completed KYC and today's Daily 2FA.
  • If otp_required is true, send the returned otp_reference in the Transaction call. If it is false, send no otp_reference.
  • Nothing is saved on our side and nothing is charged.
  • The amount must be between the minimum and maximum set for your account (default Rs 100 to Rs 10,000).

Testing in UAT

  • Sandbox keys never reach the bank network.
  • An amount of 5001 or more returns otp_required: true.

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

Body

application/json required

Generate OTP request body

Schema

{
    "type": "object",
    "required": [
        "agent_code",
        "reference_id",
        "amount",
        "bank_iin",
        "customer_mobile",
        "customer_aadhaar",
        "channel",
        "device_id",
        "ip_address",
        "user_agent",
        "latitude",
        "longitude"
    ],
    "properties": {
        "agent_code": {
            "type": "string",
            "description": "The `agent_code` you sent when onboarding the agent."
        },
        "reference_id": {
            "type": "string",
            "description": "Your unique ID for the transaction. Use the same ID in the Transaction call. Letters, digits, `-` and `_`, max 40."
        },
        "amount": {
            "type": "integer",
            "description": "Amount in whole rupees."
        },
        "bank_iin": {
            "type": "string",
            "description": "Bank IIN from List Banks."
        },
        "customer_mobile": {
            "type": "string",
            "description": "10-digit customer mobile number."
        },
        "customer_aadhaar": {
            "type": "string",
            "description": "12-digit customer Aadhaar number. It is passed to the bank network and never stored in full."
        },
        "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."
        }
    }
}

Example

{
    "agent_code": "AC12345678",
    "reference_id": "TXN2026100300001",
    "amount": 6000,
    "bank_iin": "607094",
    "customer_mobile": "9876543210",
    "customer_aadhaar": "123456789012",
    "channel": "APP",
    "device_id": "8f2d7c9a12bc45ef",
    "ip_address": "49.47.133.99",
    "user_agent": "Mozilla/5.0 Android",
    "latitude": "25.5899",
    "longitude": "85.1606"
}

Responses

  • 200 · application/json default

    Success

    Example

    {
        "status": "success",
        "message": "OTP sent to the customer.",
        "data": {
            "otp_required": true,
            "otp_reference": "OTP64564123"
        }
    }
  • 422 · application/json

    Failed or rejected

    Example

    {
        "status": "error",
        "code": "provider_rejected",
        "message": "Daily 2FA is pending for this agent."
    }

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."
    }
  • kyc_required · HTTP 409

    Complete KYC for this agent before sending transactions.

    {
        "status": "error",
        "code": "kyc_required",
        "message": "Complete KYC for this agent before sending transactions."
    }
  • daily_2fa_required · HTTP 409

    This agent has not done Daily 2FA today.

    {
        "status": "error",
        "code": "daily_2fa_required",
        "message": "This agent has not done Daily 2FA today."
    }
  • amount_out_of_range · HTTP 422

    Amount must be between Rs 100 and Rs 10000.

    {
        "status": "error",
        "code": "amount_out_of_range",
        "message": "Amount must be between Rs 100 and Rs 10000."
    }
  • bank_not_supported · HTTP 422

    This bank is not available for AEPS. Use the bank list endpoint.

    {
        "status": "error",
        "code": "bank_not_supported",
        "message": "This bank is not available for AEPS. Use the bank list endpoint."
    }
  • 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