Sign in

Payments

Create a subaccount

View as Markdown

In a nutshell

Create a subaccount for each partner who receives a share of your payments, and save its subaccount code.

Create a subaccount for each partner who receives part of a payment. Paystack settles the partner's share into the subaccount's bank account. When you split a payment, you identify the partner by the subaccount's subaccount_code.

You can also create subaccounts on the Subaccounts page of your Dashboard.

Copy linkGet the partner's bank code

Create Subaccount identifies the partner's bank by its code, not its name. Call List Banks, find the partner's bank in the response, and copy its code:

GETapi.paystack.co/bank

curl "https://api.paystack.co/bank?country=ghana" \
  -H "Authorization: Bearer $PAYSTACK_SECRET_KEY" \
  -X GET
const https = require("https");

const options = {
  hostname: "api.paystack.co",
  port: 443,
  path: "/bank?country=ghana",
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.PAYSTACK_SECRET_KEY}`,
  },
};

const req = https.request(options, (res) => {
  let data = "";
  res.on("data", (chunk) => {
    data += chunk;
  });
  res.on("end", () => {
    console.log(res.statusCode, JSON.parse(data));
  });
});

req.on("error", (error) => {
  console.error(error);
});

req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.paystack.co/bank?country=ghana",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer " . getenv("PAYSTACK_SECRET_KEY"),
  ),
));
$response = curl_exec($curl);
echo $response;
?>
{
  "status": true,
  "message": "Banks retrieved",
  "data": [
    {
      "name": "Guaranty Trust Bank (Ghana) Limited",
      "code": "230100",
      "currency": "GHS",
      "type": "ghipss",
      "active": true
    }
  ]
}

This response is trimmed to the bank used in the examples on this page. You pass its code as settlement_bank when you create the subaccount.

Copy linkConfirm the account details

Call Resolve Account Number with the partner's account number and bank code. Check that the returned account_name matches the partner's name. For the full flow, see Verify an account number.

Check the account before you create the subaccount

Paystack pays the partner's share into the account on the subaccount. If the details are wrong, the money goes to the wrong account, and Paystack isn't responsible for it.

Copy linkCreate the subaccount

Send the partner's business name, bank code, account number, and percentage_charge to Create Subaccount.

percentage_charge is your share

Set percentage_charge to the percentage of each payment your main account keeps, not the partner's share.

This subaccount gives your main account 20% of each payment and Oasis Foods 80%:

POSTapi.paystack.co/subaccount

curl https://api.paystack.co/subaccount \
  -H "Authorization: Bearer $PAYSTACK_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "business_name": "Oasis Foods",
    "settlement_bank": "230100",
    "account_number": "0123456047123",
    "percentage_charge": 20
  }' \
  -X POST
const https = require("https");

const params = JSON.stringify({
  "business_name": "Oasis Foods",
  "settlement_bank": "230100",
  "account_number": "0123456047123",
  "percentage_charge": 20
});

const options = {
  hostname: "api.paystack.co",
  port: 443,
  path: "/subaccount",
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.PAYSTACK_SECRET_KEY}`,
    "Content-Type": "application/json",
  },
};

const req = https.request(options, (res) => {
  let data = "";
  res.on("data", (chunk) => {
    data += chunk;
  });
  res.on("end", () => {
    console.log(res.statusCode, JSON.parse(data));
  });
});

req.on("error", (error) => {
  console.error(error);
});

req.write(params);
req.end();
<?php
$fields = [
  "business_name" => "Oasis Foods",
  "settlement_bank" => "230100",
  "account_number" => "0123456047123",
  "percentage_charge" => 20,
];

$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.paystack.co/subaccount",
  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($fields),
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer " . getenv("PAYSTACK_SECRET_KEY"),
    "Content-Type: application/json",
    "Cache-Control: no-cache",
  ),
));
$response = curl_exec($curl);
echo curl_getinfo($curl, CURLINFO_HTTP_CODE) . " " . $response;
?>
{
  "status": true,
  "message": "Subaccount created",
  "data": {
    "id": 1151727,
    "subaccount_code": "ACCT_6uujpqtzmnufzkw",
    "business_name": "Oasis Foods",
    "account_number": "0123456047123",
    "account_name": "OASIS FOODS LTD",
    "settlement_bank": "Guaranty Trust Bank (Ghana) Limited",
    "currency": "GHS",
    "percentage_charge": 20,
    "is_verified": false,
    "settlement_schedule": "AUTO",
    "active": true,
    "createdAt": "2026-10-02T09:24:28.723Z"
  }
}

Copy linkSave the subaccount code

Store the subaccount_code (ACCT_6uujpqtzmnufzkw) with the partner's record. Pass it as subaccount to split a payment with one partner, or add it to a split to divide a payment across several subaccounts.

To change the bank account or percentage_charge later, use Update Subaccount.

Was this page helpful?