Skip to content

Commit d35b9c0

Browse files
committed
add method to get all subscriptions to a plan
1 parent 56e8fc6 commit d35b9c0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Paystack.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,19 @@ public function getCustomerSubscriptions($customer_id)
458458
return $this->setHttpResponse('/subscription?customer=' . $customer_id, 'GET', [])->getData();
459459
}
460460

461+
/**
462+
* Get plan subscriptions
463+
*
464+
* @param integer $plan_id
465+
* @return array
466+
*/
467+
public function getPlanSubscriptions($plan_id)
468+
{
469+
$this->setRequestOptions();
470+
471+
return $this->setHttpResponse('/subscription?plan=' . $plan_id, 'GET', [])->getData();
472+
}
473+
461474
/**
462475
* Enable a subscription using the subscription code and token
463476
* @return array

0 commit comments

Comments
 (0)