# Update VBA PUT https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/{virtualBankId} Content-Type: application/json Update destination details for an existing Virtual Bank Account (VBA). Reference: https://docs.transak.com/api/stream-on-ramp/update-virtual-bank-account ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: stream-on-ramp-api version: 1.0.0 paths: /api/v2/onramp-stream/vba/{virtualBankId}: put: operationId: update-virtual-bank-account summary: Update VBA description: Update destination details for an existing Virtual Bank Account (VBA). tags: - '' parameters: - name: virtualBankId in: path description: Generated Virtual Bank Identifier required: true schema: type: string - name: x-api-key in: header description: >- Your Api Key, which you can get from the Transak Partner Dashboard for the respective environment required: true schema: type: string default: YOUR_API_KEY - name: authorization in: header description: >- The authorization token is the accessToken returned by the [WhiteLabel API - api/v2/auth/verify](/api/whitelabel/user/verify-user-otp) Note: This applies only when you are not using the [Auth Reliance Flows](/features/auth-reliance) required: true schema: type: string default: YOUR_USER_AUTH_TOKEN - name: x-user-identifier in: header description: >- Your authenticated user Email Id address. Note: This is applicable only for [Auth Reliance Flows](/features/auth-reliance) required: false schema: type: string default: USER_EMAIL_ID - name: x-access-token in: header description: >- 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) required: false schema: type: string default: YOUR_ACCESS_TOKEN responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/update_virtual_bank_account_Response_200' '400': description: Invalid VBA Update Request content: application/json: schema: $ref: >- #/components/schemas/Update_virtual_bank_accountRequestBadRequestError '500': description: Internal Server Error content: application/json: schema: $ref: >- #/components/schemas/Update_virtual_bank_accountRequestInternalServerError requestBody: content: application/json: schema: type: object properties: destination: $ref: >- #/components/schemas/ApiV2OnrampStreamVbaVirtualBankIdPutRequestBodyContentApplicationJsonSchemaDestination required: - destination servers: - url: https://api-gateway-stg.transak.com components: schemas: ApiV2OnrampStreamVbaVirtualBankIdPutRequestBodyContentApplicationJsonSchemaDestinationRemitterAccountDetailsItems: type: object properties: accountNumber: type: string default: ACCOUNT_NUMBER description: Bank Account Number ifscCode: type: string default: IFSC_CODE description: IFDC Code bankName: type: string default: BANK_NAME description: Bank Name title: >- ApiV2OnrampStreamVbaVirtualBankIdPutRequestBodyContentApplicationJsonSchemaDestinationRemitterAccountDetailsItems ApiV2OnrampStreamVbaVirtualBankIdPutRequestBodyContentApplicationJsonSchemaDestination: type: object properties: cryptoCurrency: type: string default: USDT description: Amount in crypto currency. E.g.,USDT,USDC walletAddress: type: string default: '0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A' description: Crypto wallet Address memoTag: type: string default: '' description: >- MemoTag is an additional address property that identifying the transfer recipient. network: type: string default: polygon description: Blockchain network. E.g "ethereum", "polygon" remitterAccountDetails: type: array items: $ref: >- #/components/schemas/ApiV2OnrampStreamVbaVirtualBankIdPutRequestBodyContentApplicationJsonSchemaDestinationRemitterAccountDetailsItems description: Remitter account details are required only for INR transactions. required: - cryptoCurrency - walletAddress - network title: >- ApiV2OnrampStreamVbaVirtualBankIdPutRequestBodyContentApplicationJsonSchemaDestination ApiV2OnrampStreamVbaVirtualBankIdPutResponsesContentApplicationJsonSchemaData: type: object properties: id: type: string description: Generated Virtual Bank Identifier status: type: string description: Current VBA status source: type: object additionalProperties: description: Any type description: Source bank details mapped to this VBA destination: type: object additionalProperties: description: Any type description: Updated destination crypto transfer details title: >- ApiV2OnrampStreamVbaVirtualBankIdPutResponsesContentApplicationJsonSchemaData update_virtual_bank_account_Response_200: type: object properties: data: $ref: >- #/components/schemas/ApiV2OnrampStreamVbaVirtualBankIdPutResponsesContentApplicationJsonSchemaData title: update_virtual_bank_account_Response_200 ApiV2OnrampStreamVbaVirtualBankIdPutResponsesContentApplicationJsonSchemaError: type: object properties: statusCode: type: integer name: type: string message: type: string required: - statusCode - name - message title: >- ApiV2OnrampStreamVbaVirtualBankIdPutResponsesContentApplicationJsonSchemaError Update_virtual_bank_accountRequestBadRequestError: type: object properties: error: $ref: >- #/components/schemas/ApiV2OnrampStreamVbaVirtualBankIdPutResponsesContentApplicationJsonSchemaError title: Update_virtual_bank_accountRequestBadRequestError Update_virtual_bank_accountRequestInternalServerError: type: object properties: error: $ref: >- #/components/schemas/ApiV2OnrampStreamVbaVirtualBankIdPutResponsesContentApplicationJsonSchemaError required: - error title: Update_virtual_bank_accountRequestInternalServerError ``` ## SDK Code Examples ```python USD-Success import requests url = "https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId" payload = { "destination": { "cryptoCurrency": "USDT", "walletAddress": "0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A", "network": "polygon" } } headers = { "x-api-key": "YOUR_API_KEY", "authorization": "YOUR_USER_AUTH_TOKEN", "Content-Type": "application/json" } response = requests.put(url, json=payload, headers=headers) print(response.json()) ``` ```javascript USD-Success const url = 'https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId'; const options = { method: 'PUT', headers: { 'x-api-key': 'YOUR_API_KEY', authorization: 'YOUR_USER_AUTH_TOKEN', 'Content-Type': 'application/json' }, body: '{"destination":{"cryptoCurrency":"USDT","walletAddress":"0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A","network":"polygon"}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go USD-Success package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId" payload := strings.NewReader("{\n \"destination\": {\n \"cryptoCurrency\": \"USDT\",\n \"walletAddress\": \"0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A\",\n \"network\": \"polygon\"\n }\n}") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("x-api-key", "YOUR_API_KEY") req.Header.Add("authorization", "YOUR_USER_AUTH_TOKEN") 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 USD-Success require 'uri' require 'net/http' url = URI("https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["x-api-key"] = 'YOUR_API_KEY' request["authorization"] = 'YOUR_USER_AUTH_TOKEN' request["Content-Type"] = 'application/json' request.body = "{\n \"destination\": {\n \"cryptoCurrency\": \"USDT\",\n \"walletAddress\": \"0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A\",\n \"network\": \"polygon\"\n }\n}" response = http.request(request) puts response.read_body ``` ```java USD-Success import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.put("https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId") .header("x-api-key", "YOUR_API_KEY") .header("authorization", "YOUR_USER_AUTH_TOKEN") .header("Content-Type", "application/json") .body("{\n \"destination\": {\n \"cryptoCurrency\": \"USDT\",\n \"walletAddress\": \"0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A\",\n \"network\": \"polygon\"\n }\n}") .asString(); ``` ```php USD-Success request('PUT', 'https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId', [ 'body' => '{ "destination": { "cryptoCurrency": "USDT", "walletAddress": "0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A", "network": "polygon" } }', 'headers' => [ 'Content-Type' => 'application/json', 'authorization' => 'YOUR_USER_AUTH_TOKEN', 'x-api-key' => 'YOUR_API_KEY', ], ]); echo $response->getBody(); ``` ```csharp USD-Success using RestSharp; var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId"); var request = new RestRequest(Method.PUT); request.AddHeader("x-api-key", "YOUR_API_KEY"); request.AddHeader("authorization", "YOUR_USER_AUTH_TOKEN"); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"destination\": {\n \"cryptoCurrency\": \"USDT\",\n \"walletAddress\": \"0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A\",\n \"network\": \"polygon\"\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift USD-Success import Foundation let headers = [ "x-api-key": "YOUR_API_KEY", "authorization": "YOUR_USER_AUTH_TOKEN", "Content-Type": "application/json" ] let parameters = ["destination": [ "cryptoCurrency": "USDT", "walletAddress": "0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A", "network": "polygon" ]] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" 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() ``` ```python INR-Success import requests url = "https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId" payload = { "destination": { "cryptoCurrency": "USDT", "walletAddress": "0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A", "network": "polygon" } } headers = { "x-api-key": "YOUR_API_KEY", "authorization": "YOUR_USER_AUTH_TOKEN", "Content-Type": "application/json" } response = requests.put(url, json=payload, headers=headers) print(response.json()) ``` ```javascript INR-Success const url = 'https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId'; const options = { method: 'PUT', headers: { 'x-api-key': 'YOUR_API_KEY', authorization: 'YOUR_USER_AUTH_TOKEN', 'Content-Type': 'application/json' }, body: '{"destination":{"cryptoCurrency":"USDT","walletAddress":"0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A","network":"polygon"}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go INR-Success package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId" payload := strings.NewReader("{\n \"destination\": {\n \"cryptoCurrency\": \"USDT\",\n \"walletAddress\": \"0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A\",\n \"network\": \"polygon\"\n }\n}") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("x-api-key", "YOUR_API_KEY") req.Header.Add("authorization", "YOUR_USER_AUTH_TOKEN") 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 INR-Success require 'uri' require 'net/http' url = URI("https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["x-api-key"] = 'YOUR_API_KEY' request["authorization"] = 'YOUR_USER_AUTH_TOKEN' request["Content-Type"] = 'application/json' request.body = "{\n \"destination\": {\n \"cryptoCurrency\": \"USDT\",\n \"walletAddress\": \"0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A\",\n \"network\": \"polygon\"\n }\n}" response = http.request(request) puts response.read_body ``` ```java INR-Success import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.put("https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId") .header("x-api-key", "YOUR_API_KEY") .header("authorization", "YOUR_USER_AUTH_TOKEN") .header("Content-Type", "application/json") .body("{\n \"destination\": {\n \"cryptoCurrency\": \"USDT\",\n \"walletAddress\": \"0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A\",\n \"network\": \"polygon\"\n }\n}") .asString(); ``` ```php INR-Success request('PUT', 'https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId', [ 'body' => '{ "destination": { "cryptoCurrency": "USDT", "walletAddress": "0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A", "network": "polygon" } }', 'headers' => [ 'Content-Type' => 'application/json', 'authorization' => 'YOUR_USER_AUTH_TOKEN', 'x-api-key' => 'YOUR_API_KEY', ], ]); echo $response->getBody(); ``` ```csharp INR-Success using RestSharp; var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId"); var request = new RestRequest(Method.PUT); request.AddHeader("x-api-key", "YOUR_API_KEY"); request.AddHeader("authorization", "YOUR_USER_AUTH_TOKEN"); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"destination\": {\n \"cryptoCurrency\": \"USDT\",\n \"walletAddress\": \"0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A\",\n \"network\": \"polygon\"\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift INR-Success import Foundation let headers = [ "x-api-key": "YOUR_API_KEY", "authorization": "YOUR_USER_AUTH_TOKEN", "Content-Type": "application/json" ] let parameters = ["destination": [ "cryptoCurrency": "USDT", "walletAddress": "0xE1f969e3Fd2c951924EC6eBBd7f69b01D0EdA10A", "network": "polygon" ]] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba/virtualBankId")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" 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() ```