Appearance
Generate Virtual Account
Create a fixed virtual account for a customer reference.
| Method | POST |
| URL | /api/m1/generate-va |
| Auth | Bearer ZMPRO-… (live) or ZMDEV-… (test) |
Body parameters
| Field | Required | Example | Description |
|---|---|---|---|
reference_id | Yes | 12345678099 | Unique id for this virtual account (your reference). |
firstname | No | Demo | Customer first name. Defaults to merchant business name if omitted. |
lastname | No | User | Customer last name. Defaults to merchant business name if omitted. |
gender | No | MALE | Customer gender (optional). |
date_off_birth | No | 1992-07-07 | Customer date of birth (optional). Note field spelling. |
Headers
| Header | Value |
|---|---|
Authorization | Bearer ZMPRO-your-live-api-key |
Content-Type | application/json |
Request
bash
curl -X POST 'https://api.vizo.app/api/m1/generate-va' \
-H 'Authorization: Bearer ZMPRO-your-live-api-key' \
-H 'Content-Type: application/json' \
-d '{
"reference_id": "12345678099",
"firstname": "Demo",
"lastname": "User",
"gender": "MALE",
"date_off_birth": "1992-07-07"
}'ts
const response = await fetch('https://api.vizo.app/api/m1/generate-va', {
method: 'POST',
headers: {
Authorization: 'Bearer ZMPRO-your-live-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"reference_id": "12345678099",
"firstname": "Demo",
"lastname": "User",
"gender": "MALE",
"date_off_birth": "1992-07-07"
}),
});
const data = await response.json();
console.log(data);py
import requests
url = "https://api.vizo.app/api/m1/generate-va"
headers = {
"Authorization": "Bearer ZMPRO-your-live-api-key",
"Content-Type": "application/json",
}
payload = {
"reference_id": "12345678099",
"firstname": "Demo",
"lastname": "User",
"gender": "MALE",
"date_off_birth": "1992-07-07"
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.status_code)
print(response.json())php
<?php
$ch = curl_init('https://api.vizo.app/api/m1/generate-va');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ZMPRO-your-live-api-key',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'reference_id' => '12345678099',
'firstname' => 'Demo',
'lastname' => 'User',
'gender' => 'MALE',
'date_off_birth' => '1992-07-07'
], JSON_UNESCAPED_SLASHES),
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $response, PHP_EOL;Responses
FAILED Response — 404 Not Found
json
{
"status": "FAILED",
"data": "Virtual account creation failed",
"message": "External Id already in use"
}SUCCESS Response — 200 OK
json
{
"status": "SUCCESS",
"data": {
"id": "P69LQKRdV3JY",
"gender": null,
"status": "ACTIVE",
"accountNo": "1000124856",
"accountName": "ZuPago 44",
"referenceId": "12345678096"
},
"message": "Success"
}