This API call cannot be made with a publishable API key. Please use a secret API key. You can find a list of your API key at https://dashboard.stripe.com/account/apikeys.
use Stripe\Stripe;
Stripe::setApiKey(env('STRIPE_SECRET'));
.env file
STRIPE_KEY=
STRIPE_SECRET=