You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Laravel Spark订阅名称显示异常:Stripe计划名称未同步

Fixing "default" Subscription Name in Laravel Spark

I’ve run into this exact issue before when setting up Spark with Stripe subscriptions, so let me walk you through the most common fixes:

  • Double-check your Spark plan configuration
    First, head to config/spark.php and verify the plans array. Each plan must have a name set to your desired display text (like "Enterprise - Monthly") and a provider_plan that exactly matches the plan ID in your Stripe dashboard. Even a tiny typo here will cause Spark to fall back to "default" because it can’t match the Stripe plan to your local config. Example correct config:

    'plans' => [
        [
            'name' => 'Enterprise - Monthly',
            'provider_plan' => 'my-enterprise-monthly', // Must match Stripe plan ID
            'price' => 99,
            'type' => 'monthly',
            // Other required fields...
        ],
    ],
    
  • Sync subscriptions manually
    If you created subscriptions through Stripe directly (not via your Spark app), Spark might not have pulled in the correct plan name. Run this Artisan command to force a sync between Stripe and your app’s database:

    php artisan spark:sync-subscriptions
    

    This will update all existing subscriptions with the name from your local Spark plan config if the provider_plan matches.

  • Verify Stripe Webhook setup
    Make sure you’ve configured Stripe to send customer.subscription.created and customer.subscription.updated events to your Spark app’s webhook endpoint (/spark/webhook). If these webhooks aren’t firing or are failing, Spark won’t automatically update subscription details when changes happen in Stripe. Check Stripe’s Webhook Logs to confirm events are being delivered successfully.

  • Manually update existing subscriptions (temporary fix)
    For immediate relief, you can directly update the name field in your subscriptions database table. Find the subscription record with name = 'default' and set it to your desired plan name. Note: This is a band-aid—you’ll want to fix the root cause (either config or sync) to prevent future subscriptions from having the same issue.

  • Check Spark’s subscription creation logic
    If new subscriptions are still showing "default", ensure that when users subscribe via your app, Spark is correctly mapping the selected plan to the local config. Sometimes custom subscription flows can bypass Spark’s built-in logic, so double-check any custom code you’ve added around subscription creation.

内容的提问来源于stack exchange,提问作者Joshua Foxworth

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 04:19:04