Skip to content

Plans

The PlanResource allows you to create and manage payment plans on your integration. These plans can be used for recurring subscriptions or installment payment options for your customers.

Tip: You can also create and manage plans directly from your Paystack Dashboard without using the API.

Create Plan

Create a plan on your integration.

Important: The amount should be in the subunit of the supported currency (e.g., kobo for Naira, pesewas for Cedi).

php

$plan = paystack()->plan()->create([
    'name' => 'Monthly Retainer',
    'amount' => 500000, // 5,000.00
    'interval' => 'monthly',
    'description' => 'Monthly retainer for services'
]);

Parameters

ParameterTypeRequiredDescription
nameStringYesName of plan.
amountIntegerYesAmount should be in the subunit of the supported currency.
intervalStringYesInterval in words. Valid intervals are: daily, weekly, monthly, quarterly, biannually (every 6 months), annually.
descriptionStringNoA description for this plan.
send_invoicesBooleanNoSet to false if you don't want invoices to be sent to your customers.
send_smsStringNoSet to false if you don't want text messages to be sent to your customers.
currencyStringNoCurrency in which amount is set.
invoice_limitIntegerNoNumber of invoices to raise during subscription to this plan. Can be overridden by specifying an invoice_limit while subscribing.

List Plans

List plans available on your integration.

php
// List all plans
$plans = paystack()->plan()->list();

// Filter plans
$filtered = paystack()->plan()->list([
    'perPage' => 20,
    'status' => 'active',
    'interval' => 'monthly'
]);

Parameters

ParameterTypeDescription
perPageIntegerSpecify how many records you want to retrieve per page. Default: 50.
pageIntegerSpecify exactly what page you want to retrieve. Default: 1.
statusStringFilter list by plans with specified status.
intervalStringFilter list by plans with specified interval.
amountIntegerFilter list by plans with specified amount using the supported currency.

Fetch Plan

Get details of a plan on your integration.

php
$idOrCode = 'PLN_gx2wn530m0i3w3m';

$plan = paystack()->plan()->fetch($idOrCode);

Update Plan

Update a plan's details on your integration.

php
$idOrCode = 'PLN_gx2wn530m0i3w3m';

$updated = paystack()->plan()->update($idOrCode, [
    'name' => 'Monthly Retainer (Renamed)',
    'amount' => 600000
]);

Parameters

ParameterTypeDescription
nameStringName of plan.
amountIntegerAmount should be in the subunit of the supported currency.
intervalStringInterval in words. Valid intervals are hourly, daily, weekly, monthly, quarterly, biannually, annually.
descriptionStringA description for this plan.
send_invoicesBooleanSet to false if you don't want invoices to be sent to your customers.
send_smsStringSet to false if you don't want text messages to be sent to your customers.
currencyStringCurrency in which amount is set.
invoice_limitIntegerNumber of invoices to raise during subscription to this plan.
update_existing_subscriptionsBooleanSet to true if you want the existing subscriptions to use the new changes. Set to false and only new subscriptions will be changed. Defaults to true when not set.

Released under the MIT License.