# Get a Single Transaction

The following APIs returns you the details of a single transaction/order.

{% openapi src="<https://407468006-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfPzmNpsOZnU4ujov7zQD%2Fuploads%2FGZIhvJMToUafVUW9vM6H%2Fswagger-3.1.4.json?alt=media&token=79c5c131-7c7d-49b6-be76-227cb5125de1>" path="/transactions/{txnId}" method="get" %}
[swagger-3.1.4.json](https://407468006-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfPzmNpsOZnU4ujov7zQD%2Fuploads%2FGZIhvJMToUafVUW9vM6H%2Fswagger-3.1.4.json?alt=media\&token=79c5c131-7c7d-49b6-be76-227cb5125de1)
{% endopenapi %}

<mark style="color:green;">`GET`</mark> `/transactions/{txnId}`

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Params**

| Param | Param Type | Type   | Required | Description           |
| ----- | ---------- | ------ | -------- | --------------------- |
| txnId | query      | Number | Yes      | ID of the transaction |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "message": "string",
  "statusCode": 200,
  "data": {
    "txnId": "string",
    "orderId": "string",
    "orderItemId": "number",
    "txnType": 0,
    "txnTypeLabel":"string",
    "product": {
      "id": "string",
      "title": "string"
    },
    "key": {
      "id": "string"
    },
    "county": "string",
    "amount": "number",
    "commission": "number",
    "campaignFee": "number",
    "vatAmount": "number",
    "txnDate": "string"
  }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "message": "Bad Request. Wrong/Invalid params format.",
    "statusCode": 400 
}
```

{% endtab %}

{% tab title="401" %}

```
{
    "message": "UnAuthorized request. Invalid/Expired token",
    "statusCode": 401
}
```

{% endtab %}

{% tab title="403" %}

```
{
    "message": "Forbidden Request. Action not allowed or Rate Limit exhausted.", 
    "statusCode": 403
}
```

{% endtab %}

{% tab title="500" %}

```
{
    "message": "Internal Server Error",
    "statusCode": 500
}
```

{% endtab %}
{% endtabs %}
