Create a Connected Account
Creation of a connected businesses/account
Connected accounts can be created via dashboard and available via API for larger integrations. If you accessing connected accounts via your business dashboard, simply go to connect and select the connected account tab.
Terminologies for connected businesses
bankNameandaccountNumber: This refers to the bank account of the connected account while the later refers to the bank code
businessNameanduserMobile: This refers to the name of the business and the phone number associated with the business/merchant.splitType: this refers to the commission the parent business would like to receive from the connected account. Split types includeflatandpercentage with capflat: this refers to a flat fee you want to receive from the connected account from each transaction madeto accept a payment of 50 naira for each transaction,
split_typewill be"flat"andsplit_valuewill be50to accept a payment of 100 naira for each transaction,
split_typewill be"flat"andsplit_valuewill be100
percentage with cap: this refers to the percentage of the transaction you would like to get as a commission with a captxCap(or no cap)to accept payment of 3% for each transaction with a cap of 2000 naira,
split_typewill be"percentage with cap"andsplit_valuewill be0.03whiletxCapwill be2000to accept payment of 3% for each transaction with no cap,
split_typewill be"percentage with cap"andsplit_valuewill be0.03whiletxCapwill be 0
Create Connected accounts
Connected accounts can either be created via your business/merchant dashboard or directly via create account endpoint.
Create a Connected Accounts
POST https://api2.ourpass.co/v1/api/subaccounts/partial
This endpoint help businesses to create connected accounts
Headers
apiKey*
String
Pass your api key in the request header to authorise the call
{
"success": true,
"message": "Business Subaccount created",
"data": {
"businessName": "Dan Busee ltd",
"accountNumber": "0073559141",
"bankCode": "000001",
"currency": "NGN",
"authorizationKeys": "auth_live_lHe89VQLI9Jym4Yd5WGiTSZVqHpel9Qy",
"splitType": "percentage-with-cap",
"splitValue": 0,
"percentValue": 10,
"createdAt": "Mon Mar 28 2022 10:45:01 GMT+0100 (West Africa Standard Time)"
}
}{
"success": false,
"message": "This bank account details already exist in one of your subaccounts",
"data": null
}curl --location --request POST 'https://api2.ourpass.co/v1/api/subaccounts/partial' \
--data-raw '{
"bankCode": "000001",
"txCap": 1000,
"subAccountEmail": "[email protected]",
"userMobile": "2348098783565",
"businessName": "Dan Busee ltd",
"accountNumber": "0073559141",
"accountName": "OLALEKAN ADEWALE",
"currency": "NGN",
"bankName": "ACCESS BANK"
}'var axios = require('axios');
var data = '{\n "bankCode": "000001",\n "txCap": 1000,\n "subAccountEmail": "[email protected]",\n "userMobile": "2348098783565",\n "businessName": "Dan Busee ltd",\n "accountNumber": "0073559141",\n "accountName": "OLALEKAN ADEWALE",\n "currency": "NGN",\n "bankName": "ACCESS BANK" \n}';
var config = {
method: 'post',
url: 'https://api2.ourpass.co/v1/api/subaccounts/partial',
headers: { },
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api2.ourpass.co/v1/api/subaccounts/partial');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setBody('{\n "bankCode": "000001",\n "txCap": 1000,\n "subAccountEmail": "[email protected]",\n "userMobile": "2348098783565",\n "businessName": "Dan Busee ltd",\n "accountNumber": "0073559141",\n "accountName": "OLALEKAN ADEWALE",\n "currency": "NGN",\n "bankName": "ACCESS BANK" \n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}require "uri"
require "net/http"
url = URI("https://api2.ourpass.co/v1/api/subaccounts/partial")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request.body = "{\n \"bankCode\": \"000001\",\n \"txCap\": 1000,\n \"subAccountEmail\": \"[email protected]\",\n \"userMobile\": \"2348098783565\",\n \"businessName\": \"Dan Busee ltd\",\n \"accountNumber\": \"0073559141\",\n \"accountName\": \"OLALEKAN ADEWALE\",\n \"currency\": \"NGN\",\n \"bankName\": \"ACCESS BANK\" \n}"
response = https.request(request)
puts response.read_body
import requests
url = "https://api2.ourpass.co/v1/api/subaccounts/partial"
payload = "{\n \"bankCode\": \"000001\",\n \"txCap\": 1000,\n \"subAccountEmail\": \"[email protected]\",\n \"userMobile\": \"2348098783565\",\n \"businessName\": \"Dan Busee ltd\",\n \"accountNumber\": \"0073559141\",\n \"accountName\": \"OLALEKAN ADEWALE\",\n \"currency\": \"NGN\",\n \"bankName\": \"ACCESS BANK\" \n}"
headers = {}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Last updated
Was this helpful?