agentsclimarketplace

Paystack dedicated accounts

Skill rexedge/paystack/skills/paystack-dedicated-accounts

24 AI agent skills for Paystack API integration — automate payment workflows with TypeScript, Node.js, and Next.js

Install
npx -y skills add rexedge/paystack --skill paystack-dedicated-accounts

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Paystack Dedicated Virtual Accounts (DVA) API — create, assign, and manage unique virtual bank account numbers for customers. Supports Wema Bank and Access Bank providers in Nigeria and Ghana. Use this skill whenever implementing bank transfer payments via dedicated accounts, assigning virtual account numbers to customers, querying DVA transactions, splitting DVA payments with subaccounts, deactivating accounts, or fetching available bank providers. Also use when you see references to /dedicated_account endpoint, DVA, or virtual account numbers.

SKILL.md

6.3 KB, as published. Nobody here has run it

Paystack Dedicated Virtual Accounts

The Dedicated Virtual Account API lets you create and manage unique payment account numbers for your customers. Available for Nigerian and Ghanaian merchants.

Depends on: paystack-setup for the paystackRequest helper.
Related: paystack-subaccounts and paystack-splits for splitting DVA transactions.

Endpoints

MethodEndpointDescription
POST/dedicated_accountCreate DVA for existing customer
POST/dedicated_account/assignCreate customer + assign DVA in one step
GET/dedicated_accountList dedicated accounts
GET/dedicated_account/:idFetch a dedicated account
GET/dedicated_account/requeryRequery for new transactions
DELETE/dedicated_account/:idDeactivate a dedicated account
POST/dedicated_account/splitAdd split to DVA transactions
DELETE/dedicated_account/splitRemove split from DVA
GET/dedicated_account/available_providersList available bank providers

Fetch Bank Providers

Always check available providers first:

const providers = await paystackRequest<Array<{
  provider_slug: string;
  bank_id: number;
  bank_name: string;
}>>("/dedicated_account/available_providers");
// e.g. [{ provider_slug: "wema-bank", bank_id: 20, bank_name: "Wema Bank" }]

Create DVA for Existing Customer

POST /dedicated_account

ParamTypeRequiredDescription
customerstringYesCustomer ID or code
preferred_bankstringNoBank slug (e.g. wema-bank, access-bank)
subaccountstringNoSubaccount code for split payments
split_codestringNoSplit code for multi-party splits
first_namestringNoCustomer first name
last_namestringNoCustomer last name
phonestringNoCustomer phone number
const dva = await paystackRequest<{
  bank: { name: string; slug: string };
  account_name: string;
  account_number: string;
  assigned: boolean;
  active: boolean;
}>("/dedicated_account", {
  method: "POST",
  body: JSON.stringify({
    customer: "CUS_dy1r7ts03zixbq5",
    preferred_bank: "wema-bank",
  }),
});
// dva.data.account_number → "9930000737"

Assign DVA (Create Customer + DVA)

POST /dedicated_account/assign — creates the customer, validates, and assigns a DVA in one step.

ParamTypeRequiredDescription
emailstringYesCustomer email
first_namestringYesFirst name
last_namestringYesLast name
phonestringYesPhone number
preferred_bankstringYesBank slug
countrystringYesNG or GH
account_numberstringNoCustomer's account number
bvnstringNoBank Verification Number (Nigeria)
bank_codestringNoCustomer's bank code
subaccountstringNoSubaccount code for split
split_codestringNoSplit code for multi-party split
await paystackRequest("/dedicated_account/assign", {
  method: "POST",
  body: JSON.stringify({
    email: "[email protected]",
    first_name: "Jane",
    last_name: "Doe",
    phone: "+2348100000000",
    preferred_bank: "wema-bank",
    country: "NG",
  }),
});
// Response: { status: true, message: "Assign dedicated account in progress" }

List Dedicated Accounts

GET /dedicated_account

ParamTypeRequiredDescription
activebooleanNoFilter by active status
currencystringNoNGN or GHS
provider_slugstringNoBank slug filter
bank_idstringNoBank ID filter
customerstringNoCustomer ID filter
const accounts = await paystackRequest("/dedicated_account?active=true&currency=NGN");

Fetch Dedicated Account

const account = await paystackRequest(`/dedicated_account/${dedicatedAccountId}`);

Requery for New Transactions

await paystackRequest(
  `/dedicated_account/requery?account_number=9930000737&provider_slug=wema-bank&date=2024-01-15`
);

Deactivate Dedicated Account

await paystackRequest(`/dedicated_account/${dedicatedAccountId}`, {
  method: "DELETE",
});

Split DVA Transactions

Add a split to DVA incoming payments:

await paystackRequest("/dedicated_account/split", {
  method: "POST",
  body: JSON.stringify({
    customer: "CUS_dy1r7ts03zixbq5",
    split_code: "SPL_e7jnRLtzla",
    // OR use subaccount instead of split_code:
    // subaccount: "ACCT_6uujpqtzmnufzkw",
  }),
});

Remove a split:

await paystackRequest("/dedicated_account/split", {
  method: "DELETE",
  body: JSON.stringify({
    account_number: "0033322211",
  }),
});

Full DVA Flow

// 1. Check available providers
const providers = await paystackRequest("/dedicated_account/available_providers");

// 2. Create customer first (or use existing)
const customer = await paystackRequest("/customer", {
  method: "POST",
  body: JSON.stringify({
    email: "[email protected]",
    first_name: "John",
    last_name: "Doe",
    phone: "+2348012345678",
  }),
});

// 3. Create DVA for the customer
const dva = await paystackRequest("/dedicated_account", {
  method: "POST",
  body: JSON.stringify({
    customer: customer.data.customer_code,
    preferred_bank: "wema-bank",
  }),
});

// 4. Display account details to user for bank transfer
console.log(`Pay to: ${dva.data.account_number} (${dva.data.bank.name})`);

// 5. Listen for charge.success webhook to confirm payment
// See paystack-webhooks skill for webhook handling

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.