使用Ninja Forms+Stripe插件报错:No Such Plan问题求助
Let’s dig into why you’re running into this error and walk through actionable fixes—this issue almost always boils down to a mismatch between the plan reference in Ninja Forms and what’s actually set up in your Stripe test environment.
Common Causes & Step-by-Step Fixes
1. Mismatched Plan ID Between Ninja Forms and Stripe Test Dashboard
Stripe requires an exact, case-sensitive match for the plan ID you’re referencing. Here’s how to align them:
- Head to your Stripe Test Dashboard → Products → Plans, and locate the test plan you intend to use.
- Copy its unique Plan ID (it’ll look something like
plan_abc123xyz). - Open your Ninja Forms payment field settings, find the "Stripe Plan" dropdown or input, and paste this exact ID.
- Critical check: Make sure you didn’t accidentally paste a live mode plan ID—live and test environments are completely separate, so test mode can’t access live plans.
2. Confusion Between Calculated Amounts and Predefined Plans
The error mentions Reference_of_my_NinjaForms_calcul, which suggests you might be trying to use a calculated amount field where Stripe expects a predefined plan. Here’s how to fix this:
- If you’re collecting one-time variable payments (not recurring subscriptions), switch the Stripe add-on’s payment type to One-Time Payment instead of "Subscription Plan".
- Map your Ninja Forms calculated amount directly to the "Amount" field in the Stripe settings—don’t try to link it to the "Plan" field, which is only for fixed recurring plans.
3. Stripe Add-On Cache or Connection Glitch
Occasionally, the Ninja Forms Stripe add-on can hold onto outdated plan data. Try these quick resets:
- Go to Ninja Forms → Settings → Stripe and click "Clear Cache" (if the option exists).
- Deactivate and reactivate the Ninja Forms Stripe add-on to refresh its connection to Stripe’s API.
- Double-check that the add-on is definitely set to Test Mode—confirm you’ve entered your test API keys, not live ones, in the Stripe settings tab.
4. Missing or Deleted Test Plan in Stripe
If the plan you’re referencing was never created or got deleted in test mode:
- Navigate to your Stripe Test Dashboard and create a new test plan with your desired amount and billing cycle.
- Update the plan reference in Ninja Forms to match this new test plan’s ID.
Quick Verification Test
After making your fixes, submit a test payment using Stripe’s universal test card: 4242 4242 4242 4242 (use any future expiration date and 3-digit CVC). If the error clears up, you’ve resolved the root issue.
内容的提问来源于stack exchange,提问作者Dayniight

