Webhook Requests
When a webhook event occurs in Lemon Squeezy, a POST
request with event-specific JSON data is sent to the configured URL, requiring a 200
response for successful capture, with up to three retries using exponential backoff if the initial attempt fails.
When a webhook event occurs in Lemon Squeezy, a POST
request will be sent to the configured webhook URL.
Return a 200
response to show that the webhook was successfully captured. If the response status is anything else, the webhook will be retried up to three more times using an exponential backoff strategy (e.g. 5 secs, 25 secs, 125 secs) at which point the request will be considered failed and will no longer be retried.
The webhook body will be a JSON:API resource object that relates to the event (e.g. “order” events will be sent an order object, “subscription” events will be sent a subscription object, etc).
The request headers will include:
- A
Content-Type
header set toapplication/json
. - An
X-Event-Name
header with the name of the event that triggered the webhook. - An
X-Signature
header containing the request signature. Read on for information about verifying signatures.
If a webhook is configured to send a request to an HTTPS URL, the SSL certificate of the URL will be verified before sending the request.
If you have added custom data to your checkout, you will find a custom_data
object inside the meta
field for all Order, Subscription and License key related events.