# Stripe checkout not working in local development installation

**URL:** <https://forum.ghost.org/t/stripe-checkout-not-working-in-local-development-installation/16142>\
**Category:** Memberships & subscriptions\
**Created:** [July 28, 2020, 6:56am UTC](https://forum.ghost.org/t/stripe-checkout-not-working-in-local-development-installation/16142 "2020-07-28T06:56:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GBJsolution](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/gbjsolution/32/4738_2.png) [@GBJsolution](https://forum.ghost.org/u/GBJsolution)\
**Post date:** [July 28, 2020, 6:56am UTC](https://forum.ghost.org/t/stripe-checkout-not-working-in-local-development-installation/16142/1 "2020-07-28T06:56:24Z")

</div>

Ghost version 3.27.0  
OS - Windows 10  
I have enabled members and connected Stripe in test mode.

 ![Annotation 2020-07-28 122100](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/5/50ca1e63528a89d90310f191d0813af7d07713e2.jpeg)

When I click on the checkout button there is two error in console.

 ![Annotation 2020-07-28 122233](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/a/a74c1821c2176240882ba34f97ea5273bfaa1e69.jpeg)

I have found this earlier topic [Could not create stripe checkout session](https://forum.ghost.org/t/could-not-create-stripe-checkout-session/14666)

Installed Ghost freshly and tried with Lyra theme But same issue. Stripe connection with API key ( in older version of ghost ) was working fine.

Any help? Thanks in advance.

**EDIT:** Complimentary Premium plan is working fine.

---

<div class="post-metadata">

**Author:** ![GBJsolution](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/gbjsolution/32/4738_2.png) [@GBJsolution](https://forum.ghost.org/u/GBJsolution)\
**Post date:** [July 28, 2020, 2:30pm UTC](https://forum.ghost.org/t/stripe-checkout-not-working-in-local-development-installation/16142/2 "2020-07-28T14:30:21Z")

</div>

anybody any suggestion? I have also tried using Stripe CLI toll, as described here [https://ghost.org/docs/members/webhooks/](https://ghost.org/docs/members/webhooks/). But no luck.

Response log in Stripe dashboard

```auto
{
  "error": {
    "message": "Invalid URL: URL must be publicly accessible. Consider using a tool like the Stripe CLI to test webhooks locally: https://github.com/stripe/stripe-cli",
    "param": "url",
    "type": "invalid_request_error"
  }
}

```

---

<div class="post-metadata">

**Author:** ![daniel1](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@daniel1](https://forum.ghost.org/u/daniel1)\
**Post date:** [July 28, 2020, 10:17pm UTC](https://forum.ghost.org/t/stripe-checkout-not-working-in-local-development-installation/16142/3 "2020-07-28T22:17:20Z")

</div>

Hi,

maybe smth went wrong or you didn’t start ghost with the webhook properly.

1. install stripe cli ([Get started with the Stripe CLI | Stripe Documentation](https://stripe.com/docs/stripe-cli#install))  
i did it via apt-get, but it’s up to you
2. pair stripe-cli with stripe account  
`$ stripe login`  
you will be prompted with a pairing code and a URL  
visit the URL and allow access
3. set your stripe-cli to listen  
`stripe listen --forward-to http://localhost:2368/members/webhooks/stripe/`  
you will be prompted with a webhook signing secret
4. finally, start your ghost enviroment with your individual webhook secret  
`WEBHOOK_SECRET=whsec_1234567890abcdefg ghost start`

important: _stripe listen_ has to run in it’s own terminal window, so don’t close it. Start ghost with the webhook in a new terminal window/tab instead.

Terminal window 1:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/4/4609195a2bc5167262ae266f4a31e9bb68605f2e.png)

Terminal window 2:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/c/ce1ef94f0e0a8231e0076a714b8b67b0728dd898.png)

For recurring sessions, you only need to start the stripe listen process in window 1 and start ghost with webhook in window 2. stripe login is only needed the first time.

---

<div class="post-metadata">

**Author:** ![GBJsolution](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/gbjsolution/32/4738_2.png) [@GBJsolution](https://forum.ghost.org/u/GBJsolution)\
**Post date:** [July 29, 2020, 7:05am UTC](https://forum.ghost.org/t/stripe-checkout-not-working-in-local-development-installation/16142/4 "2020-07-29T07:05:34Z")

</div>

Thank you very much for the reply. I was following exactly same as you described but the issue was something else.  
I am on Windows. The issue in not in the steps actually the issue is in the windows command prompt or my adaptation of the command in Windows environment.  
If anyone face this problem in future, for them the following explanation.

When I was using the following command

```auto
WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxxx ghost start

```

The Windows cmd was showing the following error

```auto
'WEBHOOK_SECRET' is not recognized as an internal or external command, operable program or batch file.

```

Then I was using the command as follows

```auto
ghost start WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxxx 

```

Probably this was the reason.

Now the solution:  
After multiple failure I have tried using git bash terminal, and the command in following structure worked.

```auto
WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxxx ghost start

```

So If you are on windows and trying to use stripe CLI with ghost, then do one of these 2

1. Use git bash terminal which understand linux like command
2. Or in windows command prompt use the command in following format

```auto
set WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxxx && ghost start

```

---

<div class="post-metadata">

**Author:** ![daniel1](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@daniel1](https://forum.ghost.org/u/daniel1)\
**Post date:** [July 29, 2020, 12:18pm UTC](https://forum.ghost.org/t/stripe-checkout-not-working-in-local-development-installation/16142/5 "2020-07-29T12:18:20Z")

</div>

Good to know.

I’m using Windows 10 aswell.  
You should definitely check out WSL2 (Windows Subsystem for Linux)

> **[Install WSL](https://learn.microsoft.com/en-us/windows/wsl/install)**
>
> Install Windows Subsystem for Linux with the command, wsl --install. Use a Bash terminal on your Windows machine run by your preferred Linux distribution - Ubuntu, Debian, SUSE, Kali, Fedora, Pengwin, Alpine, and more are available.

It’s free and can be installed on every Windows 10 Version 2004, Build 19041 or newer.  
It let’s you run Linux Distributions inside windows with a full linux kernel, which should give you greater performance compared to a standard VM.  
Useful if you want to run apps natively in linux, like ghost on an ubuntu distro.
