> For a complete page index, fetch https://docs.transak.com/llms.txt

# Get User Order By ID

GET https://api-gateway-stg.transak.com/api/v2/orders/{orderId}

The **Get User Order By ID** is an **authenticated API** that allows partners to **fetch details of a specific order** using its unique identifier. This API provides **detailed transaction information**, including order status, payment details, and wallet address.

This API helps **track a particular order’s status** and ensures users can **monitor their transactions in real-time**.

**Authentication:** use either **Transak Auth**, which sends the user's `authorization` token, or **Partner Auth (Auth Reliance)**, which sends `x-access-token` and `x-user-identifier`. Do not send both. See the headers below.

To fetch any of your orders with only your Partner Access Token, use [Get Partner Order By ID](/api/whitelabel/orders/get-partner-order-by-id).

Reference: https://docs.transak.com/api/whitelabel/orders/get-user-order-by-id

## Servers

- `https://api-gateway-stg.transak.com` (Staging, default)
- `https://api-gateway.transak.com` (Production)

## Request

### Path parameters

- `orderId` (string, required) — orderId received from the API - api/v2/orders

### Headers

- `x-user-ip` (string, required) — End user's originating IP. More details [here](/guides/mandatory-security-changes#user-ip-header-in-apis)
- `x-api-key` (string, required) — Partner API Key present in Transak Dashboard.
- `authorization` (string, optional) — **Transak Auth.** The user's `accessToken` from Transak's OTP login, returned by the [Verify User OTP API](/api/whitelabel/user/verify-user-otp) (`/api/v2/auth/verify`). Send the token on its own, with no `Bearer` prefix. It is valid for 30 days. Call the [Refresh User Access Token API](/api/whitelabel/user/refresh-user-access-token) before it expires. Do not send `x-access-token` or `x-user-identifier` with it.
- `x-access-token` (string, optional) — **Partner Auth (Auth Reliance).** Your Partner Access Token, valid for 7 days. Send it with `x-user-identifier`, and do not send `authorization`. See [Auth Reliance Flows](/features/auth-reliance) and [how to create a Partner Access Token](/guides/how-to-create-partner-access-token).
- `x-user-identifier` (string, optional) — **Partner Auth (Auth Reliance).** The email address of the user you authenticated. Send it with `x-access-token`.

## Response

### 200

200 - Success

- `data` (ApiV2OrdersOrderIdGetResponsesContentApplicationJsonSchemaData, required)

## Errors

### 400 Bad Request Error

400 - Invalid Access Token

- `error` (ApiV2OrdersOrderIdGetResponsesContentApplicationJsonSchemaError, required)

### 401 Unauthorized Error

401 - Unauthorized

- `error` (ApiV2OrdersOrderIdGetResponsesContentApplicationJsonSchemaError, required)

### 404 Not Found Error

404 - User Not Found

- `error` (ApiV2OrdersOrderIdGetResponsesContentApplicationJsonSchemaError, required)

### 500 Internal Server Error

500 - Internal Server Error

- `error` (ApiV2OrdersOrderIdGetResponsesContentApplicationJsonSchemaError, required)

## Types

### ApiV2OrdersOrderIdGetResponsesContentApplicationJsonSchemaData

- `orderId` (string, required)
- `partnerUserId` (string, required)
- `status` (enum, required) — Status of the order. See [How to Track Order Status](/guides/track-order-status#order-status-reference) for how an order moves between statuses, and [Webhooks](/features/webhooks#order-webhooks) for the webhook event sent for each status.
  - Allowed values: `AWAITING_PAYMENT_FROM_USER`, `PAYMENT_DONE_MARKED_BY_USER`, `PROCESSING`, `PENDING_DELIVERY_FROM_TRANSAK`, `ON_HOLD_PENDING_DELIVERY_FROM_TRANSAK`, `COMPLETED`, `CANCELLED`, `FAILED`, `REFUNDED`, `EXPIRED`
- `isBuyOrSell` (string, required)
- `fiatCurrency` (string, required)
- `cryptoCurrency` (string, required)
- `paymentMethod` (string, required)
- `network` (string, required)
- `networkId` (string, required)
- `walletAddress` (string, required)
- `quoteId` (string, required)
- `fiatAmount` (integer, required)
- `fiatAmountInUsd` (double, required)
- `amountPaid` (integer, required)
- `cryptoAmount` (double, required)
- `conversionPrice` (double, required)
- `totalFeeInFiat` (double, required)
- `paymentDetails` (list of ApiV2OrdersOrderIdGetResponsesContentApplicationJsonSchemaDataPaymentDetailsItems, required)
- `txHash` (string, required, nullable)
- `walletLink` (string, required, nullable)
- `transactionLink` (string, required)
- `partnerOrderId` (string, optional) — Your own order ID. Returned only when the order has one.
- `addressAdditionalData` (ApiV2OrdersOrderIdGetResponsesContentApplicationJsonSchemaDataAddressAdditionalData, optional)
- `bankReference` (string, optional) — Returned on bank transfer and Open Banking orders.
- `cancelReason` (string, optional) — Why the order was cancelled or failed. Returned on cancelled and failed orders.
- `depositAddress` (string, optional) — Returned on SELL orders.

### ApiV2OrdersOrderIdGetResponsesContentApplicationJsonSchemaError

- `statusCode` (integer, required)
- `message` (string, required)

### ApiV2OrdersOrderIdGetResponsesContentApplicationJsonSchemaDataPaymentDetailsItems

- `fiatCurrency` (string, required)
- `paymentMethod` (string, required)
- `name` (string, required)
- `fields` (list of ApiV2OrdersOrderIdGetResponsesContentApplicationJsonSchemaDataPaymentDetailsItemsFieldsItems, required)
- `redirectUrl` (string, optional) — URL for Open Banking payment authorization (only present for Open Banking payments)

### ApiV2OrdersOrderIdGetResponsesContentApplicationJsonSchemaDataAddressAdditionalData

- `name` (string, optional)
- `displayName` (string, optional)
- `value` (string, optional)
- `requestId` (string, optional)

### ApiV2OrdersOrderIdGetResponsesContentApplicationJsonSchemaDataPaymentDetailsItemsFieldsItems

- `name` (string, required)
- `value` (string, required)

## Examples

### Transak Auth

**Response**

```json
{
  "data": {
    "orderId": "f34df59c-3ba4-41f1-962c-8c7945bf83ff",
    "partnerUserId": "f8f5ef8f-dac0-4718-a5bb-6fbfcb389966",
    "status": "COMPLETED",
    "isBuyOrSell": "BUY",
    "fiatCurrency": "GBP",
    "cryptoCurrency": "ETH",
    "paymentMethod": "gbp_bank_transfer",
    "network": "ethereum",
    "networkId": "",
    "walletAddress": "0x8eeF3b6905704BdbB936f89dcd1A8BFE1B581405",
    "quoteId": "77f9e792-e806-4868-93df-5d688789d783",
    "fiatAmount": 18,
    "fiatAmountInUsd": 20.5,
    "amountPaid": 18,
    "cryptoAmount": 0.01134213,
    "conversionPrice": 0.0006820282621767891,
    "totalFeeInFiat": 1.37,
    "paymentDetails": [
      {
        "fiatCurrency": "",
        "paymentMethod": "",
        "name": "Bank Transfer Details",
        "fields": [
          {
            "name": "Account Type",
            "value": "Personal"
          },
          {
            "name": "Amount",
            "value": "18 GBP"
          },
          {
            "name": "First Name (Beneficiary)",
            "value": "Jane"
          },
          {
            "name": "Last Name (Beneficiary)",
            "value": "Doe"
          },
          {
            "name": "IBAN",
            "value": "GB40SEOU19870010352376"
          },
          {
            "name": "Bank Name",
            "value": "Simulator Bank"
          },
          {
            "name": "Bank Country",
            "value": "Malta"
          },
          {
            "name": "Bank Address",
            "value": "The Bower, 207-211 Old Street, London, England, EC1V 9NR"
          }
        ]
      }
    ],
    "txHash": "DUMMY_TX_ID",
    "walletLink": "https://sepolia.etherscan.io/address/0x8eeF3b6905704BdbB936f89dcd1A8BFE1B581405",
    "transactionLink": "https://sepolia.etherscan.io/tx/DUMMY_TX_ID"
  }
}
```

**SDK Code**

```python Transak Auth
import requests

url = "https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID"

headers = {
    "authorization": "USER_ACCESS_TOKEN",
    "x-api-key": "YOUR_API_KEY",
    "x-user-ip": "USER_IP_ADDRESS"
}

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

print(response.json())
```

```javascript Transak Auth
const url = 'https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID';
const options = {
  method: 'GET',
  headers: {
    authorization: 'USER_ACCESS_TOKEN',
    'x-api-key': 'YOUR_API_KEY',
    'x-user-ip': 'USER_IP_ADDRESS'
  }
};

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

```go Transak Auth
package main

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

func main() {

	url := "https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID"

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

	req.Header.Add("authorization", "USER_ACCESS_TOKEN")
	req.Header.Add("x-api-key", "YOUR_API_KEY")
	req.Header.Add("x-user-ip", "USER_IP_ADDRESS")

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

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

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

}
```

```ruby Transak Auth
require 'uri'
require 'net/http'

url = URI("https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID")

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

request = Net::HTTP::Get.new(url)
request["authorization"] = 'USER_ACCESS_TOKEN'
request["x-api-key"] = 'YOUR_API_KEY'
request["x-user-ip"] = 'USER_IP_ADDRESS'

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

```java Transak Auth
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID")
  .header("authorization", "USER_ACCESS_TOKEN")
  .header("x-api-key", "YOUR_API_KEY")
  .header("x-user-ip", "USER_IP_ADDRESS")
  .asString();
```

```php Transak Auth
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID', [
  'headers' => [
    'authorization' => 'USER_ACCESS_TOKEN',
    'x-api-key' => 'YOUR_API_KEY',
    'x-user-ip' => 'USER_IP_ADDRESS',
  ],
]);

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

```csharp Transak Auth
using RestSharp;

var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "USER_ACCESS_TOKEN");
request.AddHeader("x-api-key", "YOUR_API_KEY");
request.AddHeader("x-user-ip", "USER_IP_ADDRESS");
IRestResponse response = client.Execute(request);
```

```swift Transak Auth
import Foundation

let headers = [
  "authorization": "USER_ACCESS_TOKEN",
  "x-api-key": "YOUR_API_KEY",
  "x-user-ip": "USER_IP_ADDRESS"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID")! 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()
```

### Partner Auth (Auth Reliance)

**Response**

```json
{
  "data": {
    "orderId": "f34df59c-3ba4-41f1-962c-8c7945bf83ff",
    "partnerUserId": "f8f5ef8f-dac0-4718-a5bb-6fbfcb389966",
    "status": "COMPLETED",
    "isBuyOrSell": "BUY",
    "fiatCurrency": "GBP",
    "cryptoCurrency": "ETH",
    "paymentMethod": "gbp_bank_transfer",
    "network": "ethereum",
    "networkId": "",
    "walletAddress": "0x8eeF3b6905704BdbB936f89dcd1A8BFE1B581405",
    "quoteId": "77f9e792-e806-4868-93df-5d688789d783",
    "fiatAmount": 18,
    "fiatAmountInUsd": 20.5,
    "amountPaid": 18,
    "cryptoAmount": 0.01134213,
    "conversionPrice": 0.0006820282621767891,
    "totalFeeInFiat": 1.37,
    "paymentDetails": [
      {
        "fiatCurrency": "",
        "paymentMethod": "",
        "name": "Bank Transfer Details",
        "fields": [
          {
            "name": "Account Type",
            "value": "Personal"
          },
          {
            "name": "Amount",
            "value": "18 GBP"
          },
          {
            "name": "First Name (Beneficiary)",
            "value": "Jane"
          },
          {
            "name": "Last Name (Beneficiary)",
            "value": "Doe"
          },
          {
            "name": "IBAN",
            "value": "GB40SEOU19870010352376"
          },
          {
            "name": "Bank Name",
            "value": "Simulator Bank"
          },
          {
            "name": "Bank Country",
            "value": "Malta"
          },
          {
            "name": "Bank Address",
            "value": "The Bower, 207-211 Old Street, London, England, EC1V 9NR"
          }
        ]
      }
    ],
    "txHash": "DUMMY_TX_ID",
    "walletLink": "https://sepolia.etherscan.io/address/0x8eeF3b6905704BdbB936f89dcd1A8BFE1B581405",
    "transactionLink": "https://sepolia.etherscan.io/tx/DUMMY_TX_ID"
  }
}
```

**SDK Code**

```python Partner Auth (Auth Reliance)
import requests

url = "https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID"

headers = {
    "x-access-token": "PARTNER_ACCESS_TOKEN",
    "x-api-key": "YOUR_API_KEY",
    "x-user-identifier": "user@example.com",
    "x-user-ip": "USER_IP_ADDRESS"
}

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

print(response.json())
```

```javascript Partner Auth (Auth Reliance)
const url = 'https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID';
const options = {
  method: 'GET',
  headers: {
    'x-access-token': 'PARTNER_ACCESS_TOKEN',
    'x-api-key': 'YOUR_API_KEY',
    'x-user-identifier': 'user@example.com',
    'x-user-ip': 'USER_IP_ADDRESS'
  }
};

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

```go Partner Auth (Auth Reliance)
package main

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

func main() {

	url := "https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID"

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

	req.Header.Add("x-access-token", "PARTNER_ACCESS_TOKEN")
	req.Header.Add("x-api-key", "YOUR_API_KEY")
	req.Header.Add("x-user-identifier", "user@example.com")
	req.Header.Add("x-user-ip", "USER_IP_ADDRESS")

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

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

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

}
```

```ruby Partner Auth (Auth Reliance)
require 'uri'
require 'net/http'

url = URI("https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID")

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

request = Net::HTTP::Get.new(url)
request["x-access-token"] = 'PARTNER_ACCESS_TOKEN'
request["x-api-key"] = 'YOUR_API_KEY'
request["x-user-identifier"] = 'user@example.com'
request["x-user-ip"] = 'USER_IP_ADDRESS'

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

```java Partner Auth (Auth Reliance)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID")
  .header("x-access-token", "PARTNER_ACCESS_TOKEN")
  .header("x-api-key", "YOUR_API_KEY")
  .header("x-user-identifier", "user@example.com")
  .header("x-user-ip", "USER_IP_ADDRESS")
  .asString();
```

```php Partner Auth (Auth Reliance)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID', [
  'headers' => [
    'x-access-token' => 'PARTNER_ACCESS_TOKEN',
    'x-api-key' => 'YOUR_API_KEY',
    'x-user-identifier' => 'user@example.com',
    'x-user-ip' => 'USER_IP_ADDRESS',
  ],
]);

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

```csharp Partner Auth (Auth Reliance)
using RestSharp;

var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID");
var request = new RestRequest(Method.GET);
request.AddHeader("x-access-token", "PARTNER_ACCESS_TOKEN");
request.AddHeader("x-api-key", "YOUR_API_KEY");
request.AddHeader("x-user-identifier", "user@example.com");
request.AddHeader("x-user-ip", "USER_IP_ADDRESS");
IRestResponse response = client.Execute(request);
```

```swift Partner Auth (Auth Reliance)
import Foundation

let headers = [
  "x-access-token": "PARTNER_ACCESS_TOKEN",
  "x-api-key": "YOUR_API_KEY",
  "x-user-identifier": "user@example.com",
  "x-user-ip": "USER_IP_ADDRESS"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/orders/ORDER_ID")! 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()
```