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

# Get Transaction by ID

Retrieve a specific transaction by its unique ID or reference. Returns detailed information about the transaction including status, amounts, recipient details, and account details.


## OpenAPI

````yaml GET /v1/transactions/{id}
openapi: 3.1.0
info:
  title: Hashrails API
  description: >-
    Comprehensive API documentation for Hashrails – easily create, manage, and
    query virtual accounts, recipients, and bank integrations. Secure, scalable,
    and developer-friendly.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.railsfromthecrypt.com
  - url: https://api.hashrails.com
security: []
paths:
  /v1/transactions/{id}:
    get:
      tags:
        - Transactions
      summary: Get a transaction by ID or reference
      operationId: PublicTransactionsController_getTransaction
      parameters:
        - name: X-API-Key
          in: header
          description: API key for authentication
          required: true
          schema:
            type: string
        - name: id
          required: true
          in: path
          description: Transaction ID or reference
          schema:
            example: TXN-4DU24WAE6YIXPM5J
            type: string
      responses:
        '200':
          description: Transaction retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicTransactionResponseDto'
        '404':
          description: Transaction not found
components:
  schemas:
    PublicTransactionResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Transfer request ID
          example: c17d2777-e604-45e2-b6d5-7743652eadf1
        reference:
          type: string
          description: Transfer request reference
          example: TXN-2Z82FVYO6BW22RC7
        amount_sent:
          type: number
          description: Amount to transfer
          example: 1000
        source_currency:
          type: string
          description: Currency code
          example: NGN
        amount_received:
          type: number
          description: Amount that will be received
          example: 0.64
        destination_currency:
          type: string
          description: Destination currency code
          example: USDC
        rate:
          type: string
          description: Exchange rate used
          example: '1560.63'
        fee:
          type: string
          description: Transaction fee
          example: '10.00'
        status:
          type: string
          description: Transfer status
          example: awaiting_payment
          enum:
            - awaiting_payment
            - expired
            - payment_confirmed
            - transaction_completed
            - cancelled
            - refunded
            - failed
        created_at:
          type: string
          format: date-time
          description: Creation timestamp
          example: '2024-01-15T10:30:00Z'
        recipient:
          description: Recipient information
          oneOf:
            - $ref: '#/components/schemas/PublicCryptoRecipientResponseDto'
            - $ref: '#/components/schemas/PublicFiatRecipientResponseDto'
        payment_account:
          $ref: '#/components/schemas/PublicLookupAccountResponseDto'
          description: >-
            Bank account details for NGN payment. Transfer the specified amount
            to this account to initiate transaction processing. A webhook
            notification will be sent upon successful payment receipt.
        transaction_hash:
          type: string
          description: Transaction hash after the transaction has been completed.
          example: 0x1234567890abcdef...
        failure_reason:
          type: string
          description: >-
            Failure reason if the transaction is canceled or fails. This field
            will be updated with the reason when a transaction fails.
          example: Insufficient funds
      required:
        - id
        - reference
        - amount_sent
        - source_currency
        - amount_received
        - destination_currency
        - rate
        - fee
        - status
        - created_at
        - recipient
        - payment_account
    PublicCryptoRecipientResponseDto:
      type: object
      properties:
        id:
          type: string
          example: rec_01J8V9ZP3A7
        type:
          type: string
          example: crypto
        name:
          type: string
          example: Vendor Payment
        active:
          type: boolean
          example: true
        details:
          type: object
          properties:
            network:
              type: string
              example: Polygon
            wallet_address:
              type: string
              example: '0x3fA91D6b84bE2c0BFD7647a92E5B1A2Ec6F8C91e'
            symbol:
              type: string
              example: USDT
        created_at:
          type: string
          example: '2025-10-10T09:15:21Z'
      required:
        - id
        - type
        - name
        - active
        - details
        - created_at
    PublicFiatRecipientResponseDto:
      type: object
      properties:
        id:
          type: string
          example: rec_01J8V9ZP3A7
        type:
          type: string
          example: fiat
        name:
          type: string
          example: Acme Ltd
        active:
          type: boolean
          example: true
        details:
          type: object
          properties:
            bank_name:
              type: string
              example: Wema Bank
            account_number:
              type: string
              example: '0123456789'
            account_name:
              type: string
              example: ACME LTD
            currency:
              type: string
              example: NGN
        created_at:
          type: string
          example: '2025-10-10T09:15:21Z'
      required:
        - id
        - type
        - name
        - active
        - details
        - created_at
    PublicLookupAccountResponseDto:
      type: object
      properties:
        account_number:
          type: string
          example: '1234567890'
        account_name:
          type: string
          example: John Doe
        bank_name:
          type: string
          example: Wema Bank
      required:
        - account_number
        - account_name
        - bank_name

````