# Complimentary Premium Plan return an error

**URL:** <https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738>\
**Category:** Developer help\
**Created:** [April 22, 2020, 5:40am UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738 "2020-04-22T05:40:30Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![OZRay911](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@OZRay911](https://forum.ghost.org/u/OZRay911)\
**Post date:** [April 22, 2020, 5:40am UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/1 "2020-04-22T05:40:30Z")

</div>

Hi!  
I was on Ghost 3.8 before and last week I updated to 3.13.4  
Everything look fantastic until now. The only problem I have at the moment is in the complimentary Premium Plan. When I select a member, change the toggle and hit save it return this.

> Internal server error, cannot edit a member. Cannot read property ‘id’ of undefined

But I’m able to add notes change the name and save just not a complimentary option.  
Any idea what can I do? I’m open to give more information or help debug.

Thanks!

---

<div class="post-metadata">

**Author:** ![Kym](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kym/32/1136_2.png) [@Kym](https://forum.ghost.org/u/Kym)\
**Post date:** [April 22, 2020, 10:44am UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/2 "2020-04-22T10:44:34Z")

</div>

Hey! I’ve not been able to reproduce this issue on the same version of Ghost.

Complimentary plans only work when you have a Stripe account connected correctly. Have you successfully connected your publication with [Stripe](https://ghost.org/docs/members/requirements/#connect-a-stripe-account) and double checked that your API keys are correct already?

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [April 22, 2020, 1:06pm UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/3 "2020-04-22T13:06:35Z")

</div>

@OZRay911 can you check your Stripe account for the complimentary plans? If you view the product with the same name as your site, you should then see a number of plans, with a complimentary plan for each currency you’ve used on your site:

 ![Screenshot 2020-04-22 at 14.02.14](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/4/461abfa1e28e8f12fcf55c009704ee399c456e2d.png)

Do you have a plan with the exact name “Complimentary” that matches your selected currency? Have you changed currency at all recently?

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [April 22, 2020, 1:35pm UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/4 "2020-04-22T13:35:42Z")

</div>

@OZRay911 do you happen to have your monthly or yearly plan price set to 0?

---

<div class="post-metadata">

**Author:** ![OZRay911](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@OZRay911](https://forum.ghost.org/u/OZRay911)\
**Post date:** [April 22, 2020, 3:18pm UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/5 "2020-04-22T15:18:00Z")

</div>

Thanks for trying to help me, here is more information.

My currency is CAD.  
Stripe is correctly connected and working.  
In Stripe it automatically created both my paying subscription with CAD currency and both not zero.  
Something strange, in Stripe the Complimentary plan has been automatically created but USD not CAD.  
I’m currently testing all this with my Stripe test dev API key.

I didn’t know that the complimentary plan needed Stripe now I have more tests I can do.  
I will come back soon to let you know what I tried.

 ![CS-_ 2020-04-22_ 11.04.41](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/1/18b8a8e673de18472f2b782c1612705e231eadbe.png)

Regards,

---

<div class="post-metadata">

**Author:** ![OZRay911](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@OZRay911](https://forum.ghost.org/u/OZRay911)\
**Post date:** [April 22, 2020, 4:39pm UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/6 "2020-04-22T16:39:41Z")

</div>

OK here is what I tried and still not working.

My Stripe Live account didn’t contain any product I verified first.  
I connected my Ghost to Stripe on the Live API not the Test API.  
When connected Ghost created 3 products in my Stripe.  
My monthly, Yearly with both price in CAD.  
It also created the Complimentary plan at 0$ but in USD.  
I create a brand new user, validated the account.  
I tried to add the plan using the complimentary toggle, hit save and still have the error message… ☹

I also tried to copy the product ID, delete the product, created a new product named Complimentary with the same ID that the one deleted and selected CAD as the currency.

Same result.

What else I can try any idea? I can provide ssh account if needed or maybe there is a log with more details somewhere?

thanks

---

<div class="post-metadata">

**Author:** ![OZRay911](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@OZRay911](https://forum.ghost.org/u/OZRay911)\
**Post date:** [April 22, 2020, 5:01pm UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/7 "2020-04-22T17:01:31Z")

</div>

I don’t know if this can help but when the Dev panel in my browser is open and fresh if I hit Save when the error message appear for the unknow id I receive that in the log.

VM276:1 PUT https://\*\*\*\*\*\*\*\*\*\*\*\*\*.com/ghost/api/v3/admin/members/5ea07096dbf7420983d6e8f1/?include=labels 500  
(anonymes) @ VM276:1  
send @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:880  
ajax @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:857  
\_makeRequest @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:8809  
\_makeRequest @ ghost.min-7ef23448585a3e41b82d92e96136bdd0.js:1555  
n @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:2410  
request @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:8806  
ajax @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:8846  
saveRecord @ ghost.min-7ef23448585a3e41b82d92e96136bdd0.js:15  
updateRecord @ ghost.min-7ef23448585a3e41b82d92e96136bdd0.js:14  
(anonymes) @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:8474  
b @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:4121  
(anonymes) @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:4128  
invoke @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:3700  
flush @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:3692  
flush @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:3703  
\_end @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:3755  
end @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:3716  
\_run @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:3757  
\_join @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:3756  
join @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:3727  
d @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:2837  
(anonymes) @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:2557  
o @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:2762  
handleEvent @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:2557  
handleEvent @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:2483  
(anonymes) @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:2508  
dispatch @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:671  
g.handle @ vendor.min-dd367fd71acbc2c70621e55ba07b7193.js:666

---

<div class="post-metadata">

**Author:** ![OZRay911](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@OZRay911](https://forum.ghost.org/u/OZRay911)\
**Post date:** [April 22, 2020, 5:14pm UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/8 "2020-04-22T17:14:36Z")

</div>

OK last attempt I’m out of idea hehehe.

Created a brand new user with a brand new email.  
Validated the account.  
Subscribed to a plan (test mode)  
Cancelled the plan  
Also cancelled the plan in Stripe.  
Confirmed that in Ghost the plan is no more active.  
Tried to add the complimentary plan and still fail…

thanks

---

<div class="post-metadata">

**Author:** ![OZRay911](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@OZRay911](https://forum.ghost.org/u/OZRay911)\
**Post date:** [April 24, 2020, 3:01am UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/9 "2020-04-24T03:01:02Z")

</div>

Also tried all this in USD for plan and for complimentary same result… ☹  
@Kevin can it be related to the fact that my blog is in French?

---

<div class="post-metadata">

**Author:** ![mattcam](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mattcam/32/5890_2.png) [@mattcam](https://forum.ghost.org/u/mattcam)\
**Post date:** [April 26, 2020, 11:25pm UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/10 "2020-04-26T23:25:40Z")

</div>

@OZRay911 do you get same?

I am getting what I suspect might be same issue on a number on Heroku using latest release. Following is what is error in console log when is member saved with complimentary

PUT to …/ghost/api/v3/admin/members/ returns a 500

---

<div class="post-metadata">

**Author:** ![OZRay911](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@OZRay911](https://forum.ghost.org/u/OZRay911)\
**Post date:** [April 27, 2020, 1:21am UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/11 "2020-04-27T01:21:18Z")

</div>

Yes same error… don’t know what to do or test…

---

<div class="post-metadata">

**Author:** ![naz](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/naz/32/30666_2.png) [@naz](https://forum.ghost.org/u/naz)\
**Post date:** [April 27, 2020, 2:58am UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/12 "2020-04-27T02:58:58Z")

</div>

Hey @OZRay911. The best way to investigate these types of errors is looking into server error logs you can find instruction on how to do this here:  
[https://ghost.org/docs/api/v3/ghost-cli/log/](https://ghost.org/docs/api/v3/ghost-cli/log/)

Would help if we could get the value saved in the database for plan configuration. You can find it by querying your db with:

```auto
SELECT `value` FROM `settings` WHERE `key` = 'members_subscription_settings';

```

⚠ make sure to redact the `secret_token` and `public_token` information when posting here! never share this information publicly

The part we are interested in starts with something like following:

```auto
"plans":[{"name":"Monthly","currency":"cad","interval":"month","amount":500},...

```

---

<div class="post-metadata">

**Author:** ![OZRay911](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@OZRay911](https://forum.ghost.org/u/OZRay911)\
**Post date:** [April 27, 2020, 3:38am UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/13 "2020-04-27T03:38:12Z")

</div>

Thanks @naz  
Why why why… 😃  
I was looking at the procedure for the log. I said to myself that it will be a good idea to have to error at the end of the log file so I clicked on one of my test users, changed the toggle to Complimentary plan hit save. What! Saved successfully! I tried with many other users that were not working last week and they are all working now. Near 20h on that problem and it’s now fixed! OK in case it can help someone. Since I tested a lots of stuff the only thing I have done last is switching to USD my currency (it was CAD first) save, tried one user and didn’t work. Switched back to CAD and now it’s working. So it look like switching to default USD and back to my CAD currency updated something that was first not initialized properly. Because when I upgraded from 3.8 to 3.13.4 my currency was CAD. So I hope that @mattcam will be able to also fix the issue by switching to USD, save, try complimentary for one user, failed, switch to his currency and try again. It worked for me. If you want I can still give you my DB queries if needed.

Thanks for the followup.

---

<div class="post-metadata">

**Author:** ![mattcam](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mattcam/32/5890_2.png) [@mattcam](https://forum.ghost.org/u/mattcam)\
**Post date:** [April 27, 2020, 6:20am UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/14 "2020-04-27T06:20:54Z")

</div>

Thanks @OZRay911 for documenting and help, this procedure also worked for me. My default currency is AUD.

---

<div class="post-metadata">

**Author:** ![naz](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/naz/32/30666_2.png) [@naz](https://forum.ghost.org/u/naz)\
**Post date:** [April 27, 2020, 7:45am UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/15 "2020-04-27T07:45:39Z")

</div>

@mattcam could you please clarify how did you get into the broken state? Was it the same as @OZRay911 's - upgrade from earlier version of Ghost?

---

<div class="post-metadata">

**Author:** ![mattcam](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mattcam/32/5890_2.png) [@mattcam](https://forum.ghost.org/u/mattcam)\
**Post date:** [April 27, 2020, 9:46am UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/16 "2020-04-27T09:46:28Z")

</div>

Yes, upgraded from earlier version of Ghost.

---

<div class="post-metadata">

**Author:** ![naz](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/naz/32/30666_2.png) [@naz](https://forum.ghost.org/u/naz)\
**Post date:** [April 28, 2020, 3:02am UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/17 "2020-04-28T03:02:50Z")

</div>

@mattcam do you recall which version specifically?

---

<div class="post-metadata">

**Author:** ![mattcam](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mattcam/32/5890_2.png) [@mattcam](https://forum.ghost.org/u/mattcam)\
**Post date:** [April 28, 2020, 9:33pm UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/18 "2020-04-28T21:33:42Z")

</div>

Issue since 3.4.0 onwards, tested on each new release and `Internal server error, cannot edit a member. Cannot read property ‘id’ of undefined` persisted throughout. Currently on 3.13.4. Note to support AUD prior to `custom currency support for Member's plans` in 3.10.0 had made a manual edit to database currency in settings.

---

<div class="post-metadata">

**Author:** ![OZRay911](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@OZRay911](https://forum.ghost.org/u/OZRay911)\
**Post date:** [April 28, 2020, 10:05pm UTC](https://forum.ghost.org/t/complimentary-premium-plan-return-an-error/13738/19 "2020-04-28T22:05:37Z")

</div>

Maybe this is a clue for Ghost team because prior to the official version supporting currencies other than USD I also manually modified the database. Probably that this is an isolated case for the one like us that have done this.
