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
1
curl --location --request POST 'https://api2.ourpass.co/v1/api/subaccounts/partial' \
2
--data-raw '{
3
"bankCode": "000001",
4
"txCap": 1000,
5
"subAccountEmail": "[email protected]",
6
"userMobile": "2348098783565",
7
"businessName": "Dan Busee ltd",
8
"accountNumber": "0073559141",
9
"accountName": "OLALEKAN ADEWALE",
10
"currency": "NGN",
11
"bankName": "ACCESS BANK"
12
}'
Copied!
1
var axios = require('axios');
2
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}';
3
4
var config = {
5
method: 'post',
6
url: 'https://api2.ourpass.co/v1/api/subaccounts/partial',
7
headers: { },
8
data : data
9
};
10
11
axios(config)
12
.then(function (response) {
13
console.log(JSON.stringify(response.data));
14
})
15
.catch(function (error) {
16
console.log(error);
17
});
18
Copied!
1
<?php
2
require_once 'HTTP/Request2.php';
3
$request = new HTTP_Request2();
4
$request->setUrl('https://api2.ourpass.co/v1/api/subaccounts/partial');
5
$request->setMethod(HTTP_Request2::METHOD_POST);
6
$request->setConfig(array(
7
'follow_redirects' => TRUE
8
));
9
$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}');
10
try {
11
$response = $request->send();
12
if ($response->getStatus() == 200) {
13
echo $response->getBody();
14
}
15
else {
16
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
17
$response->getReasonPhrase();
18
}
19
}
20
catch(HTTP_Request2_Exception $e) {
21
echo 'Error: ' . $e->getMessage();
22
}
Copied!
1
require "uri"
2
require "net/http"
3
4
url = URI("https://api2.ourpass.co/v1/api/subaccounts/partial")
5
6
https = Net::HTTP.new(url.host, url.port)
7
https.use_ssl = true
8
9
request = Net::HTTP::Post.new(url)
10
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}"
11
12
response = https.request(request)
13
puts response.read_body
14
Copied!
1
import requests
2
3
url = "https://api2.ourpass.co/v1/api/subaccounts/partial"
4
5
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}"
6
headers = {}
7
8
response = requests.request("POST", url, headers=headers, data=payload)
9
10
print(response.text)
11
Copied!