# 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 ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: partner-api version: 1.0.0 paths: /order/{orderId}: get: operationId: get-order-by-order-id summary: Get Order By ID description: >- The Get Order By ID API retrieves comprehensive information for a given order using its unique order ID. tags: - '' parameters: - name: orderId in: path description: User order ID required: true schema: type: string default: YOUR_ORDER_ID - name: access-token in: header description: >- Your Access Token, you can generate one using our [Refresh Token](/api/public/refresh-access-token) endpoint required: true schema: type: string default: YOUR_ACCESS_TOKEN responses: '200': description: Order fetched successfully content: application/json: schema: $ref: '#/components/schemas/get-order-by-order-id_Response_200' '400': description: '400' content: application/json: schema: $ref: >- #/components/schemas/Get-order-by-order-idRequestBadRequestError '401': description: '401' content: application/json: schema: $ref: >- #/components/schemas/Get-order-by-order-idRequestUnauthorizedError servers: - url: https://api-stg.transak.com/partners/api/v2 components: schemas: OrderOrderIdGetResponsesContentApplicationJsonSchemaMeta: type: object properties: orderId: type: string title: OrderOrderIdGetResponsesContentApplicationJsonSchemaMeta OrderOrderIdGetResponsesContentApplicationJsonSchemaDataConversionPriceData: type: object properties: _id: type: string id: type: string fiatCurrency: type: string cryptoCurrency: type: string title: >- OrderOrderIdGetResponsesContentApplicationJsonSchemaDataConversionPriceData OrderOrderIdGetResponsesContentApplicationJsonSchemaDataPaymentOptionsItems: type: object properties: {} title: >- OrderOrderIdGetResponsesContentApplicationJsonSchemaDataPaymentOptionsItems OrderOrderIdGetResponsesContentApplicationJsonSchemaDataCardPaymentData: type: object properties: {} title: OrderOrderIdGetResponsesContentApplicationJsonSchemaDataCardPaymentData OrderOrderIdGetResponsesContentApplicationJsonSchemaDataStatusHistoriesItems: type: object properties: {} title: >- OrderOrderIdGetResponsesContentApplicationJsonSchemaDataStatusHistoriesItems OrderOrderIdGetResponsesContentApplicationJsonSchemaData: type: object properties: _id: type: string walletAddress: type: string createdAt: type: string status: type: string fiatCurrency: type: string cryptoCurrency: type: string isBuyOrSell: type: string fiatAmount: type: number format: double amountPaid: type: number format: double paymentOptionId: type: string network: type: string quoteId: type: string ipAddress: type: string walletLink: type: string orderProcessingType: type: string addressAdditionalData: type: boolean appVersionName: type: string conversionPriceData: $ref: >- #/components/schemas/OrderOrderIdGetResponsesContentApplicationJsonSchemaDataConversionPriceData conversionPrice: type: number format: double cryptoAmount: type: number format: double totalFeeInFiat: type: number format: double fiatAmountInUsd: type: number format: double countryCode: type: string paymentOptions: type: array items: $ref: >- #/components/schemas/OrderOrderIdGetResponsesContentApplicationJsonSchemaDataPaymentOptionsItems fromWalletAddress: type: string autoExpiresAt: type: string stateCode: type: string orderChannelType: type: string tokenContractAddress: type: string userKycType: type: string cardPaymentData: $ref: >- #/components/schemas/OrderOrderIdGetResponsesContentApplicationJsonSchemaDataCardPaymentData id: type: string statusHistories: type: array items: $ref: >- #/components/schemas/OrderOrderIdGetResponsesContentApplicationJsonSchemaDataStatusHistoriesItems isFirstOrder: type: boolean updatedAt: type: string exchangeId: type: string internalOrderStatus: type: string completedAt: type: string transactionHash: type: string transactionLink: type: string title: OrderOrderIdGetResponsesContentApplicationJsonSchemaData get-order-by-order-id_Response_200: type: object properties: meta: $ref: >- #/components/schemas/OrderOrderIdGetResponsesContentApplicationJsonSchemaMeta data: $ref: >- #/components/schemas/OrderOrderIdGetResponsesContentApplicationJsonSchemaData title: get-order-by-order-id_Response_200 OrderOrderIdGetResponsesContentApplicationJsonSchemaError: type: object properties: statusCode: type: integer default: 0 name: type: string message: type: string title: OrderOrderIdGetResponsesContentApplicationJsonSchemaError Get-order-by-order-idRequestBadRequestError: type: object properties: error: $ref: >- #/components/schemas/OrderOrderIdGetResponsesContentApplicationJsonSchemaError title: Get-order-by-order-idRequestBadRequestError Get-order-by-order-idRequestUnauthorizedError: type: object properties: error: $ref: >- #/components/schemas/OrderOrderIdGetResponsesContentApplicationJsonSchemaError title: Get-order-by-order-idRequestUnauthorizedError ``` ## SDK Code Examples ```python Success import requests url = "https://api-stg.transak.com/partners/api/v2/order/YOUR_ORDER_ID" headers = {"access-token": "YOUR_ACCESS_TOKEN"} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript Success const url = 'https://api-stg.transak.com/partners/api/v2/order/YOUR_ORDER_ID'; const options = {method: 'GET', headers: {'access-token': 'YOUR_ACCESS_TOKEN'}}; 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/YOUR_ORDER_ID" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("access-token", "YOUR_ACCESS_TOKEN") 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/YOUR_ORDER_ID") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["access-token"] = 'YOUR_ACCESS_TOKEN' 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/YOUR_ORDER_ID") .header("access-token", "YOUR_ACCESS_TOKEN") .asString(); ``` ```php Success request('GET', 'https://api-stg.transak.com/partners/api/v2/order/YOUR_ORDER_ID', [ 'headers' => [ 'access-token' => 'YOUR_ACCESS_TOKEN', ], ]); echo $response->getBody(); ``` ```csharp Success using RestSharp; var client = new RestClient("https://api-stg.transak.com/partners/api/v2/order/YOUR_ORDER_ID"); var request = new RestRequest(Method.GET); request.AddHeader("access-token", "YOUR_ACCESS_TOKEN"); IRestResponse response = client.Execute(request); ``` ```swift Success import Foundation let headers = ["access-token": "YOUR_ACCESS_TOKEN"] let request = NSMutableURLRequest(url: NSURL(string: "https://api-stg.transak.com/partners/api/v2/order/YOUR_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() ```