> For a complete page index, fetch https://docs.transak.com/llms.txt # Get Order By ID GET https://api-stg.transak.com/partners/api/v2/order/{orderId} The Get Order By ID API retrieves comprehensive information for a given order using its unique order ID. Reference: https://docs.transak.com/api/public/get-order-by-order-id ## Request ### Path parameters - `orderId` (string, required) — User order ID ### Headers - `x-api-key` (string, required) — Your Partner API key. You can find this in the [Partner Dashboard](https://docs.transak.com/guides/how-to-create-partner-dashboard-account#open-the-developers-section). - `access-token` (string, required) — Your Partner Access Token. Please refer [here](/guides/how-to-create-partner-access-token) for a tutorial on generating your access token. ## Response ### 200 Order fetched successfully - `meta` (OrderOrderIdGetResponsesContentApplicationJsonSchemaMeta, optional) - `data` (OrderOrderIdGetResponsesContentApplicationJsonSchemaData, optional) ## Errors ### 400 Bad Request Error 400 - `error` (OrderOrderIdGetResponsesContentApplicationJsonSchemaError, required) ### 401 Unauthorized Error 401 - `error` (OrderOrderIdGetResponsesContentApplicationJsonSchemaError, required) ## Types ### OrderOrderIdGetResponsesContentApplicationJsonSchemaMeta - `orderId` (string, optional) ### OrderOrderIdGetResponsesContentApplicationJsonSchemaData - `_id` (string, optional) - `walletAddress` (string, optional) - `createdAt` (string, optional) - `status` (string, optional) - `fiatCurrency` (string, optional) - `cryptoCurrency` (string, optional) - `isBuyOrSell` (string, optional) - `fiatAmount` (double, optional) - `amountPaid` (double, optional) - `paymentOptionId` (string, optional) - `bankReference` (string, optional) - `network` (string, optional) - `quoteId` (string, optional) - `ipAddress` (string, optional) - `walletLink` (string, optional) - `orderProcessingType` (string, optional) - `addressAdditionalData` (boolean, optional) - `appVersionName` (string, optional) - `conversionPriceData` (OrderOrderIdGetResponsesContentApplicationJsonSchemaDataConversionPriceData, optional) - `conversionPrice` (double, optional) - `cryptoAmount` (double, optional) - `totalFeeInFiat` (double, optional) - `fiatAmountInUsd` (double, optional) - `countryCode` (string, optional) - `paymentOptions` (list of OrderOrderIdGetResponsesContentApplicationJsonSchemaDataPaymentOptionsItems, optional) - `fromWalletAddress` (string, optional) - `autoExpiresAt` (string, optional) - `stateCode` (string, optional) - `orderChannelType` (string, optional) - `tokenContractAddress` (string, optional) - `userKycType` (string, optional) - `cardPaymentData` (OrderOrderIdGetResponsesContentApplicationJsonSchemaDataCardPaymentData, optional) - `id` (string, optional) - `statusHistories` (list of OrderOrderIdGetResponsesContentApplicationJsonSchemaDataStatusHistoriesItems, optional) - `isFirstOrder` (boolean, optional) - `updatedAt` (string, optional) - `exchangeId` (string, optional) - `internalOrderStatus` (string, optional) - `completedAt` (string, optional) - `transactionHash` (string, optional) - `transactionLink` (string, optional) ### OrderOrderIdGetResponsesContentApplicationJsonSchemaError - `statusCode` (integer, required) - `message` (string, required) ### OrderOrderIdGetResponsesContentApplicationJsonSchemaDataConversionPriceData - `_id` (string, optional) - `id` (string, optional) - `fiatCurrency` (string, optional) - `cryptoCurrency` (string, optional) ### OrderOrderIdGetResponsesContentApplicationJsonSchemaDataPaymentOptionsItems ### OrderOrderIdGetResponsesContentApplicationJsonSchemaDataCardPaymentData ### OrderOrderIdGetResponsesContentApplicationJsonSchemaDataStatusHistoriesItems ## Examples **Response** ```json { "meta": { "orderId": "322dc79c-fad2-4df1-bf50-b292191fc953" }, "data": { "_id": "322dc79c-fad2-4df1-bf50-b292191fc953", "walletAddress": "0xD902d7eBFE", "createdAt": "2024-10-15T14:29:11.104Z", "status": "COMPLETED", "fiatCurrency": "GBP", "cryptoCurrency": "ETH", "isBuyOrSell": "BUY", "fiatAmount": 45, "amountPaid": 45, "paymentOptionId": "gbp_bank_transfer", "bankReference": "VD180620260000069", "network": "ethereum", "quoteId": "20148892-f984-4e3f-8bb7-fba6c0ec9182" } } ``` **SDK Code** ```python Success import requests url = "https://api-stg.transak.com/partners/api/v2/order/:orderId" headers = { "access-token": "", "x-api-key": "" } response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript Success const url = 'https://api-stg.transak.com/partners/api/v2/order/:orderId'; const options = {method: 'GET', headers: {'access-token': '', 'x-api-key': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Success package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api-stg.transak.com/partners/api/v2/order/:orderId" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("access-token", "") req.Header.Add("x-api-key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Success require 'uri' require 'net/http' url = URI("https://api-stg.transak.com/partners/api/v2/order/:orderId") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["access-token"] = '' request["x-api-key"] = '' response = http.request(request) puts response.read_body ``` ```java Success import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api-stg.transak.com/partners/api/v2/order/:orderId") .header("access-token", "") .header("x-api-key", "") .asString(); ``` ```php Success request('GET', 'https://api-stg.transak.com/partners/api/v2/order/:orderId', [ 'headers' => [ 'access-token' => '', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Success using RestSharp; var client = new RestClient("https://api-stg.transak.com/partners/api/v2/order/:orderId"); var request = new RestRequest(Method.GET); request.AddHeader("access-token", ""); request.AddHeader("x-api-key", ""); IRestResponse response = client.Execute(request); ``` ```swift Success import Foundation let headers = [ "access-token": "", "x-api-key": "" ] let request = NSMutableURLRequest(url: NSURL(string: "https://api-stg.transak.com/partners/api/v2/order/:orderId")! 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() ```