POST {{baseurl}}/virtual-accounts
- Staging
- Production
https://gw.stg.girostack.com/v1Headers
string
required
Pass your account’s secret key as the value.
emailAddress and mobile are only required to create Secondary wallets.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl --location --request POST '{{API_BASE_URL}}/virtual-accounts' \
--header 'x-giro-key: {{SECRET_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
"accountName": "John Doe",
"category": "primary",
"currency": "NGN"
}'
const fetch = require("node-fetch");
const url = "{{API_BASE_URL}}/virtual-accounts";
const headers = {
"x-giro-key": "{{SECRET_KEY}}",
"Content-Type": "application/json",
};
const body = JSON.stringify({
accountName: "John Doe",
category: "primary",
currency: "NGN",
});
fetch(url, {
method: "POST",
headers: headers,
body: body,
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{API_BASE_URL}}/virtual-accounts',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => array(
'x-giro-key: {{SECRET_KEY}}',
'Content-Type: application/json'
),
CURLOPT_POSTFIELDS => json_encode(array(
'accountName' => 'John Doe',
'category' => 'primary',
'currency' => 'NGN'
))
));
$response = curl_exec($curl);
$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if (curl_errno($curl)) {
echo 'Error: ' . curl_error($curl);
} else {
echo "Response Code: $httpcode\n";
echo $response;
}
curl_close($curl);
?>
{
"meta": {
"statusCode": 201,
"success": true,
"message": "VirtualAccount successfully created"
},
"data": {
"publicId": "vba-19aeceea-1bd6-4e85-89fa-2ca0b1c57d61",
"auth": "65b12bbf512f9932b67f53d7",
"account": "65b12bbf36e38c6bfbe35f95",
"accountName": "John Doe",
"accountNumber": "7481018744",
"bankName": "Source MFB",
"bankCode": "090641",
"live": true,
"isFavourite": true,
"processor": "source",
"category": "primary",
"id": 1,
"createdAt": "2024-04-20T19:50:16.880Z",
"updatedAt": "2024-04-20T19:50:16.880Z",
"balance": 0,
"currency": "NGN",
"lastUpdated": "2024-04-20T19:50:16.880Z"
}
}
{
"meta": {
"statusCode": 400,
"error": {
"statusCode": 400,
"message": "Virtual Account name already exist"
}
}
}
This endpoint creates a wallet.
curl --location --request POST '{{API_BASE_URL}}/virtual-accounts' \
--header 'x-giro-key: {{SECRET_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
"accountName": "John Doe",
"category": "primary",
"currency": "NGN"
}'
const fetch = require("node-fetch");
const url = "{{API_BASE_URL}}/virtual-accounts";
const headers = {
"x-giro-key": "{{SECRET_KEY}}",
"Content-Type": "application/json",
};
const body = JSON.stringify({
accountName: "John Doe",
category: "primary",
currency: "NGN",
});
fetch(url, {
method: "POST",
headers: headers,
body: body,
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{API_BASE_URL}}/virtual-accounts',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => array(
'x-giro-key: {{SECRET_KEY}}',
'Content-Type: application/json'
),
CURLOPT_POSTFIELDS => json_encode(array(
'accountName' => 'John Doe',
'category' => 'primary',
'currency' => 'NGN'
))
));
$response = curl_exec($curl);
$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if (curl_errno($curl)) {
echo 'Error: ' . curl_error($curl);
} else {
echo "Response Code: $httpcode\n";
echo $response;
}
curl_close($curl);
?>
{
"meta": {
"statusCode": 201,
"success": true,
"message": "VirtualAccount successfully created"
},
"data": {
"publicId": "vba-19aeceea-1bd6-4e85-89fa-2ca0b1c57d61",
"auth": "65b12bbf512f9932b67f53d7",
"account": "65b12bbf36e38c6bfbe35f95",
"accountName": "John Doe",
"accountNumber": "7481018744",
"bankName": "Source MFB",
"bankCode": "090641",
"live": true,
"isFavourite": true,
"processor": "source",
"category": "primary",
"id": 1,
"createdAt": "2024-04-20T19:50:16.880Z",
"updatedAt": "2024-04-20T19:50:16.880Z",
"balance": 0,
"currency": "NGN",
"lastUpdated": "2024-04-20T19:50:16.880Z"
}
}
{
"meta": {
"statusCode": 400,
"error": {
"statusCode": 400,
"message": "Virtual Account name already exist"
}
}
}
POST {{baseurl}}/virtual-accounts
https://gw.stg.girostack.com/v1https://gw.prod.girostack.com/v1emailAddress and mobile are only required to create Secondary wallets.curl --location --request POST '{{API_BASE_URL}}/virtual-accounts' \
--header 'x-giro-key: {{SECRET_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
"accountName": "John Doe",
"category": "primary",
"currency": "NGN"
}'
const fetch = require("node-fetch");
const url = "{{API_BASE_URL}}/virtual-accounts";
const headers = {
"x-giro-key": "{{SECRET_KEY}}",
"Content-Type": "application/json",
};
const body = JSON.stringify({
accountName: "John Doe",
category: "primary",
currency: "NGN",
});
fetch(url, {
method: "POST",
headers: headers,
body: body,
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{API_BASE_URL}}/virtual-accounts',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => array(
'x-giro-key: {{SECRET_KEY}}',
'Content-Type: application/json'
),
CURLOPT_POSTFIELDS => json_encode(array(
'accountName' => 'John Doe',
'category' => 'primary',
'currency' => 'NGN'
))
));
$response = curl_exec($curl);
$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if (curl_errno($curl)) {
echo 'Error: ' . curl_error($curl);
} else {
echo "Response Code: $httpcode\n";
echo $response;
}
curl_close($curl);
?>
{
"meta": {
"statusCode": 201,
"success": true,
"message": "VirtualAccount successfully created"
},
"data": {
"publicId": "vba-19aeceea-1bd6-4e85-89fa-2ca0b1c57d61",
"auth": "65b12bbf512f9932b67f53d7",
"account": "65b12bbf36e38c6bfbe35f95",
"accountName": "John Doe",
"accountNumber": "7481018744",
"bankName": "Source MFB",
"bankCode": "090641",
"live": true,
"isFavourite": true,
"processor": "source",
"category": "primary",
"id": 1,
"createdAt": "2024-04-20T19:50:16.880Z",
"updatedAt": "2024-04-20T19:50:16.880Z",
"balance": 0,
"currency": "NGN",
"lastUpdated": "2024-04-20T19:50:16.880Z"
}
}
{
"meta": {
"statusCode": 400,
"error": {
"statusCode": 400,
"message": "Virtual Account name already exist"
}
}
}
Was this page helpful?