Webhook Setup
Learn how to set up a payment provider to receive payment informations for your products.
Development Mode
Create a webhook endpoint in your application to receive events from Stripe. This is necessary to handle events like payment success, failure, and refunds.
Activate Test Mode
Go to the Stripe dashboard and activate the test mode in the navbar. This will allow you to test the payment flow without charging real money.

Create an Ngrok Tunnel
To receive webhooks from Stripe locally, you need to create an Ngrok tunnel. This will expose your local server to the internet and allow Stripe to send events to your application.
Install Ngrok by following the instructions on the Ngrok website
Run the following command in your terminal to create a tunnel:
Replace 3000
with the port your application is running on.
Create Webhook
Go to the Stripe dashboard and create a webhook endpoint. It`s located in the Developers section

Events
For one-time payments, you need to activate the checkout.session.completed
event. This event is triggered when a payment is successful.
For one-time payments, you need to activate the checkout.session.completed
event. This event is triggered when a payment is successful.
Otherwise, for subscriptions, you need to activate the customer.subscription.created
, customer.subscription.updated
and customer.subscription.deleted
events. These events are triggered when a subscription is created, updated, or deleted.
Ready to test your application
Your application is now ready to receive payment events from Stripe in the development mode.
Stripe CLI
Additionally to ngrok you could even install the Stripe CLI to listen to specific events in your terminal.
Just install the Stripe CLI and login to your account. After that you can run the following command to start listening to events:
Now you can see the events in your terminal when you trigger them in your application. For example, to trigger a payment success event, run the following command:

Create a webhook endpoint in your application to receive events from Stripe. This is necessary to handle events like payment success, failure, and refunds.
Activate Test Mode
Go to the Stripe dashboard and activate the test mode in the navbar. This will allow you to test the payment flow without charging real money.

Create an Ngrok Tunnel
To receive webhooks from Stripe locally, you need to create an Ngrok tunnel. This will expose your local server to the internet and allow Stripe to send events to your application.
Install Ngrok by following the instructions on the Ngrok website
Run the following command in your terminal to create a tunnel:
Replace 3000
with the port your application is running on.
Create Webhook
Go to the Stripe dashboard and create a webhook endpoint. It`s located in the Developers section

Events
For one-time payments, you need to activate the checkout.session.completed
event. This event is triggered when a payment is successful.
For one-time payments, you need to activate the checkout.session.completed
event. This event is triggered when a payment is successful.
Otherwise, for subscriptions, you need to activate the customer.subscription.created
, customer.subscription.updated
and customer.subscription.deleted
events. These events are triggered when a subscription is created, updated, or deleted.
Ready to test your application
Your application is now ready to receive payment events from Stripe in the development mode.
Stripe CLI
Additionally to ngrok you could even install the Stripe CLI to listen to specific events in your terminal.
Just install the Stripe CLI and login to your account. After that you can run the following command to start listening to events:
Now you can see the events in your terminal when you trigger them in your application. For example, to trigger a payment success event, run the following command:

Create a webhook endpoint in your application to receive events from Lemonsqueezy. This is necessary to handle events like payment success, failure, and refunds.
Activate Test Mode
Go to the Lemonsqueezy dashboard and activate the test mode in the sidebar. This will allow you to test the payment flow without charging real money.

Create an Ngrok Tunnel
To receive webhooks from Lemonsqueezy locally, you need to create an Ngrok tunnel. This will expose your local server to the internet and allow Lemonsqueezy to send events to your application.
Install Ngrok by following the instructions on the Ngrok website
Run the following command in your terminal to create a tunnel:
Replace 3000
with the port your application is running on.
Create Webhook
Go to Lemonsqueezy and create a webhook endpoint. It`s located under the Settings section
Click the ”+” icon and fill in the form with the Ngrok URL you received after run the command in the terminal for your webhook endpoint and a signing secret key.
For the signing secret you can use the same secret key as the webhook secret.

Events
For one-time payments, you need to activate the order_created
and optional the order_refunded
event. This event is triggered when a payment is successful.
For one-time payments, you need to activate the order_created
and optional the order_refunded
event. This event is triggered when a payment is successful.
Otherwise, for subscriptions, you need to activate the subscription_created
, subscription_updated
, subscription_cancelled
, subscription_expired
events. These events are triggered when a subscription is created, updated, or deleted.
Ready to test your application
Your application is now ready to receive payment events from Lemonsqueezy in the development mode.
Production Mode
Create a webhook endpoint in your application to receive events from Stripe. This is necessary to handle events like payment success, failure, and refunds.
Create Webhook
Go to the Stripe dashboard and create a webhook endpoint. It`s located in the Developers section

Events
For one-time payments, you need to activate the checkout.session.completed
event. This event is triggered when a payment is successful.
For one-time payments, you need to activate the checkout.session.completed
event. This event is triggered when a payment is successful.
Otherwise, for subscriptions, you need to activate the customer.subscription.created
, customer.subscription.updated
and customer.subscription.deleted
events. These events are triggered when a subscription is created, updated, or deleted.
Endpoint
Choose the “Webhook endpoint” in the “choose destination type” and fill in the the URL of your webhook endpoint.
Ready for Deployment
Your application is now ready to receive payment events from Stripe in the production mode.
Check out the Deployment section to learn how to deploy your application to production.
Create a webhook endpoint in your application to receive events from Stripe. This is necessary to handle events like payment success, failure, and refunds.
Create Webhook
Go to the Stripe dashboard and create a webhook endpoint. It`s located in the Developers section

Events
For one-time payments, you need to activate the checkout.session.completed
event. This event is triggered when a payment is successful.
For one-time payments, you need to activate the checkout.session.completed
event. This event is triggered when a payment is successful.
Otherwise, for subscriptions, you need to activate the customer.subscription.created
, customer.subscription.updated
and customer.subscription.deleted
events. These events are triggered when a subscription is created, updated, or deleted.
Endpoint
Choose the “Webhook endpoint” in the “choose destination type” and fill in the the URL of your webhook endpoint.
Ready for Deployment
Your application is now ready to receive payment events from Stripe in the production mode.
Check out the Deployment section to learn how to deploy your application to production.
Create a webhook endpoint in your application to receive events from Lemonsqueezy. This is necessary to handle events like payment success, failure, and refunds.
Create Webhook
Go to Lemonsqueezy and create a webhook endpoint. It`s located under the Settings section
Click the ”+” icon and fill in the form with the URL of your webhook endpoint and a signing secret key.
For the signing secret you can use the same secret key as the webhook secret.

Events
For one-time payments, you need to activate the order_created
and optional the order_refunded
event. This event is triggered when a payment is successful.
For one-time payments, you need to activate the order_created
and optional the order_refunded
event. This event is triggered when a payment is successful.
Otherwise, for subscriptions, you need to activate the subscription_created
, subscription_updated
, subscription_cancelled
, subscription_expired
events. These events are triggered when a subscription is created, updated, or deleted.
Ready for Deployment
Your application is now ready to receive payment events from Lemonsqueezy in the production mode.
Check out the Deployment section to learn how to deploy your application to production.