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

  • bankName and accountNumber: This refers to the bank account of the connected account while the later refers to the bank code
Access get banks endpoint here
  • businessName and userMobile: 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 include flat and percentage with cap
  • flat: this refers to a flat fee you want to receive from the connected account from each transaction made
    1. 1.
      to accept a payment of 50 naira for each transaction, split_type will be "flat" and split_value will be 50
    2. 2.
      to accept a payment of 100 naira for each transaction, split_type will be "flat" and split_value will be 100
  • percentage with cap: this refers to the percentage of the transaction you would like to get as a commission with a cap txCap(or no cap)
    1. 1.
      to accept payment of 3% for each transaction with a cap of 2000 naira, split_type will be "percentage with cap" and split_value will be 0.03while txCap will be 2000
    2. 2.
      to accept payment of 3% for each transaction with no cap, split_type will be "percentage with cap" and split_value will be 0.03while txCap will be 0

Create Connected accounts

Connected accounts can either be created via your business/merchant dashboard or directly via create account endpoint.
post
https://api2.ourpass.co/v1/api/subaccounts/partial
Create a Connected Accounts
cURL
Node.js
PHP
Ruby
Python
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)