API Reference

Create Virtual Account Numbers for your Users

curl https://appapi.etegram.com/api/create_virtual_account?key=YOUR_LIVE_SECRET_KEY&account_id=UNIQUE_ID&email=CUSTOMER_EMAIL&phone=CUSTOMER_PHONE&name=ACCOUNT_NAME
-H "Authorization: Bearer YOUR_SECRET_KEY"
-X GET
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL => "https://appapi.etegram.com/api/create_virtual_account?key=YOUR_LIVE_SECRET_KEY&account_id=UNIQUE_ID&email=CUSTOMER_EMAIL&phone=CUSTOMER_PHONE&name=ACCOUNT_NAME",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer SECRET_KEY",
    "Cache-Control: no-cache",
    ),
));

$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
    echo "cURL Error #:" . $err;
   
}else{
    echo $response;
}
?>
var axios = require('axios');


var config = {
  method: 'GET',
  url: 'https://appapi.etegram.com/api/create_virtual_account?key=YOUR_LIVE_SECRET_KEY&account_id=UNIQUE_ID&email=CUSTOMER_EMAIL&phone=CUSTOMER_PHONE&name=ACCOUNT_NAME',
  headers: { 
    'Authorization': 'Bearer SECRET_KEY'
  },
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

});
require "uri"
require "net/http"

url = URI("https://appapi.etegram.com/api/create_virtual_account?key=YOUR_LIVE_SECRET_KEY&account_id=UNIQUE_ID&email=CUSTOMER_EMAIL&phone=CUSTOMER_PHONE&name=ACCOUNT_NAME")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer {SEC_KEY}"

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

👍

SUCCESS RESPONSE

{
    "message": "Account created successfully",
    "account_number": "8547369769",
    "account_type": "WEMA BANK",
    "status": "success"
}

🚧

NOTE

Please avoid using account names associated with cryptocurrency terms. Only provide company names and valid customer first and last names for the name field.