Level 4
Did you succeed to find a solution ? I have the same problem
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, I am using Laravel 10 with spark-stripe v5.0. When I try to subscribe I get a technical error:
Whoops! Something went wrong. An unexpected error occurred and we have notified our support team. Please try again later.
This is the error in laravel.log file:
Spark\SparkManager::toPlans(): Argument #1 ($config) must be of type array, null given, called in D:\Lab\Projects\web\vendor\laravel\spark-stripe\src\SparkManager.php on line 243
Billables array in Spark.php configuration file:
'path' => 'user/billing',
'middleware' => ['web', 'auth'],
'brand' => [
'logo' => realpath(__DIR__ . '/../public/images/fashy-logo.svg'),
'color' => '#D84B5B',
],
'prorates' => false,
'features' => [
Features::paymentNotificationEmails(),
],
'billables' => [
'user' => [
'model' => User::class,
'default_interval' => 'monthly',
'plans' => [
[
'name' => 'Subscription',
'short_description' => 'Test Description',
'monthly_id' => env('STRIPE_MONTHLY_PRICE'),
'yearly_id' => env('STRIPE_YEARLY_PRICE'),
'features' => [
'Full access to our discounts',
],
],
],
],
],
class User extends Authenticatable implements MustVerifyEmail
{
use HasApiTokens;
use HasFactory;
use HasProfilePhoto;
use Notifiable;
use TwoFactorAuthenticatable;
use Billable;
use SoftDeletes;
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $guarded = [];
protected $casts = [
'email_verified_at' => 'datetime',
'trial_ends_at' => 'datetime',
'dob' => 'date',
];
}
Any help would be appreciated! Thanks
Please or to participate in this conversation.