Fund Test Virtual Account
curl --request POST \
--url https://api.payaza.africa/live/merchant-collection/payaza/virtual_account/fund_test_virtual_account \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"account_name": "Payaza(Test DVA)",
"account_number": "4030904675",
"initiation_transaction_reference": "Ref1234567890",
"transaction_amount": "1000",
"currency": "NGN",
"source_account_number": "0123456789",
"source_account_name": "Jill Stones",
"source_bank_name": "Test Bank"
}
'import requests
url = "https://api.payaza.africa/live/merchant-collection/payaza/virtual_account/fund_test_virtual_account"
payload = {
"account_name": "Payaza(Test DVA)",
"account_number": "4030904675",
"initiation_transaction_reference": "Ref1234567890",
"transaction_amount": "1000",
"currency": "NGN",
"source_account_number": "0123456789",
"source_account_name": "Jill Stones",
"source_bank_name": "Test Bank"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_name: 'Payaza(Test DVA)',
account_number: '4030904675',
initiation_transaction_reference: 'Ref1234567890',
transaction_amount: '1000',
currency: 'NGN',
source_account_number: '0123456789',
source_account_name: 'Jill Stones',
source_bank_name: 'Test Bank'
})
};
fetch('https://api.payaza.africa/live/merchant-collection/payaza/virtual_account/fund_test_virtual_account', 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.payaza.africa/live/merchant-collection/payaza/virtual_account/fund_test_virtual_account",
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([
'account_name' => 'Payaza(Test DVA)',
'account_number' => '4030904675',
'initiation_transaction_reference' => 'Ref1234567890',
'transaction_amount' => '1000',
'currency' => 'NGN',
'source_account_number' => '0123456789',
'source_account_name' => 'Jill Stones',
'source_bank_name' => 'Test Bank'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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.payaza.africa/live/merchant-collection/payaza/virtual_account/fund_test_virtual_account"
payload := strings.NewReader("{\n \"account_name\": \"Payaza(Test DVA)\",\n \"account_number\": \"4030904675\",\n \"initiation_transaction_reference\": \"Ref1234567890\",\n \"transaction_amount\": \"1000\",\n \"currency\": \"NGN\",\n \"source_account_number\": \"0123456789\",\n \"source_account_name\": \"Jill Stones\",\n \"source_bank_name\": \"Test Bank\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.payaza.africa/live/merchant-collection/payaza/virtual_account/fund_test_virtual_account")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_name\": \"Payaza(Test DVA)\",\n \"account_number\": \"4030904675\",\n \"initiation_transaction_reference\": \"Ref1234567890\",\n \"transaction_amount\": \"1000\",\n \"currency\": \"NGN\",\n \"source_account_number\": \"0123456789\",\n \"source_account_name\": \"Jill Stones\",\n \"source_bank_name\": \"Test Bank\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/merchant-collection/payaza/virtual_account/fund_test_virtual_account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_name\": \"Payaza(Test DVA)\",\n \"account_number\": \"4030904675\",\n \"initiation_transaction_reference\": \"Ref1234567890\",\n \"transaction_amount\": \"1000\",\n \"currency\": \"NGN\",\n \"source_account_number\": \"0123456789\",\n \"source_account_name\": \"Jill Stones\",\n \"source_bank_name\": \"Test Bank\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Payment Notification successful",
"success": false
}Virtual Accounts
Fund Test Virtual Account
This endpoint funds the test virtual accounts. Please note that this API is just for sandbox collections.
POST
/
merchant-collection
/
payaza
/
virtual_account
/
fund_test_virtual_account
Fund Test Virtual Account
curl --request POST \
--url https://api.payaza.africa/live/merchant-collection/payaza/virtual_account/fund_test_virtual_account \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"account_name": "Payaza(Test DVA)",
"account_number": "4030904675",
"initiation_transaction_reference": "Ref1234567890",
"transaction_amount": "1000",
"currency": "NGN",
"source_account_number": "0123456789",
"source_account_name": "Jill Stones",
"source_bank_name": "Test Bank"
}
'import requests
url = "https://api.payaza.africa/live/merchant-collection/payaza/virtual_account/fund_test_virtual_account"
payload = {
"account_name": "Payaza(Test DVA)",
"account_number": "4030904675",
"initiation_transaction_reference": "Ref1234567890",
"transaction_amount": "1000",
"currency": "NGN",
"source_account_number": "0123456789",
"source_account_name": "Jill Stones",
"source_bank_name": "Test Bank"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_name: 'Payaza(Test DVA)',
account_number: '4030904675',
initiation_transaction_reference: 'Ref1234567890',
transaction_amount: '1000',
currency: 'NGN',
source_account_number: '0123456789',
source_account_name: 'Jill Stones',
source_bank_name: 'Test Bank'
})
};
fetch('https://api.payaza.africa/live/merchant-collection/payaza/virtual_account/fund_test_virtual_account', 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.payaza.africa/live/merchant-collection/payaza/virtual_account/fund_test_virtual_account",
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([
'account_name' => 'Payaza(Test DVA)',
'account_number' => '4030904675',
'initiation_transaction_reference' => 'Ref1234567890',
'transaction_amount' => '1000',
'currency' => 'NGN',
'source_account_number' => '0123456789',
'source_account_name' => 'Jill Stones',
'source_bank_name' => 'Test Bank'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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.payaza.africa/live/merchant-collection/payaza/virtual_account/fund_test_virtual_account"
payload := strings.NewReader("{\n \"account_name\": \"Payaza(Test DVA)\",\n \"account_number\": \"4030904675\",\n \"initiation_transaction_reference\": \"Ref1234567890\",\n \"transaction_amount\": \"1000\",\n \"currency\": \"NGN\",\n \"source_account_number\": \"0123456789\",\n \"source_account_name\": \"Jill Stones\",\n \"source_bank_name\": \"Test Bank\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.payaza.africa/live/merchant-collection/payaza/virtual_account/fund_test_virtual_account")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_name\": \"Payaza(Test DVA)\",\n \"account_number\": \"4030904675\",\n \"initiation_transaction_reference\": \"Ref1234567890\",\n \"transaction_amount\": \"1000\",\n \"currency\": \"NGN\",\n \"source_account_number\": \"0123456789\",\n \"source_account_name\": \"Jill Stones\",\n \"source_bank_name\": \"Test Bank\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/merchant-collection/payaza/virtual_account/fund_test_virtual_account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_name\": \"Payaza(Test DVA)\",\n \"account_number\": \"4030904675\",\n \"initiation_transaction_reference\": \"Ref1234567890\",\n \"transaction_amount\": \"1000\",\n \"currency\": \"NGN\",\n \"source_account_number\": \"0123456789\",\n \"source_account_name\": \"Jill Stones\",\n \"source_bank_name\": \"Test Bank\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Payment Notification successful",
"success": false
}Authorizations
Payaza {{Public API Key in Base 64}}
Body
application/json
The name assigned to the virtual account.
Example:
"Payaza(Test DVA)"
The virtual account number.
Example:
"4030904675"
the amount to be paid.
Example:
"1000"
Currency code for the collection. Value is ‟NGN”.
Example:
"NGN"
The payer's account number.
Example:
"0123456789"
The payer's account name.
Example:
"Jill Stones"
The payer's bank name.
Example:
"Test Bank"
Required (for Dynamic Virtual Account). The unique identifier for the transaction. This value is empty for reserved virtual accounts.
Example:
"Ref1234567890"
⌘I