---
title: "Cash Withdrawal OTP API Reference"
description: "Generate the transaction OTP required before an AePS cash withdrawal above ₹5,000."
canonical: "https://eps.eko.in/docs/aeps-fingpay-cash-withdrawal-otp"
---


> **Canonical URL:** https://eps.eko.in/docs/aeps-fingpay-cash-withdrawal-otp
> This is a machine-readable Markdown version of the page for AI agents and LLMs. The primary (HTML) version lives at the canonical URL above.

# Cash Withdrawal OTP API Reference

`POST https://staging.eko.in/ekoapi/v3/customer/collection/aeps-fingpay/cash-withdrawal/otp/{customer_id}`

Generate the transaction OTP required before an AePS cash withdrawal above ₹5,000.

Fingpay requires a fresh, transaction-scoped OTP for every cash withdrawal above **₹5,000**. Call this before Cash Withdrawal only when `amount` is greater than ₹5,000 — for ₹5,000 or less, skip it and call Cash Withdrawal directly.

On success the customer receives a 6-digit OTP by SMS on their Aadhaar-linked mobile, and the response returns `data.fp_transaction_id`. Send that id to Cash Withdrawal as `txn_otp_request_id`, and put the SMS OTP in the `otp` attribute of the PidOptions used to capture the customer's fingerprint. They are two different values, and Cash Withdrawal needs both. The id belongs to this one withdrawal attempt: generate a new one for every attempt and never reuse it.

No biometric capture happens in this call — it takes no `piddata`.

> View product & pricing details: [AePS Cashout](https://eps.eko.in/products/aeps-api.md)

## Path parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| customer_id | string | yes | Customer's registered mobile number. e.g. 9000000000 |

## Body parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| initiator_id | string | yes | Registered mobile number of the API user (see Platform Credentials). e.g. 9962981729 |
| client_ref_id | string | no | Unique reference ID per API call, generated by your system (max 20 characters). The SDKs generate one for every non-GET call when you don't. e.g. 2026010100123456789 |
| user_code | string | yes | Unique code of your user/agent/retailer the service is run for. Use `Onboard Agent` API to register your users e.g. 10000001 |
| bank_code | string | no | Short bank code identifying the customer's Aadhaar-linked bank (e.g. `HDFC`, `SBIN`). Obtain from the bank list API. Recommended — send the same value you will use for the withdrawal. e.g. HDFC |
| aadhar | string | yes | RSA-encrypted, Base64-encoded Aadhaar number of the customer — the same value you send to Cash Withdrawal. Encrypt the 12-digit Aadhaar with the Eko RSA public key using PKCS#1 v1.5 padding (Java's default `Cipher.getInstance("RSA")`), then Base64-encode the ciphertext. e.g. BASE64_ENCRYPTED_AADHAAR |
| latlong | string | yes | GPS coordinates of the agent's device in 'latitude,longitude' format. e.g. 28.6139,77.2090 |
| amount | number | yes | Withdrawal amount in Indian Rupees (integer) — the same amount you will send to Cash Withdrawal. Only call this API when it is above ₹5,000. e.g. 6000 |

## Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| developer_key | string | yes | Static API key issued to your account after KYC. |
| secret-key | string | yes | Dynamic per-request signature: base64(HMAC-SHA256(timestamp, base64(access_key))). |
| secret-key-timestamp | string | yes | Current time in milliseconds since UNIX epoch, used to compute secret-key. Must match server time. |
| content-type | string | yes | application/json e.g. application/json |

## Response

⭐ marks fields highlighted as verifiable.

| Field | Type | Description |
| --- | --- | --- |
| status | number | Primary success indicator (0 = success). |
| message | string | Human-readable response / error message. |
| response_status_id | number | Granular status id; see the shared error-codes table. |
| response_type_id | number | A unique id for every possible response shape (success or error) — useful for client logic branching and analytics. |
| data | object | API-specific response payload. |
| data.fp_transaction_id ⭐ | string | OTP reference id for this one withdrawal attempt. Send it to Cash Withdrawal as `txn_otp_request_id`. It is NOT the OTP — the customer receives that by SMS. |

## Response types

Branch on `response_type_id` to decide the next call:

| response_type_id | Meaning | Next step |
| --- | --- | --- |
| 1459 | OTP generated and sent to the customer by SMS — send `data.fp_transaction_id` as `txn_otp_request_id` to Cash Withdrawal | [aeps-fingpay-cash-withdrawal](https://eps.eko.in/docs/aeps-fingpay-cash-withdrawal.md) |

## Example request

```json
{
  "initiator_id": "9962981729",
  "client_ref_id": "2026010100123456789",
  "user_code": "10000001",
  "bank_code": "HDFC",
  "aadhar": "BASE64_ENCRYPTED_AADHAAR",
  "latlong": "28.6139,77.2090",
  "amount": 6000
}
```

## Example response

`response_type_id` `1459` — OTP generated and sent to the customer by SMS — send `data.fp_transaction_id` as `txn_otp_request_id` to Cash Withdrawal. Next step: [aeps-fingpay-cash-withdrawal](https://eps.eko.in/docs/aeps-fingpay-cash-withdrawal.md).

```json
{
  "response_status_id": 0,
  "data": {
    "fp_transaction_id": "FP2609010001234567"
  },
  "response_type_id": 1459,
  "message": "OTP generated successfully. Use the reference ID for your transaction.",
  "status": 0
}
```

## Error scenarios

| Status | response_type_id | Scenario |
| --- | --- | --- |
| 200 | — | OTP generation failed — generic Fingpay failure. There are no OTP-specific error codes yet; `message` carries the gateway's reason |
