Plans
Plans currently support create, update, fetch, and list operations.
Create a plan
php
use Maxiviper117\Paystack\Data\Input\Plan\CreatePlanInputData;
use Maxiviper117\Paystack\Facades\Paystack;
$response = Paystack::createPlan(
new CreatePlanInputData(
name: 'Starter',
amount: 5000,
interval: 'monthly',
)
);Other supported plan actions
UpdatePlanActionFetchPlanActionListPlansAction
Matching DTOs:
UpdatePlanInputDataFetchPlanInputDataListPlansInputDataUpdatePlanResponseDataFetchPlanResponseDataListPlansResponseData
When to use plans
Plans are the billing definition used by Paystack subscriptions. Create or fetch a plan first, then use its plan code when creating a subscription.