The error "Payment providers with ids pp_stripe not found or not enabled" occurs because:
medusa execruns scripts WITHOUT fully initializing payment modules- The Stripe provider (pp_stripe) only gets registered when the Medusa server actually runs
- The production-setup script tried to assign Stripe to the region before the server started
I've updated production-setup.ts to:
- ✅ Skip payment provider assignment during script execution
- ✅ Create the UAE region without payment providers
- ✅ Instruct you to add Stripe via Admin UI after server starts
# In your Coolify terminal:
cd /app
npm run production-setupThis will now succeed and create:
- ✅ Store configuration
- ✅ UAE Region (without payment provider initially)
- ✅ Stock location
- ✅ Sales channel
- ✅ Shipping options with prices
- ✅ Tax regions
In Coolify dashboard, click "Restart" on your Medusa service.
This ensures the Stripe module is fully loaded.
- Go to:
https://adminvigo.app/app - Navigate to: Settings → Regions
- Click on "United Arab Emirates"
- Scroll to "Payment Providers" section
- Click "Add payment provider" or "Edit"
- Select "Stripe" from the dropdown
- Click "Save"
- Navigate to: Settings → Locations & Shipping
- You should see:
- ✅ UAE Warehouse - Sharjah
- ✅ Three shipping options with prices:
- Standard Shipping (UAE) - AED 15.00
- Express Shipping (UAE) - AED 25.00
- International Shipping (GCC) - AED 50.00
- Go to your storefront
- Add product to cart
- Checkout with Stripe test card:
4242 4242 4242 4242 - Complete payment
- ✅ Order should show proper number (e.g.,
#45) - ✅ Order should appear in admin panel
Before (Failed):
medusa exec script.ts → Tries to use pp_stripe → Not loaded yet → ERROR
After (Success):
medusa exec script.ts → Creates region WITHOUT payment provider → SUCCESS
↓
Server starts → Stripe module loads → pp_stripe available
↓
Admin adds Stripe to region via UI → SUCCESS
After running the script and restarting:
-
Navigate to Regions
Admin Panel → Settings → Regions → United Arab Emirates -
Find Payment Providers Section
- Look for a section labeled "Payment Providers"
- Should currently be empty or show "No payment providers"
-
Add Stripe
- Click "Add payment provider" button
- Select "Stripe" from dropdown
- Click "Save"
-
Verify
- Stripe should now appear in the UAE region's payment providers list
- You should see "pp_stripe" or "Stripe" enabled
If you prefer SQL, you can add the payment provider directly:
-- Get the UAE region ID
SELECT id, name FROM region WHERE currency_code = 'aed';
-- Add Stripe to the region (replace <region_id> with actual ID)
INSERT INTO region_payment_provider (region_id, payment_provider_id)
VALUES ('<region_id>', 'pp_stripe');But using Admin UI is safer and recommended.
After completing all steps:
-
npm run production-setupcompleted successfully - Medusa service restarted in Coolify
- Admin panel shows UAE region
- Stripe added to UAE region via Admin UI
- Locations & Shipping shows 3 options with prices
- Test order completes successfully
- Order shows proper number (not Stripe ID)
- Order appears in admin panel
- Email confirmation sent (if configured)
Solution: The script probably failed. Check the output. If you see:
✓ Created UAE region (AED)
Then it worked. If not, share the error.
Possible causes:
- Server not restarted after script ran
- Environment variables missing (STRIPE_API_KEY, STRIPE_WEBHOOK_SECRET)
- Stripe module didn't load
Check:
# SSH into Coolify terminal
echo "Stripe API Key: $STRIPE_API_KEY"
echo "Stripe Webhook: $STRIPE_WEBHOOK_SECRET"
# Both should output the keys, not emptyFix:
- Add missing env vars in Coolify
- Restart service
- Try again in Admin UI
Verify webhook configuration:
- Go to: https://dashboard.stripe.com/test/webhooks
- Ensure endpoint exists:
https://adminvigo.app/hooks/payment/stripe - Check "Recent deliveries" - should show successful deliveries (green ✅)
- If red ❌, click to see error details
Common webhook errors:
- 404: Wrong URL (check your backend URL)
- 401: Wrong webhook secret
- 500: Server error (check backend logs)
What Changed:
- ✅ Modified
production-setup.tsto skip payment provider assignment - ✅ Stripe must now be added via Admin UI after server starts
- ✅ This avoids the "pp_stripe not found" error
Why This is Better:
- More reliable (payment modules are fully loaded)
- Matches Medusa best practices
- Easier to troubleshoot (UI shows what's available)
Run the script now and let me know the output! 🎉