> For a complete page index, fetch https://docs.transak.com/llms.txt # Create Order POST https://api-gateway-stg.transak.com/api/v2/orders Content-Type: application/json The **Create Order** is an **authenticated API** that is a crucial step in **Transak's transaction flow**, allowing users to place a **crypto buy or sell order** based on their **reserved wallet address** and quote ID. This API ensures that the **order is securely created** and **ready for payment processing**. **Bank Transfers** - paymentInstrumentId should be passed as `gbp_bank_transfer` Reference: https://docs.transak.com/api/whitelabel/payments/bank-transfer/create-order ## Request ### 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) — Authorization token is the accessToken received from the API -` api/v2/auth/verify` Note: This is not applicable for [Auth Reliance Flows](/features/auth-reliance) - `x-user-identifier` (string, optional) — Your authenticated user Email Id address. Note: This is applicable only for [Auth Reliance Flows](/features/auth-reliance) - `x-access-token` (string, optional) — Your Partner Access Token. Please refer [here](/guides/how-to-create-partner-access-token) for a tutorial on generating your access token. Note: This is applicable only for [Auth Reliance Flows](/features/auth-reliance) ### Body (application/json) This endpoint expects an object. - `quoteId` (string, required) — Quote ID generated from `api/v2/lookup/quotes` - `paymentInstrumentId` (enum, required) — Use `gbp_bank_transfer` for GBP bank transfer. - Allowed values: `gbp_bank_transfer` - `walletAddress` (string, required) — Destination crypto wallet address. ## Response ### 200 Create Order - Bank Transfer - `data` (ApiV2OrdersPostResponsesContentApplicationJsonSchemaData, required) ## Errors ### 400 Bad Request Error 400 - Missing Field - `error` (ApiV2OrdersPostResponsesContentApplicationJsonSchemaError, required) ### 401 Unauthorized Error 401 - Authorization Required - `error` (ApiV2OrdersPostResponsesContentApplicationJsonSchemaError, required) ### 404 Not Found Error 404 - User Not Found - `error` (ApiV2OrdersPostResponsesContentApplicationJsonSchemaError, required) ### 500 Internal Server Error 500 - Internal Server Error - `error` (ApiV2OrdersPostResponsesContentApplicationJsonSchemaError, required) ## Types ### ApiV2OrdersPostResponsesContentApplicationJsonSchemaData - `orderId` (string, required) - `partnerUserId` (string, required) - `status` (string, required) - `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 ApiV2OrdersPostResponsesContentApplicationJsonSchemaDataPaymentDetailsItems, required) - `txHash` (string, required) - `walletLink` (string, required) ### ApiV2OrdersPostResponsesContentApplicationJsonSchemaError - `statusCode` (integer, required) - `message` (string, required) - `errorCode` (integer, required) ### ApiV2OrdersPostResponsesContentApplicationJsonSchemaDataPaymentDetailsItems - `fiatCurrency` (string, required) - `paymentMethod` (string, required) - `name` (string, required) - `fields` (list of ApiV2OrdersPostResponsesContentApplicationJsonSchemaDataPaymentDetailsItemsFieldsItems, required) - `redirectUrl` (string, optional) — URL for Open Banking payment authorization (only present for Open Banking payments) ### ApiV2OrdersPostResponsesContentApplicationJsonSchemaDataPaymentDetailsItemsFieldsItems - `name` (string, required) - `value` (string, required) ## Examples **Request** ```json { "quoteId": "", "paymentInstrumentId": "gbp_bank_transfer", "walletAddress": "" } ``` **Response** ```json { "data": { "orderId": "e053ef3e-2b89-4fa6-9679-89f31fe39625", "partnerUserId": "f8f5ef8f-dac0-4718-a5bb-6fbfcb389966", "status": "AWAITING_PAYMENT_FROM_USER", "isBuyOrSell": "BUY", "fiatCurrency": "GBP", "cryptoCurrency": "ETH", "paymentMethod": "gbp_bank_transfer", "network": "ethereum", "networkId": "", "walletAddress": "0x8eeF3b6905704BdbB936f89dcd1A8BFE1B581405", "quoteId": "3417136e-2a64-4c3d-ba20-ac1dc2890285", "fiatAmount": 18, "fiatAmountInUsd": 20.5, "amountPaid": 0, "cryptoAmount": 0.01138765, "conversionPrice": 0.0006847655905827366, "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": "", "walletLink": "" } } ``` **SDK Code** ```python Create Order - Bank Transfer import requests url = "https://api-gateway-stg.transak.com/api/v2/orders" payload = { "quoteId": "", "paymentInstrumentId": "gbp_bank_transfer", "walletAddress": "" } headers = { "authorization": "", "x-api-key": "", "x-user-ip": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Create Order - Bank Transfer const url = 'https://api-gateway-stg.transak.com/api/v2/orders'; const options = { method: 'POST', headers: { authorization: '', 'x-api-key': '', 'x-user-ip': '', 'Content-Type': 'application/json' }, body: '{"quoteId":"","paymentInstrumentId":"gbp_bank_transfer","walletAddress":""}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Create Order - Bank Transfer package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-gateway-stg.transak.com/api/v2/orders" payload := strings.NewReader("{\n \"quoteId\": \"\",\n \"paymentInstrumentId\": \"gbp_bank_transfer\",\n \"walletAddress\": \"\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("authorization", "") req.Header.Add("x-api-key", "") req.Header.Add("x-user-ip", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Create Order - Bank Transfer require 'uri' require 'net/http' url = URI("https://api-gateway-stg.transak.com/api/v2/orders") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["authorization"] = '' request["x-api-key"] = '' request["x-user-ip"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"quoteId\": \"\",\n \"paymentInstrumentId\": \"gbp_bank_transfer\",\n \"walletAddress\": \"\"\n}" response = http.request(request) puts response.read_body ``` ```java Create Order - Bank Transfer import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-gateway-stg.transak.com/api/v2/orders") .header("authorization", "") .header("x-api-key", "") .header("x-user-ip", "") .header("Content-Type", "application/json") .body("{\n \"quoteId\": \"\",\n \"paymentInstrumentId\": \"gbp_bank_transfer\",\n \"walletAddress\": \"\"\n}") .asString(); ``` ```php Create Order - Bank Transfer request('POST', 'https://api-gateway-stg.transak.com/api/v2/orders', [ 'body' => '{ "quoteId": "", "paymentInstrumentId": "gbp_bank_transfer", "walletAddress": "" }', 'headers' => [ 'Content-Type' => 'application/json', 'authorization' => '', 'x-api-key' => '', 'x-user-ip' => '', ], ]); echo $response->getBody(); ``` ```csharp Create Order - Bank Transfer using RestSharp; var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/orders"); var request = new RestRequest(Method.POST); request.AddHeader("authorization", ""); request.AddHeader("x-api-key", ""); request.AddHeader("x-user-ip", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"quoteId\": \"\",\n \"paymentInstrumentId\": \"gbp_bank_transfer\",\n \"walletAddress\": \"\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Create Order - Bank Transfer import Foundation let headers = [ "authorization": "", "x-api-key": "", "x-user-ip": "", "Content-Type": "application/json" ] let parameters = [ "quoteId": "", "paymentInstrumentId": "gbp_bank_transfer", "walletAddress": "" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/orders")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data 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() ```