1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Stripe wehook testing locally

Posted at

To test if your Stripe webhook integration is working fine on your local.

Expose your local server

For example of docker-compose.yml

  my-project:
    build: my-project
    volumes:
      - ./my-project:/var/www/html
      - ./my-project/000-default.conf:/etc/apache2/sites-available/000-default.conf
    # Expose 8080 for debugging of Stripe webhook with ngrok.
    ports:
      - '8080:80'

Sign up for ngrok

https://dashboard.ngrok.com/signup
After you sign up, it will explain how to install/use the ngrok command in the dashboard.

Run ngrok command

$ ./ngrok http 8080
Session Status                online
Account                       taroshin (Plan: Free)
Version                       2.3.35
Region                        United States (us)
Web Interface                 http://127.0.0.1:4040
Forwarding                    http://3fc5e4f7****.ngrok.io -> http://localhost:8080
Forwarding                    https://3fc5e4f****.ngrok.io -> http://localhost:8080

Connections                   ttl     opn     rt1     rt5     p50     p90
                              2       0       0.00    0.00    3.04    3.22

HTTP Requests
-------------

It will provide you a hostname which tonnes payload from Stripe to your local server.

Register your webhook URL to Stripe

Log in to your Stripe account and register your webhook URL in Developer > Webhook
And also you can test it out on the same page.

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?