> ## 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

> Retrieve details of a specific Ramp transaction by its ID

<Warning>
  🚧 **The Ramp API is currently under construction.** Endpoints and features described here are subject to change. Do not use in production until this notice is removed.
</Warning>

## Get Transaction

This endpoint fetches the complete details of a specific Ramp transaction (either off-ramp or crypto-to-crypto) using its `transactionId`.

***

## Endpoint

`GET` `{{baseURL}}/v1/ramp/transaction/{{transactionId}}`

***

## Headers

| **Header**     | **Value**          | **Required** | **Description**                          |
| -------------- | ------------------ | ------------ | ---------------------------------------- |
| `Content-Type` | `application/json` | Yes          | Specifies that the request body is JSON. |
| `x-api-key`    | `YOUR_API_KEY`     | Yes          | API key for authentication.              |

***

## Path Parameters

| **Parameter**   | **Type** | **Required** | **Description**                       |
| --------------- | -------- | ------------ | ------------------------------------- |
| `transactionId` | string   | Yes          | Unique identifier of the transaction. |

***

## Request Example

<CodeGroup>
  ```bash cURL theme={null}
  # Replace YOUR_TRANSACTION_ID with the actual transaction ID
  curl --location '{{baseURL}}/v1/ramp/transaction/YOUR_TRANSACTION_ID' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json'
  ```

  ```js JavaScript (fetch) theme={null}
  const transactionId = 'YOUR_TRANSACTION_ID';
  fetch(`{{baseURL}}/v1/ramp/transaction/${transactionId}`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': 'YOUR_API_KEY'
    }
  })
  .then(res => res.json())
  .then(console.log)
  .catch(console.error);
  ```

  ```python Python (requests) theme={null}
  import requests

  transaction_id = "YOUR_TRANSACTION_ID"
  url = f"{{baseURL}}/v1/ramp/transaction/{transaction_id}"
  headers = {
      "x-api-key": "YOUR_API_KEY",
      "Content-Type": "application/json"
  }

  response = requests.get(url, headers=headers)
  print(response.json())
  ```

  ```js Node.js (axios) theme={null}
  const axios = require('axios');

  const transactionId = 'YOUR_TRANSACTION_ID';
  axios.get(`{{baseURL}}/v1/ramp/transaction/${transactionId}`, {
    headers: {
      'x-api-key': 'YOUR_API_KEY',
      'Content-Type': 'application/json'
    }
  })
    .then((response) => {
      console.log(response.data);
    })
    .catch((error) => {
      console.error(error.response?.data ?? error.message);
    });
  ```
</CodeGroup>

***

## Success Response (Off-Ramp) 200 OK

```json theme={null}
{
    "message": "transaction fetched successfully",
    "status": "success",
    "data": {
        "id": "8bd9a372-8d2b-494c-b0b2-7f590388b5ce",
        "type": "SEND",
        "category": "OFF_RAMP",
        "state": "COMPLETED",
        "referenceNumber": "YQXUA0ELOHXDL",
        "quote": {
            "id": "55ce26f5-96c1-40cd-9fd3-eba8402db7af",
            "source": {
                "currency": "USDC",
                "symbol": "USDC",
                "type": "CRYPTOCURRENCY",
                "amount": 0.12,
                "blockchain": "MATIC"
            },
            "target": {
                "currency": "NGN",
                "country": "NG",
                "type": "FIAT",
                "paymentChannel": "BANK_TRANSFER",
                "amount": 201.68
            },
            "rate": 0,
            "fees": {
                "amount": 0,
                "gas": {
                    "type": "MEDIUM",
                    "amount": 0.02
                }
            },
            "summary": {
                "total": 0.14
            }
        },
        "recipient": {
            "name": "NZAN  CHRISTIANA OMOM",
            "type": "BUSINESS",
            "account": {
                "bankName": "Guaranty Trust Bank",
                "sortCode": "058",
                "accountNumber": "0712617746"
            },
            "paymentChannel": "BANK_TRANSFER",
            "currency": "NGN",
            "country": "NG"
        },
        "created": "2025-01-08T12:23:51.908663",
        "processed": "2025-01-08T12:30:10.499526"
    }
}
```

***

## Success Response (Crypto-to-Crypto) 200 OK

```json theme={null}
{
    "message": "transaction fetched successfully",
    "status": "success",
    "data": {
        "id": "8bd9a372-8d2b-494c-b0b2-7f590388b5ce",
        "type": "SEND",
        "category": "CRYPTOCURRENCY",
        "state": "COMPLETED",
        "referenceNumber": "YQXUA0ELOHXDL",
        "quote": {
            "id": "55ce26f5-96c1-40cd-9fd3-eba8402db7af",
            "source": {
                "currency": "USDC",
                "symbol": "USDC",
                "type": "CRYPTOCURRENCY",
                "amount": 0.12,
                "blockchain": "MATIC"
            },
            "target": {
                "currency": "USDC",
                "symbol": "USDC",
                "type": "CRYPTOCURRENCY",
                "amount": 0.12,
                "blockchain": "MATIC"
            },
            "rate": 0,
            "fees": {
                "amount": 0,
                "gas": {
                    "type": "MEDIUM",
                    "amount": 0.02
                }
            },
            "summary": {
                "total": 0.14
            }
        },
        "recipient": {
            "address": "0x018b979db90e60d2b2a4f4d3768aca4ec88043ef",
            "alias": "Testing",
            "blockchain": "MATIC",
            "symbol": "POL"
        },
        "created": "2025-01-08T12:23:51.908663",
        "processed": "2025-01-08T12:30:10.499526"
    }
}
```

***

## Error Responses

| **HTTP Status** | **Error Code** | **Message**                | **Description**                                 |
| --------------- | -------------- | -------------------------- | ----------------------------------------------- |
| 401             | `UNAUTHORIZED` | Missing or invalid API key | The `x-api-key` header is missing or incorrect. |
| 404             | `NOT_FOUND`    | Transaction not found      | The specified transaction ID does not exist.    |
| 500             | `SERVER_ERROR` | Internal server error      | An unexpected error occurred on the server.     |
