Create VA
POST /openapi/v1/va/va-account/create
Create a Virtual Account (VA) for the Merchant to receive bank transfer payments.
Payload before encryption:
{
"bank_code": "970454",
"account_name": "NGUYEN VAN A"
}
| Field | Required | Description |
|---|---|---|
bank_code | ✅ | Bank code that issues the VA |
account_name | ✅ | Display name on the virtual account |
- cURL
- Python
- Go
- JavaScript
curl --location '<base_url>/openapi/v1/va/va-account/create' \
--header 'Partner-Code: YOUR_PARTNER_CODE' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1…' \
--data '{
"data": ENCRYPTED_PAYLOAD
}'
import requests
url = "<base_url>/openapi/v1/va/va-account/create"
payload = {"data": "ENCRYPTED_PAYLOAD"}
headers = {
"Partner-Code": "YOUR_PARTNER_CODE",
"Content-Type": "application/json",
"Authorization": "Bearer eyJhbGciOiJSUzI1…",
}
response = requests.post(url, headers=headers, json=payload)
print(response.text)
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
url := "<base_url>/openapi/v1/va/va-account/create"
body := strings.NewReader(`{"data":"ENCRYPTED_PAYLOAD"}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Set("Partner-Code", "YOUR_PARTNER_CODE")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer eyJhbGciOiJSUzI1…")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
result, _ := io.ReadAll(resp.Body)
fmt.Println(string(result))
}
const response = await fetch("<base_url>/openapi/v1/va/va-account/create", {
method: "POST",
headers: {
"Partner-Code": "YOUR_PARTNER_CODE",
"Content-Type": "application/json",
"Authorization": "Bearer eyJhbGciOiJSUzI1…",
},
body: JSON.stringify({ data: "ENCRYPTED_PAYLOAD" }),
});
const result = await response.text();
console.log(result);
Request
Headers
| Name | Required | Description |
|---|---|---|
Partner-Code | ✅ | Merchant identifier code (provided by TCONNECT) |
Content-Type | ✅ | application/json |
Authorization | ✅ | Bearer <access_token> from Login |
Body
| Field | Type | Required | Description |
|---|---|---|---|
data | string | ✅ | AES-256-CBC encrypted payload as Hexadecimal |
Response
200 — VA created successfully
| Field | Type | Description |
|---|---|---|
va_number | string | Created virtual account number (e.g. VA100023312) |
bank_code | string | Issuing bank code |
account_name | string | Virtual account name |
status | string | VA status (active) |