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

# Create VBA

POST https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba
Content-Type: application/json

Create a Virtual Bank Account (VBA) for Virtual Account Payments.

Reference: https://docs.transak.com/api/whitelabel/virtual-account-payments/create-virtual-bank-account

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: whitelabel-api
  version: 1.0.0
paths:
  /api/v2/onramp-stream/vba:
    post:
      operationId: create-virtual-bank-account
      summary: Create VBA
      description: Create a Virtual Bank Account (VBA) for Virtual Account Payments.
      tags:
        - ''
      parameters:
        - name: x-user-ip
          in: header
          description: >-
            End user's originating IP. More details
            [here](/guides/mandatory-security-changes#user-ip-header-in-apis)
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: >-
            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).
          required: true
          schema:
            type: string
        - name: authorization
          in: header
          description: >-
            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)
          required: false
          schema:
            type: string
        - 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
        - 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
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create-virtual-bank-account_Response_200'
        '400':
          description: Invalid VBA Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Create-virtual-bank-accountRequestBadRequestError
        '404':
          description: 404 - User Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Create-virtual-bank-accountRequestNotFoundError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Create-virtual-bank-accountRequestInternalServerError
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                source:
                  $ref: >-
                    #/components/schemas/ApiV2OnrampStreamVbaPostRequestBodyContentApplicationJsonSchemaSource
                destination:
                  $ref: >-
                    #/components/schemas/ApiV2OnrampStreamVbaPostRequestBodyContentApplicationJsonSchemaDestination
              required:
                - source
                - destination
servers:
  - url: https://api-gateway-stg.transak.com
    description: Staging
components:
  schemas:
    ApiV2OnrampStreamVbaPostRequestBodyContentApplicationJsonSchemaSource:
      type: object
      properties:
        fiatCurrency:
          type: string
          description: Fiat currency code
        paymentMethod:
          type: string
          description: Payment method identifier
      required:
        - fiatCurrency
        - paymentMethod
      title: ApiV2OnrampStreamVbaPostRequestBodyContentApplicationJsonSchemaSource
    ApiV2OnrampStreamVbaPostRequestBodyContentApplicationJsonSchemaDestination:
      type: object
      properties:
        cryptoCurrency:
          type: string
          description: Crypto currency symbol
        walletAddress:
          type: string
          description: User's wallet address
        memoTag:
          type: string
          description: Additional address property to identify the transfer recipient.
        network:
          type: string
          description: Blockchain network
      required:
        - cryptoCurrency
        - walletAddress
        - network
      title: >-
        ApiV2OnrampStreamVbaPostRequestBodyContentApplicationJsonSchemaDestination
    ApiV2OnrampStreamVbaPostResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        success:
          type: boolean
        id:
          type: string
        status:
          type: string
        message:
          type: string
      title: ApiV2OnrampStreamVbaPostResponsesContentApplicationJsonSchemaData
    create-virtual-bank-account_Response_200:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/ApiV2OnrampStreamVbaPostResponsesContentApplicationJsonSchemaData
      title: create-virtual-bank-account_Response_200
    ApiV2OnrampStreamVbaPostResponsesContentApplicationJsonSchemaError:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
      required:
        - statusCode
        - message
      title: ApiV2OnrampStreamVbaPostResponsesContentApplicationJsonSchemaError
    Create-virtual-bank-accountRequestBadRequestError:
      type: object
      properties:
        error:
          $ref: >-
            #/components/schemas/ApiV2OnrampStreamVbaPostResponsesContentApplicationJsonSchemaError
      title: Create-virtual-bank-accountRequestBadRequestError
    Create-virtual-bank-accountRequestNotFoundError:
      type: object
      properties:
        error:
          $ref: >-
            #/components/schemas/ApiV2OnrampStreamVbaPostResponsesContentApplicationJsonSchemaError
      required:
        - error
      title: Create-virtual-bank-accountRequestNotFoundError
    Create-virtual-bank-accountRequestInternalServerError:
      type: object
      properties:
        error:
          $ref: >-
            #/components/schemas/ApiV2OnrampStreamVbaPostResponsesContentApplicationJsonSchemaError
      required:
        - error
      title: Create-virtual-bank-accountRequestInternalServerError

```

## Examples



**Request**

```json
{
  "source": {
    "fiatCurrency": "EUR",
    "paymentMethod": "sepa_bank_transfer"
  },
  "destination": {
    "cryptoCurrency": "USDT",
    "walletAddress": "0xC8CD2BE653759aed7B0996315821AAe71e1FEAdF",
    "network": "ethereum"
  }
}
```

**Response**

```json
{
  "data": {
    "success": true,
    "id": "6a4e5618e1618a32e1ae26f4",
    "status": "INITIATED",
    "message": "Account INITIATED successfully"
  }
}
```

**SDK Code**

```python Account Initiated
import requests

url = "https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba"

payload = {
    "source": {
        "fiatCurrency": "EUR",
        "paymentMethod": "sepa_bank_transfer"
    },
    "destination": {
        "cryptoCurrency": "USDT",
        "walletAddress": "0xC8CD2BE653759aed7B0996315821AAe71e1FEAdF",
        "network": "ethereum"
    }
}
headers = {
    "x-api-key": "",
    "x-user-ip": "",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Account Initiated
const url = 'https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba';
const options = {
  method: 'POST',
  headers: {'x-api-key': '', 'x-user-ip': '', 'Content-Type': 'application/json'},
  body: '{"source":{"fiatCurrency":"EUR","paymentMethod":"sepa_bank_transfer"},"destination":{"cryptoCurrency":"USDT","walletAddress":"0xC8CD2BE653759aed7B0996315821AAe71e1FEAdF","network":"ethereum"}}'
};

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

```go Account Initiated
package main

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

func main() {

	url := "https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba"

	payload := strings.NewReader("{\n  \"source\": {\n    \"fiatCurrency\": \"EUR\",\n    \"paymentMethod\": \"sepa_bank_transfer\"\n  },\n  \"destination\": {\n    \"cryptoCurrency\": \"USDT\",\n    \"walletAddress\": \"0xC8CD2BE653759aed7B0996315821AAe71e1FEAdF\",\n    \"network\": \"ethereum\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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 Account Initiated
require 'uri'
require 'net/http'

url = URI("https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = ''
request["x-user-ip"] = ''
request["Content-Type"] = 'application/json'
request.body = "{\n  \"source\": {\n    \"fiatCurrency\": \"EUR\",\n    \"paymentMethod\": \"sepa_bank_transfer\"\n  },\n  \"destination\": {\n    \"cryptoCurrency\": \"USDT\",\n    \"walletAddress\": \"0xC8CD2BE653759aed7B0996315821AAe71e1FEAdF\",\n    \"network\": \"ethereum\"\n  }\n}"

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

```java Account Initiated
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba")
  .header("x-api-key", "")
  .header("x-user-ip", "")
  .header("Content-Type", "application/json")
  .body("{\n  \"source\": {\n    \"fiatCurrency\": \"EUR\",\n    \"paymentMethod\": \"sepa_bank_transfer\"\n  },\n  \"destination\": {\n    \"cryptoCurrency\": \"USDT\",\n    \"walletAddress\": \"0xC8CD2BE653759aed7B0996315821AAe71e1FEAdF\",\n    \"network\": \"ethereum\"\n  }\n}")
  .asString();
```

```php Account Initiated
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba', [
  'body' => '{
  "source": {
    "fiatCurrency": "EUR",
    "paymentMethod": "sepa_bank_transfer"
  },
  "destination": {
    "cryptoCurrency": "USDT",
    "walletAddress": "0xC8CD2BE653759aed7B0996315821AAe71e1FEAdF",
    "network": "ethereum"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '',
    'x-user-ip' => '',
  ],
]);

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

```csharp Account Initiated
using RestSharp;

var client = new RestClient("https://api-gateway-stg.transak.com/api/v2/onramp-stream/vba");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "");
request.AddHeader("x-user-ip", "");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"source\": {\n    \"fiatCurrency\": \"EUR\",\n    \"paymentMethod\": \"sepa_bank_transfer\"\n  },\n  \"destination\": {\n    \"cryptoCurrency\": \"USDT\",\n    \"walletAddress\": \"0xC8CD2BE653759aed7B0996315821AAe71e1FEAdF\",\n    \"network\": \"ethereum\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Account Initiated
import Foundation

let headers = [
  "x-api-key": "",
  "x-user-ip": "",
  "Content-Type": "application/json"
]
let parameters = [
  "source": [
    "fiatCurrency": "EUR",
    "paymentMethod": "sepa_bank_transfer"
  ],
  "destination": [
    "cryptoCurrency": "USDT",
    "walletAddress": "0xC8CD2BE653759aed7B0996315821AAe71e1FEAdF",
    "network": "ethereum"
  ]
] 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")! 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()
```