# Get Transaction By ID

<mark style="color:blue;">`GET`</mark> /v3/transactions/<mark style="color:orange;">{transactionId}</mark>

## Request

The details below help you form your HTTP requests to this endpoint.

### Headers

You may need to provide specific headers.

<table><thead><tr><th>Name</th><th>Type</th><th data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td>x-consumer-custom-id</td><td>string</td><td>true</td><td>Consumer data with the format "channel:vendorId"</td></tr></tbody></table>

### Path Parameters

The endpoint path expects parameters.

<table><thead><tr><th>Name</th><th>Type</th><th data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td>transactionId</td><td>string</td><td>true</td><td>The transaction ID provided at lease generation.</td></tr></tbody></table>

## Response

The details below help you understand the responses you could get from this endpoint.

### Samples

Below are samples of responses, with tabs corresponding to returned status code.

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

```javascript
{
    "data": {
        "id": "eyJhbGcfasdvczOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "orderId": "2f962a52-df63-426f-abc7-617055dba2f7",
        "customer": {
            "id": "5a319511a86980001d602095",
            "firstName": "John",
            "lastName": "Doe",
            "email": "johndoe@flexshopper.com"
        },
        "shippingCost": 1.23,
        "createdAt": "2018-03-19T15:51:27.080Z",
        "lease": {
            "id": "eyJhbGcfasdvczOiJIUzI1NiIsInR5cCI6IkpXVC...",
            "status": "signed"
        },
        "items": [
            {
                "description": "iPad Mini",
                "sku": "abc123",
                "brand": "Apple",
                "cost": 100.23,
                "quantity": 1,
                "quantityByStatus": {
                    "ordered": 1,
                    "shipped": 1
                }
            }
        ],
        "purchaseTotal": 3795,
        "purchaseSalesTax": 808
    }
}
```

{% endtab %}

{% tab title="400" %}

```javascript
{
    "error": {
        "statusCode": 400,
        "code": "UserAlreadyExists",
        "message": "User already exists with email ex@example.com",
        "data": {}
    }
}
```

{% endtab %}

{% tab title="404" %}

```javascript
{
    "error": {
        "statusCode": 404,
        "code": "LeaseNotFound",
        "message": "The lease requested was not found",
        "data": {}
    }
}
```

{% endtab %}
{% endtabs %}

### Schema

The response's schema is outlined below.

<table><thead><tr><th>Name</th><th>Type</th><th data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>false</td><td>N/A</td></tr><tr><td>data.id</td><td>string</td><td>true</td><td>transaction identifier</td></tr><tr><td>data.orderId</td><td>string</td><td>false</td><td>The reference to the external order ID</td></tr><tr><td>data.customer</td><td>object</td><td>false</td><td>N/A</td></tr><tr><td>data.customer.id</td><td>string</td><td>true</td><td>User id</td></tr><tr><td>data.customer.firstName</td><td>string</td><td>false</td><td>First Name</td></tr><tr><td>data.customer.lastName</td><td>string</td><td>false</td><td>Last Name</td></tr><tr><td>data.customer.email</td><td>string</td><td>false</td><td>Last Name</td></tr><tr><td>data.shippingCost</td><td>number</td><td>true</td><td>shipping cost number</td></tr><tr><td>data.createdAt</td><td>string</td><td>true</td><td>transaction creation date</td></tr><tr><td>data.lease</td><td>object</td><td>false</td><td>N/A</td></tr><tr><td>data.lease.id</td><td>string</td><td>true</td><td>order identifier</td></tr><tr><td>data.lease.status</td><td>string</td><td>true</td><td>Signing status of the transaction</td></tr><tr><td>data.items</td><td>array</td><td>false</td><td>N/A</td></tr><tr><td>data.items[].description</td><td>string</td><td>true</td><td>item description</td></tr><tr><td>data.items[].sku</td><td>string</td><td>true</td><td>item sku number</td></tr><tr><td>data.items[].brand</td><td>string</td><td>true</td><td>item brand</td></tr><tr><td>data.items[].cost</td><td>number</td><td>true</td><td>item cost</td></tr><tr><td>data.items[].quantity</td><td>number</td><td>true</td><td>item quantity</td></tr><tr><td>data.items[].quantityByStatus</td><td>object</td><td>false</td><td>Items quantity grouped by status</td></tr><tr><td>data.purchaseTotal</td><td>number</td><td>false</td><td>total purchase cost in cents</td></tr><tr><td>data.purchaseSalesTax</td><td>number</td><td>false</td><td>total sale tax in cents</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.flexshopper.com/medusa/3.0-beta/lease/get-transaction-by-id.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
