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

# Retrieve Transaction Status

> This GET API retrieves transaction details from the database based on the provided order ID.

# Retrieve Transaction By Order ID

This endpoint retrieves **transaction details** from the database based on the provided order ID.

## Path Parameters

* **id** (string, required):\
  The unique identifier of the transaction record to be retrieved.
  * Example: `123457`
  * If a valid ID is provided, the API will return the transaction details.

📌 **How it Works**\
The system fetches transaction data for the given ID and returns transaction details.

## Request Headers

* **User-Agent** (string, optional): The User-Agent header, which is not mandatory.

## Example Request

```http theme={null}
GET /transaction/123457
User-Agent: Mozilla/5.0
```


## OpenAPI

````yaml GET /transactions-history/{id}
openapi: 3.0.1
info:
  title: OP APIs
  description: OP APIs
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://sandbox.omnispay.com/api/
    description: Sandbox server for testing and integration without affecting live data
security:
  - apiKey: []
    hmacSignature: []
    accountId: []
paths:
  /transactions-history/{id}:
    get:
      tags:
        - Public API for Transaction Details
      summary: Retrieve a transaction by order ID
      description: >-
        This GET API retrieves transaction details from the database based on
        the provided order ID.
      operationId: getTransactionById
      parameters:
        - name: id
          in: path
          description: Order ID for retrieving the transactions
          required: true
          schema:
            type: string
        - name: User-Agent
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK. Transaction details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonResponse'
        '400':
          description: Bad Request. Invalid or malformed order ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonResponse'
        '401':
          description: >-
            Unauthorized. Access is denied due to invalid or missing
            authorization token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonResponse'
        '403':
          description: Forbidden. You do not have permission to access this transaction
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonResponse'
        '404':
          description: Not Found. No transaction exists for the specified ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonResponse'
        '409':
          description: Conflict. A conflict occurred while processing the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonResponse'
        '429':
          description: >-
            Too Many Requests. The user has exceeded the allowed number of
            requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonResponse'
        '500':
          description: >-
            Internal Server Error. An unexpected error occurred while processing
            the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonResponse'
components:
  schemas:
    CommonResponse:
      type: object
      properties:
        status:
          type: string
        message:
          type: string
        response:
          type: object
  securitySchemes:
    apiKey:
      type: apiKey
      name: apiKey
      in: header
    hmacSignature:
      type: apiKey
      name: X-HMAC-Signature
      in: header
    accountId:
      type: apiKey
      name: accountId
      in: header

````