Create virtual account (customer)
curl --request POST \
--url https://api.platnova.com/v1/virtual-accounts/create \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"currency": "NGN",
"customer_id": "43a2b75e-5c59-429e-872a-2a54c7b17e34",
"id_number": "22123456789",
"codes": [
"058"
]
}
'import requests
url = "https://api.platnova.com/v1/virtual-accounts/create"
payload = {
"currency": "NGN",
"customer_id": "43a2b75e-5c59-429e-872a-2a54c7b17e34",
"id_number": "22123456789",
"codes": ["058"]
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency: 'NGN',
customer_id: '43a2b75e-5c59-429e-872a-2a54c7b17e34',
id_number: '22123456789',
codes: ['058']
})
};
fetch('https://api.platnova.com/v1/virtual-accounts/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.platnova.com/v1/virtual-accounts/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'currency' => 'NGN',
'customer_id' => '43a2b75e-5c59-429e-872a-2a54c7b17e34',
'id_number' => '22123456789',
'codes' => [
'058'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.platnova.com/v1/virtual-accounts/create"
payload := strings.NewReader("{\n \"currency\": \"NGN\",\n \"customer_id\": \"43a2b75e-5c59-429e-872a-2a54c7b17e34\",\n \"id_number\": \"22123456789\",\n \"codes\": [\n \"058\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.platnova.com/v1/virtual-accounts/create")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"NGN\",\n \"customer_id\": \"43a2b75e-5c59-429e-872a-2a54c7b17e34\",\n \"id_number\": \"22123456789\",\n \"codes\": [\n \"058\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platnova.com/v1/virtual-accounts/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"NGN\",\n \"customer_id\": \"43a2b75e-5c59-429e-872a-2a54c7b17e34\",\n \"id_number\": \"22123456789\",\n \"codes\": [\n \"058\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"data": {
"customer_id": "<string>",
"reference": "<string>",
"currency": "<string>",
"email": "[email protected]",
"first_name": "<string>",
"last_name": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"accounts": [
{
"account_number": "<string>",
"account_name": "<string>",
"bank_name": "<string>",
"bank_code": "<string>",
"ach_routing_number": "<string>",
"rtp_routing_number": "<string>",
"wire_routing_number": "<string>",
"swift_code": "<string>",
"bank_address": "<string>"
}
]
},
"error": [
"<unknown>"
],
"message": "<string>"
}{
"status": true,
"data": {},
"error": [
"<unknown>"
],
"message": "<string>"
}Virtual Accounts
Create Virtual Account
Create a virtual bank account for a customer in the specified currency. Requires customer_id and currency. For NGN, id_number (BVN) may be required.
POST
/
v1
/
virtual-accounts
/
create
Create virtual account (customer)
curl --request POST \
--url https://api.platnova.com/v1/virtual-accounts/create \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"currency": "NGN",
"customer_id": "43a2b75e-5c59-429e-872a-2a54c7b17e34",
"id_number": "22123456789",
"codes": [
"058"
]
}
'import requests
url = "https://api.platnova.com/v1/virtual-accounts/create"
payload = {
"currency": "NGN",
"customer_id": "43a2b75e-5c59-429e-872a-2a54c7b17e34",
"id_number": "22123456789",
"codes": ["058"]
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency: 'NGN',
customer_id: '43a2b75e-5c59-429e-872a-2a54c7b17e34',
id_number: '22123456789',
codes: ['058']
})
};
fetch('https://api.platnova.com/v1/virtual-accounts/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.platnova.com/v1/virtual-accounts/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'currency' => 'NGN',
'customer_id' => '43a2b75e-5c59-429e-872a-2a54c7b17e34',
'id_number' => '22123456789',
'codes' => [
'058'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.platnova.com/v1/virtual-accounts/create"
payload := strings.NewReader("{\n \"currency\": \"NGN\",\n \"customer_id\": \"43a2b75e-5c59-429e-872a-2a54c7b17e34\",\n \"id_number\": \"22123456789\",\n \"codes\": [\n \"058\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.platnova.com/v1/virtual-accounts/create")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"NGN\",\n \"customer_id\": \"43a2b75e-5c59-429e-872a-2a54c7b17e34\",\n \"id_number\": \"22123456789\",\n \"codes\": [\n \"058\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platnova.com/v1/virtual-accounts/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"NGN\",\n \"customer_id\": \"43a2b75e-5c59-429e-872a-2a54c7b17e34\",\n \"id_number\": \"22123456789\",\n \"codes\": [\n \"058\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"data": {
"customer_id": "<string>",
"reference": "<string>",
"currency": "<string>",
"email": "[email protected]",
"first_name": "<string>",
"last_name": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"accounts": [
{
"account_number": "<string>",
"account_name": "<string>",
"bank_name": "<string>",
"bank_code": "<string>",
"ach_routing_number": "<string>",
"rtp_routing_number": "<string>",
"wire_routing_number": "<string>",
"swift_code": "<string>",
"bank_address": "<string>"
}
]
},
"error": [
"<unknown>"
],
"message": "<string>"
}{
"status": true,
"data": {},
"error": [
"<unknown>"
],
"message": "<string>"
}Overview
Create a virtual account for a customer. Virtual accounts allow customers to receive payments directly into their account. This endpoint creates a bank account that can be used for receiving funds. To generate USD virtual accounts, ensure a default USD settlement wallet is set on your dashboard settings. This wallet will be billed for USD account creation fees if applicable. For NGN virtual accounts, you can optionally specify anid_number parameter in the request body, which corresponds to a valid BVN.Authorizations
API key for authentication.
Body
application/json
⌘I

