> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.greenlane.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.greenlane.ai/_mcp/server.

# Get transaction details

GET https://pos.fuel.greenlane.ai/gfp/merchant/{merchant_id}/transaction/{transaction_id}

Reference: https://docs.greenlane.ai/greenlane-fuel-platform/get-transaction-details

## Authentication

- `Authorization` header (bearer token, required)

## Request

### Path parameters

- `merchant_id` (string, required) — The merchant id
- `transaction_id` (string, required) — The transaction id to get the status of

## Response

### 200

OK

- `merchant_id` (string, required)
- `transaction_id` (string, required)
- `payment_code` (string, required)
- `authorization` (object, required)
  - `event_time_ms` (integer, required)
  - `voids_at` (integer, required)
  - `authorized_flag` (boolean, required)
  - `authorization_code` (string, required)
  - `total_amt_limit` (double, required)
  - `fuel_limits` (list of object, required)
    - `product_code` (string, required)
    - `volume_limit` (integer, required)
  - `currency` (string, required)
- `status` (string, required)
- `site_id` (string, required)
- `capture` (object, required)
  - `event_time_ms` (integer, required)
  - `merchant_initiated` (boolean, required)
  - `transaction_amt` (double, required)
  - `fuel` (list of object, required)
    - `product_code` (string, required)
    - `retail_price_per_unit` (integer, required)
    - `volume` (double, required)
    - `amount` (double, required)
    - `taxes` (list of object, required)
      - `tax_code` (string, required)
      - `amount` (double, required)
      - `exempt` (boolean, required)
    - `pump_number` (integer, required)
    - `unit_of_measure` (string, required)
    - `cost_price_per_unit` (double, required)
  - `authorized_flag` (boolean, required)
  - `authorization_code` (string, required)

## Examples

**Response**

```json
{
  "merchant_id": "merchant-123",
  "transaction_id": "123abcd",
  "payment_code": "75123456",
  "authorization": {
    "event_time_ms": 1787636532000,
    "voids_at": 1787722932000,
    "authorized_flag": true,
    "authorization_code": "string",
    "total_amt_limit": 558.24,
    "fuel_limits": [
      {
        "product_code": "DIESEL_ULSD",
        "volume_limit": 100
      },
      {
        "product_code": "DEF",
        "volume_limit": 1,
        "amount_limit": 58.24
      }
    ],
    "currency": "USD"
  },
  "status": "CAPTURED",
  "site_id": "331",
  "capture": {
    "event_time_ms": 1787636592000,
    "merchant_initiated": false,
    "transaction_amt": 525.43,
    "fuel": [
      {
        "product_code": "DIESEL_ULSD",
        "retail_price_per_unit": 5,
        "volume": 93.881,
        "amount": 469.41,
        "taxes": [
          {
            "tax_code": "FEDERAL",
            "amount": 29.73,
            "exempt": false
          },
          {
            "tax_code": "STATE",
            "amount": 65.42,
            "exempt": false
          }
        ],
        "pump_number": 9,
        "unit_of_measure": "GALLON",
        "cost_price_per_unit": 4.9
      },
      {
        "product_code": "DEF",
        "retail_price_per_unit": 1,
        "volume": 12.449,
        "amount": 56.02,
        "taxes": [],
        "pump_number": 9,
        "unit_of_measure": "GALLON",
        "cost_price_per_unit": 4.5
      }
    ],
    "authorized_flag": true,
    "authorization_code": "string"
  }
}
```

**SDK Code**

```python Get transaction details_example
import requests

url = "https://pos.fuel.greenlane.ai/gfp/merchant/string/transaction/string"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Get transaction details_example
const url = 'https://pos.fuel.greenlane.ai/gfp/merchant/string/transaction/string';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Get transaction details_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://pos.fuel.greenlane.ai/gfp/merchant/string/transaction/string"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Get transaction details_example
require 'uri'
require 'net/http'

url = URI("https://pos.fuel.greenlane.ai/gfp/merchant/string/transaction/string")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Get transaction details_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://pos.fuel.greenlane.ai/gfp/merchant/string/transaction/string")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Get transaction details_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://pos.fuel.greenlane.ai/gfp/merchant/string/transaction/string', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Get transaction details_example
using RestSharp;

var client = new RestClient("https://pos.fuel.greenlane.ai/gfp/merchant/string/transaction/string");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Get transaction details_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://pos.fuel.greenlane.ai/gfp/merchant/string/transaction/string")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```