---
title: "getTransactionByIdempotencyKey"
method: GET
path: "/v2/transaction/idempotency/{idempotencyKey}"
tags: ["Create & Manage Transactions"]
---

# getTransactionByIdempotencyKey

`GET /v2/transaction/idempotency/{idempotencyKey}`

Fetches the original transaction response by the idempotency key used during the POST /v2/transaction request.

**Security Behavior**

To prevent information leakage, this endpoint returns an empty object `{}` in all negative cases — including when the idempotency key does not exist and when the key exists but belongs to a different merchant. Callers cannot distinguish between the two scenarios.

**Loss of Reference Behavior**

The idempotency key can reference the transaction only until the TTL expires. The current TTL is 1 day. After that, the transaction may exist but cannot be retrieved by the idempotency key.

## Headers

- `Content-Type` string
- `authorization` string

## Response `200`

Returns the transaction response originally stored for this idempotency key, or an empty object if no record is found or the key belongs to a different merchant.

- union
  - TransactionGetResponse
    - `transaction` object
      - `id` string
      - `amount` object
        - `amount` integer
        - `currency` string
      - `status` string
      - `paymentType` string
      - `userId` string
      - `title` string
      - `referenceId` string
      - `attributes` object[]
      - `createdDate` string, date-time
      - `modifiedDate` string, date-time
      - `apFee` string
      - `isRtp` boolean
      - `merchantId` integer
      - `locationId` integer
      - `userAccountId` integer
  - EmptyResponse

## Other responses

- `400` — Missing or invalid idempotency key

---

[API](https://skmtc.net/aero/apis/aeropay-v2-api.md) · [All operations](https://skmtc.net/aero/apis/aeropay-v2-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aero/aeropay-v2-api/revisions/4700c4ceeaad/schema)
