-
Notifications
You must be signed in to change notification settings - Fork 19
Payment Plan
Abraham Olaobaju edited this page Aug 23, 2023
·
3 revisions
This section describes how you can create and manage your respective payment plans.
This section describes how to create a payment plan with Flutterwave.
use Flutterwave\Payload;
use Flutterwave\Service\PaymentPlan;
$payload = new Payload();
$payload->set("amount", "2000");
$payload->set("name", "Hulu Extra");
$payload->set("interval", "monthly");
$payload->set("duration", "1");
$service = new PaymentPlan();
$request = $service->create($payload);
print_r($request);
This section describes how to fetch all payment plans on your account.
use Flutterwave\Service\PaymentPlan;
$id = "3806";
$service = new PaymentPlan();
$request = $service->get($id);
print_r($request);
This section describes how to fetch all payment plans on your account.
use Flutterwave\Service\PaymentPlan;
$service = new PaymentPlan();
$request = $service->list();
print_r($request);
This help the you update an existing payment plan.
use Flutterwave\Service\PaymentPlan;
$payload = new Payload();
$payload->set("amount","600");
$payload->set("status", "active");
$service = new PaymentPlan();
$request = $service->update($id, $payload);
print_r($request);
This help the to cancel an existing payment plan.
$id = "3807";
$service = new PaymentPlan();
$request = $service->cancel($id);
print_r($request);