Create Split Account
curl --request POST \
--url https://api.payaza.africa/live/settlement/settlement/merchant/split-account \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'X-TenantID: <api-key>' \
--data '
{
"account_no": "0123456789",
"account_name": "John Doe",
"bank_code": "000001",
"name": "John doe",
"email": "johndoe@gmail.com",
"currency": "NGN",
"country": "NGA",
"split_type": "PERCENTAGE",
"split_value": 2
}
'import requests
url = "https://api.payaza.africa/live/settlement/settlement/merchant/split-account"
payload = {
"account_no": "0123456789",
"account_name": "John Doe",
"bank_code": "000001",
"name": "John doe",
"email": "johndoe@gmail.com",
"currency": "NGN",
"country": "NGA",
"split_type": "PERCENTAGE",
"split_value": 2
}
headers = {
"Authorization": "<api-key>",
"X-TenantID": "<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>',
'X-TenantID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_no: '0123456789',
account_name: 'John Doe',
bank_code: '000001',
name: 'John doe',
email: 'johndoe@gmail.com',
currency: 'NGN',
country: 'NGA',
split_type: 'PERCENTAGE',
split_value: 2
})
};
fetch('https://api.payaza.africa/live/settlement/settlement/merchant/split-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/settlement/settlement/merchant/split-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_no' => '0123456789',
'account_name' => 'John Doe',
'bank_code' => '000001',
'name' => 'John doe',
'email' => 'johndoe@gmail.com',
'currency' => 'NGN',
'country' => 'NGA',
'split_type' => 'PERCENTAGE',
'split_value' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"X-TenantID: <api-key>"
],
]);
$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/settlement/settlement/merchant/split-account"
payload := strings.NewReader("{\n \"account_no\": \"0123456789\",\n \"account_name\": \"John Doe\",\n \"bank_code\": \"000001\",\n \"name\": \"John doe\",\n \"email\": \"johndoe@gmail.com\",\n \"currency\": \"NGN\",\n \"country\": \"NGA\",\n \"split_type\": \"PERCENTAGE\",\n \"split_value\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("X-TenantID", "<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/settlement/settlement/merchant/split-account")
.header("Authorization", "<api-key>")
.header("X-TenantID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_no\": \"0123456789\",\n \"account_name\": \"John Doe\",\n \"bank_code\": \"000001\",\n \"name\": \"John doe\",\n \"email\": \"johndoe@gmail.com\",\n \"currency\": \"NGN\",\n \"country\": \"NGA\",\n \"split_type\": \"PERCENTAGE\",\n \"split_value\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/settlement/settlement/merchant/split-account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["X-TenantID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_no\": \"0123456789\",\n \"account_name\": \"John Doe\",\n \"bank_code\": \"000001\",\n \"name\": \"John doe\",\n \"email\": \"johndoe@gmail.com\",\n \"currency\": \"NGN\",\n \"country\": \"NGA\",\n \"split_type\": \"PERCENTAGE\",\n \"split_value\": 2\n}"
response = http.request(request)
puts response.read_body{
"code": "00",
"success": true,
"error": null,
"data": {
"code": "SSA_C0900E891783950401871",
"id": 114
},
"message": "split account created successfully"
}Split Settlements
Create Split Account
This creates a new split settlement account for the authenticated merchant. It can be referenced during Checkout transactions.
Note:
- A unique split account code is generated when a split account is successfully created.
- This code is required when configuring split settlements in the Checkout SDK.
- The bank code values for each respective bank can be retrieved here
POST
/
settlement
/
settlement
/
merchant
/
split-account
Create Split Account
curl --request POST \
--url https://api.payaza.africa/live/settlement/settlement/merchant/split-account \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'X-TenantID: <api-key>' \
--data '
{
"account_no": "0123456789",
"account_name": "John Doe",
"bank_code": "000001",
"name": "John doe",
"email": "johndoe@gmail.com",
"currency": "NGN",
"country": "NGA",
"split_type": "PERCENTAGE",
"split_value": 2
}
'import requests
url = "https://api.payaza.africa/live/settlement/settlement/merchant/split-account"
payload = {
"account_no": "0123456789",
"account_name": "John Doe",
"bank_code": "000001",
"name": "John doe",
"email": "johndoe@gmail.com",
"currency": "NGN",
"country": "NGA",
"split_type": "PERCENTAGE",
"split_value": 2
}
headers = {
"Authorization": "<api-key>",
"X-TenantID": "<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>',
'X-TenantID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_no: '0123456789',
account_name: 'John Doe',
bank_code: '000001',
name: 'John doe',
email: 'johndoe@gmail.com',
currency: 'NGN',
country: 'NGA',
split_type: 'PERCENTAGE',
split_value: 2
})
};
fetch('https://api.payaza.africa/live/settlement/settlement/merchant/split-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/settlement/settlement/merchant/split-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_no' => '0123456789',
'account_name' => 'John Doe',
'bank_code' => '000001',
'name' => 'John doe',
'email' => 'johndoe@gmail.com',
'currency' => 'NGN',
'country' => 'NGA',
'split_type' => 'PERCENTAGE',
'split_value' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"X-TenantID: <api-key>"
],
]);
$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/settlement/settlement/merchant/split-account"
payload := strings.NewReader("{\n \"account_no\": \"0123456789\",\n \"account_name\": \"John Doe\",\n \"bank_code\": \"000001\",\n \"name\": \"John doe\",\n \"email\": \"johndoe@gmail.com\",\n \"currency\": \"NGN\",\n \"country\": \"NGA\",\n \"split_type\": \"PERCENTAGE\",\n \"split_value\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("X-TenantID", "<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/settlement/settlement/merchant/split-account")
.header("Authorization", "<api-key>")
.header("X-TenantID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_no\": \"0123456789\",\n \"account_name\": \"John Doe\",\n \"bank_code\": \"000001\",\n \"name\": \"John doe\",\n \"email\": \"johndoe@gmail.com\",\n \"currency\": \"NGN\",\n \"country\": \"NGA\",\n \"split_type\": \"PERCENTAGE\",\n \"split_value\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/settlement/settlement/merchant/split-account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["X-TenantID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_no\": \"0123456789\",\n \"account_name\": \"John Doe\",\n \"bank_code\": \"000001\",\n \"name\": \"John doe\",\n \"email\": \"johndoe@gmail.com\",\n \"currency\": \"NGN\",\n \"country\": \"NGA\",\n \"split_type\": \"PERCENTAGE\",\n \"split_value\": 2\n}"
response = http.request(request)
puts response.read_body{
"code": "00",
"success": true,
"error": null,
"data": {
"code": "SSA_C0900E891783950401871",
"id": 114
},
"message": "split account created successfully"
}Authorizations
Body
application/json
Response
Create Split Account Response