agentsclimarketplace

Paystack plans

Skill rexedge/paystack/skills/paystack-plans

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

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 Plans API — create, list, fetch, and update subscription plans with intervals (daily, weekly, monthly, quarterly, biannually, annually). Use this skill whenever creating pricing tiers or recurring billing plans on Paystack, setting up subscription intervals, configuring invoice limits, managing plan currencies, or building a SaaS pricing page. Also use when you see references to plan_code, PLN_ prefixed codes, or the /plan endpoint.

SKILL.md

4.3 KB, as published. Nobody here has run it

Paystack Plans

The Plans API lets you create and manage installment/recurring payment options. Plans define the billing cycle, amount, and currency for subscriptions.

Depends on: paystack-setup for the paystackRequest helper.
Related: paystack-subscriptions for subscribing customers to plans.

Endpoints

MethodEndpointDescription
POST/planCreate a plan
GET/planList plans
GET/plan/:id_or_codeFetch a plan
PUT/plan/:id_or_codeUpdate a plan

Create Plan

POST /plan

ParamTypeRequiredDescription
namestringYesName of the plan
amountintegerYesAmount in subunits (e.g. 500000 = ₦5,000)
intervalstringYesdaily, weekly, monthly, quarterly, biannually, annually
descriptionstringNoPlan description
send_invoicesbooleanNoSend invoices to customers (default: true)
send_smsstringNoSend SMS to customers (default: true)
currencystringNoCurrency code e.g. NGN, GHS, ZAR, USD
invoice_limitintegerNoMax invoices to raise during subscription
const plan = await paystackRequest<{
  name: string;
  plan_code: string;
  amount: number;
  interval: string;
}>("/plan", {
  method: "POST",
  body: JSON.stringify({
    name: "Pro Plan",
    amount: 500000,        // ₦5,000
    interval: "monthly",
    currency: "NGN",
    send_invoices: true,
    invoice_limit: 0,      // 0 = unlimited
  }),
});
// plan.data.plan_code → "PLN_gx2wn530m0i3w3m"

List Plans

GET /plan

ParamTypeRequiredDescription
perPageintegerNoRecords per page (default: 50)
pageintegerNoPage number (default: 1)
statusstringNoFilter by plan status
intervalstringNoFilter by interval
amountintegerNoFilter by amount (in subunits)
const plans = await paystackRequest("/plan?perPage=20&page=1&interval=monthly");

Fetch Plan

GET /plan/:id_or_code

Returns plan details including associated subscriptions array.

const plan = await paystackRequest(
  `/plan/${encodeURIComponent("PLN_gx2wn530m0i3w3m")}`
);

Update Plan

PUT /plan/:id_or_code

All body params are the same as Create Plan, plus:

ParamTypeRequiredDescription
update_existing_subscriptionsbooleanNoApply changes to existing subscriptions (default: true)
await paystackRequest(`/plan/${encodeURIComponent("PLN_gx2wn530m0i3w3m")}`, {
  method: "PUT",
  body: JSON.stringify({
    name: "Pro Plan (Updated)",
    amount: 750000,
    update_existing_subscriptions: false, // Only affect new subscriptions
  }),
});

Intervals Reference

IntervalDescription
dailyCharge every day
weeklyCharge every 7 days
monthlyCharge every month
quarterlyCharge every 3 months
biannuallyCharge every 6 months
annuallyCharge every 12 months

Common Pattern: SaaS Pricing Setup

async function createPricingTiers() {
  const tiers = [
    { name: "Starter", amount: 200000, interval: "monthly" as const },
    { name: "Pro", amount: 500000, interval: "monthly" as const },
    { name: "Enterprise", amount: 2000000, interval: "monthly" as const },
  ];

  const plans = await Promise.all(
    tiers.map((tier) =>
      paystackRequest("/plan", {
        method: "POST",
        body: JSON.stringify({
          ...tier,
          currency: "NGN",
          send_invoices: true,
        }),
      })
    )
  );

  return plans.map((p: any) => ({
    name: p.data.name,
    code: p.data.plan_code,
    amount: p.data.amount,
  }));
}

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.