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

# Get Transaction

> Retrieves details of a specific transaction by its ID.

## Get Transaction

The Get Transaction API allows you to retrieve detailed information about a specific transaction using its unique transaction ID. This endpoint provides comprehensive transaction details including status, amounts, fees, and recipient information.

### Transaction Details

When you retrieve a transaction, you'll get the following information:

* **Transaction ID**: Unique identifier for the transaction
* **Type**: Type of transaction (payout, deposit, transfer, etc.)
* **Amount**: Transaction amount in the specified currency
* **Status**: Current status of the transaction
* **Reference**: Your custom reference number
* **Timestamps**: Creation and completion times
* **Fees**: Detailed breakdown of all fees applied
* **Recipient Details**: Information about the transaction recipient

### Transaction Types

<Accordion title="Payout">
  Outbound payments to external accounts or recipients.

  **Common Statuses:**

  * `pending` - Awaiting processing
  * `processing` - Being processed
  * `completed` - Successfully sent
  * `failed` - Processing failed
</Accordion>

<Accordion title="Deposit">
  Inbound payments received into your account.

  **Common Statuses:**

  * `pending` - Awaiting confirmation
  * `confirmed` - Payment confirmed
  * `completed` - Successfully credited
</Accordion>

<Accordion title="Transfer">
  Internal transfers between your own accounts.

  **Common Statuses:**

  * `pending` - Awaiting processing
  * `completed` - Successfully transferred
</Accordion>

### Status Meanings

Understanding transaction statuses is crucial for proper handling:

<Accordion title="Pending">
  Transaction has been created but not yet processed. This is the initial state for most transactions.
</Accordion>

<Accordion title="Processing">
  Transaction is currently being processed by the payment provider or bank.
</Accordion>

<Accordion title="Completed">
  Transaction has been successfully completed and funds have been transferred.
</Accordion>

<Accordion title="Failed">
  Transaction could not be completed. Check the error details for specific failure reasons.
</Accordion>

<Accordion title="Cancelled">
  Transaction was cancelled either by you or the system before completion.
</Accordion>

### Fee Structure

Transactions may include various types of fees:

* **Processing Fee**: Fee charged by meCash for processing the transaction
* **Network Fee**: Fee charged by the payment network (bank, mobile money provider, etc.)
* **Currency Conversion Fee**: Fee for currency conversion (if applicable)
* **International Transfer Fee**: Additional fee for cross-border transactions

### Use Cases

* **Transaction Monitoring**: Track the status of your payments
* **Reconciliation**: Match transactions with your internal records
* **Customer Support**: Provide transaction details to customers
* **Audit Trail**: Maintain records for compliance and auditing
* **Error Investigation**: Debug failed transactions

### Best Practices

* Store transaction IDs for future reference
* Implement polling or webhooks for real-time status updates
* Handle different statuses appropriately in your application
* Keep transaction records for accounting and compliance
* Use the reference field to link transactions to your internal systems


## OpenAPI

````yaml get /v1/transaction/{transactionId}
openapi: 3.0.3
info:
  title: meCash API
  version: 3.0.3
  description: >-
    API for meCash services, including FIAT and Ramp operations. This is the
    OpenAPI specification for the meCash API, covering all available endpoints
    for wallet management, currency quotes, and payouts.


    It follows a design-first approach based on OpenAPI 3.0.


    Authentication is handled via an API key passed in the `x-api-key` header.
    Replace `YOUR_API_KEY` with your actual key when making requests.


    Some useful links:

    - [meCash Documentation](https://docs.me-cash.com/)

    - [Authentication Guide](https://docs.me-cash.com/authentication)
servers:
  - url: https://sandboxapi.me-cash.com
    description: Sandbox Server for Testing
security:
  - ApiKeyAuth: []
tags:
  - name: Wallet
    description: Wallet management operations
  - name: Quote
    description: Currency quote operations
  - name: Payout
    description: Payout operations
  - name: Transaction
    description: Transaction management
  - name: Virtual Account
    description: Virtual account operations for static and dynamic accounts
  - name: Bank
    description: Bank account and list operations
  - name: Ramp
    description: Ramp operations for crypto
  - name: Miscellaneous
    description: Utility and miscellaneous operations
  - name: Collection
    description: Mobile money and wallet funding operations
  - name: Bulk Payout
    description: >-
      Bulk transfer operations for sending to multiple beneficiaries in a single
      request
paths:
  /v1/transaction/{transactionId}:
    get:
      tags:
        - Transaction
      summary: Get Transaction
      description: Retrieves details of a specific transaction by its ID.
      operationId: getTransactionById
      parameters:
        - name: transactionId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the transaction
      responses:
        '200':
          $ref: '#/components/responses/GetTransactionSuccess'
        '401':
          $ref: '#/components/responses/PayoutUnauthorized'
        '403':
          $ref: '#/components/responses/PayoutForbidden'
        '404':
          $ref: '#/components/responses/TransactionNotFoundOrInvalid'
components:
  responses:
    GetTransactionSuccess:
      description: Transaction details retrieved successfully.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: transaction fetched successfully
              status:
                type: string
                example: success
              data:
                $ref: '#/components/schemas/GetTransactionSuccessData'
    PayoutUnauthorized:
      description: Unauthorized. The provided API key is invalid or missing.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PayoutFailedResponse'
          example:
            message: Invalid API key
            status: failed
    PayoutForbidden:
      description: >-
        Forbidden. The request is not allowed because the source IP is not
        whitelisted.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PayoutFailedResponse'
          example:
            message: 'Access denied: IP address not whitelisted'
            status: failed
    TransactionNotFoundOrInvalid:
      description: >-
        Not Found. The transaction ID could not be found or the parameter is
        invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PayoutFailedResponse'
          example:
            message: Invalid parameter
            status: failed
  schemas:
    GetTransactionSuccessData:
      type: object
      properties:
        id:
          type: string
          format: uuid
        remark:
          type: string
        reason:
          type: string
        referenceNumber:
          type: string
        type:
          type: string
        state:
          type: string
        quote:
          type: object
          properties:
            id:
              type: string
              format: uuid
            source:
              type: object
              properties:
                currency:
                  type: string
                country:
                  type: string
                amount:
                  type: number
            target:
              type: object
              properties:
                currency:
                  type: string
                country:
                  type: string
                amount:
                  type: number
            rate:
              type: number
            fee:
              type: object
              properties:
                amount:
                  type: number
        recipient:
          type: object
          properties:
            name:
              type: string
            firstName:
              type: string
            lastName:
              type: string
            relationship:
              type: string
            type:
              type: string
            account:
              type: object
              properties:
                sortCode:
                  type: string
                accountNumber:
                  type: string
            paymentChannel:
              type: string
            currency:
              type: string
            country:
              type: string
        created:
          type: string
          format: date-time
        processed:
          type: string
          format: date-time
    PayoutFailedResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message.
        status:
          type: string
          example: failed
      required:
        - message
        - status
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````