Developer Documentation
  • Welcome to OurPass Developer Documentation 🥳
  • Quick Start Guide🚓
    • Errors🚦
    • Test Cards💳
  • OurPass Checkout Button 🔘
  • Collect Payment via the Checkout Button🔘
    • OurPass Inline - HTML
    • OurPass Inline - Angular.js
    • OurPass Inline - React.js
    • OurPass Inline - Vue.js
  • SDKs and Plugins📱
    • Banks 🏦
    • WooCommerce Plugin
    • AdobeCommerce Plugin
  • Connect🖇
    • Create a Connected Account
    • Get Connected Accounts
    • Accepting Payments with Connected Accounts
    • Connected Account Transactions
    • Update/Overhaul Connected Account
    • Delete Connected Account
  • API Reference※
    • Banks🏦
Powered by GitBook
On this page
  • Creation of a connected businesses/account
  • Create Connected accounts
  • Create a Connected Accounts

Was this helpful?

  1. Connect🖇

Create a Connected Account

PreviousConnect🖇NextGet Connected Accounts

Last updated 3 years ago

Was this helpful?

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 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. to accept a payment of 50 naira for each transaction, split_type will be "flat" and split_value will be 50

    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. 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. 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.

Create a Connected Accounts

POST https://api2.ourpass.co/v1/api/subaccounts/partial

This endpoint help businesses to create connected accounts

Headers

Name
Type
Description

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": "kilofer2357.nd@gmail.com",
    "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": "kilofer2357.nd@gmail.com",\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": "kilofer2357.nd@gmail.com",\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\": \"kilofer2357.nd@gmail.com\",\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\": \"kilofer2357.nd@gmail.com\",\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)
get banks