> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crypto-cash.world/llms.txt
> Use this file to discover all available pages before exploring further.

# Получение конкретной транзакции

> Возвращает детали конкретной транзакции по externalId или internalId



## OpenAPI

````yaml /APIs/crypto-cash-openapi.json post /merchant/api/v1/balance/payments/retrieve/
openapi: 3.1.0
info:
  title: CryptoCash Merchant API
  description: >-
    API для работы с криптовалютными платежами. Все запросы требуют
    аутентификации через подпись. Тело запроса содержит: data (JSON-объект в
    base64) и signature (SHA256(SECRET_KEY + data) в base64).
  version: 1.0.0
servers:
  - url: https://api.crypto-cash.world
    description: Production server
security: []
tags:
  - name: Balance
    description: Операции с балансом
  - name: Actions
    description: 'Действия: покупка, продажа, возврат'
  - name: Transactions
    description: Работа с транзакциями
  - name: Reference
    description: Справочная информация
externalDocs:
  description: Внешние курсы валют
  url: https://rates.crypto-cash.world/api/v1/market/rates/export/json
paths:
  /merchant/api/v1/balance/payments/retrieve/:
    post:
      tags:
        - Transactions
      summary: Получение конкретной транзакции
      description: Возвращает детали конкретной транзакции по externalId или internalId
      operationId: getPayment
      requestBody:
        required: true
        description: |-
          Параметры данных:
          - **publicKey** (обязательный)
          - **externalId** (опционально если передан internalId)
          - **internalId** (опционально если передан externalId)
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignedRequest'
        x-data-schema:
          $ref: '#/components/schemas/PaymentRetrieveRequest'
      responses:
        '200':
          description: Успешный ответ
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 200
                  data:
                    type: object
                    properties:
                      item:
                        $ref: '#/components/schemas/Transaction'
        '400':
          description: Ошибка запроса
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SignedRequest:
      type: object
      required:
        - data
        - signature
      properties:
        data:
          type: string
          description: JSON-объект с параметрами запроса, закодированный в base64
        signature:
          type: string
          description: Подпись SHA256(SECRET_KEY + data), закодированная в base64
    Transaction:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Внутренний ID транзакции
        pair:
          type: string
          description: Валютная пара
          example: USDT/USDT
        usdtTotal:
          type: string
          description: Общая сумма в USDT
        network:
          type: string
          description: Сеть
        hash:
          type: string
          description: Хеш транзакции
        amount:
          type: string
          description: Сумма
        commission:
          type: string
          description: Комиссия
        address:
          type: string
          description: Адрес
        exchangeRate:
          type: string
          description: Курс обмена
        networkFee:
          type: string
          description: Комиссия сети
        externalId:
          type: string
          description: Внешний ID
        transactionType:
          type: string
          enum:
            - Buy
            - Sale
          description: Тип транзакции
        createdAt:
          type: string
          format: date-time
          description: Дата создания
        updatedAt:
          type: string
          format: date-time
          description: Дата обновления
        status:
          $ref: '#/components/schemas/TransactionStatus'
        balanceEntries:
          type: array
          items:
            $ref: '#/components/schemas/BalanceEntry'
    Error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: integer
          description: Список кодов ошибок
      example:
        errors:
          - 1000
    TransactionStatus:
      type: string
      enum:
        - Queued
        - New
        - Waiting
        - Paid
        - Underpaid
        - Overpaid
        - Canceled
        - AMLFrozen
        - CurrencyMismatch
        - CanceledButPaid
        - CanceledButOverpaid
        - CanceledButUnderpaid
      description: Статус транзакции
    BalanceEntry:
      type: object
      properties:
        id:
          type: string
          format: uuid
        updatedAt:
          type: string
          format: date-time
        currency:
          type: string
        requestedCurrency:
          type: string
        exchangeRate:
          type: string
        requestedAmount:
          type: string
        feeAmount:
          type: string
        amount:
          type: string
        hash:
          type: string
        direction:
          type: string
          enum:
            - IN
            - OUT

````