---
title: "Initiate Refund API Reference"
description: "Refund a failed transaction to the customer after OTP consent."
canonical: "https://eps.eko.in/docs/initiate-refund"
---


> **Canonical URL:** https://eps.eko.in/docs/initiate-refund
> 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.

# Initiate Refund API Reference

`POST https://staging.eko.in/ekoapi/v3/customer/payment/refund/{tid}`

Refund a failed transaction to the customer after OTP consent.

Refunds the e-value for a failed transaction back to your account, acting as consent that you have returned the cash to the customer. Requires the OTP (and otp_ref_id) from Get Refund OTP. Returns the financial response envelope with the refund transaction id and reversed amounts.

> View product & pricing details: [Transactions & Refunds](https://eps.eko.in/products/transactions-api.md)

## Path parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| tid | string | yes | Transaction ID from the Initiate Transaction call. e.g. 13192443 |

## Body parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| initiator_id | string | yes | Registered mobile number of the API user (see Platform Credentials). e.g. 9962981729 |
| user_code | string | yes | User code of the retailer/agent the service is run for. e.g. 20810200 |
| otp | integer | yes | OTP sent to the customer's mobile number. e.g. 123456 |
| otp_ref_id | string | no | otp_ref_id received from Get Refund OTP. e.g. zCISyglexo0Pjqp4YrS2ssweuD9v1c3aLKGxjTW8wU7An8Wem1UyNws5830yh7q/sf5J4R3BY= |
| service_code | integer | no | Fixed service code. For PayPoint send 80. e.g. 80 |
| state | integer | no | Fixed value. Send 1. e.g. 1 |

## 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. |
| tx_status | string | Transaction state: 0=Success, 1=Fail, 2=Awaited, 3=Refund Pending, 4=Refunded, 5=On Hold. |
| txstatus_desc | string | Human-readable transaction status. |
| data | object | API-specific response payload. |
| data.refund_tid ⭐ | string | Transaction ID of the refund. |
| data.refunded_amount ⭐ | string | Total amount refunded (INR). |
| data.amount | string | Original transaction amount (INR). |
| data.fee | string | Fee reversed (INR). |
| data.balance ⭐ | string | Account balance after the refund (INR). |
| data.tid | string | Original transaction ID. |

## Example request

```json
{
  "initiator_id": "9962981729",
  "user_code": "20810200",
  "otp": 123456,
  "otp_ref_id": "zCISyglexo0Pjqp4YrS2ssweuD9v1c3aLKGxjTW8wU7An8Wem1UyNws5830yh7q/sf5J4R3BY=",
  "service_code": 80,
  "state": 1
}
```

## Example response

```json
{
  "response_status_id": 0,
  "data": {
    "refund_tid": "2147591637",
    "amount": "5000.00",
    "tds": "7.1",
    "balance": "2.22263731286E9",
    "fee": "50.0",
    "currency": "INR",
    "commission_reverse": "28.38",
    "tid": "13192443",
    "timestamp": "2018-10-30T12:00:14.058Z",
    "refunded_amount": "5050.00"
  },
  "response_type_id": 74,
  "message": "Refund done",
  "status": 0
}
```
