Undefined property: CartalystStripeStripe::$subscriptions

  laravel, php, stripe-api, stripe-payments

i want to create subscription for my customer i am able to create customer but when i try to create subscription it show me the error

Undefined property: CartalystStripeStripe::$subscriptions

following is my code to create subscription

public function createStripeSubscription($customerId,$curPackage,$type,$stripe){
      $response = $stripe->subscriptions->create([
        'customer' =>$customerId,
        'items' => [
          ['price' => $curPackage->getPriceId($type)],

i am using latest version of stripe sdk,please help i am stuck with this, thanks in advace.

Source: Laravel

Leave a Reply