Event Types
Setup
1
Create a webhook endpoint
In your dashboard, navigate to Apps → your app → Webhooks → Add Endpoint.Enter the URL where you want to receive events (e.g.
https://yourapp.com/api/webhooks/mdk), then select the event types you want to subscribe to.2
Store the signing secret
After creating the endpoint, copy the signing secret (starts with
whsec_). Store it in your environment variables and install the standardwebhooks package for signature verification:3
Create a webhook handler
Add an endpoint in your app to receive and verify webhook events. Here’s an example using Next.js App Router:
Event Payloads
Every webhook payload is wrapped in a standard envelope withtype, timestamp, id, and a data object containing the event-specific fields.
checkout.completed
Sent when a checkout session is paid successfully.subscription.created
Sent when a customer’s first subscription payment is confirmed.subscription.renewed
Sent when a subscription is successfully renewed. Same shape assubscription.created.
subscription.canceled
Sent when a subscription is canceled.Signature Verification
moneydevkit signs every webhook using the Standard Webhooks specification. Each request includes three headers:
The
standardwebhooks library (used in the handler above) validates the signature, checks that the timestamp is recent (rejecting replay attacks), and returns the parsed payload.
Retry Behavior
If your endpoint returns a non-2xx status code or the request times out, moneydevkit retries with increasing delays:
After 5 consecutive failures across any events, the endpoint is automatically disabled. You can re-enable it from the dashboard after fixing the issue.
Managing Endpoints
From the dashboard (Apps → your app → Webhooks) you can:- Toggle endpoints on/off without deleting them
- Rotate the signing secret if it’s been compromised
- Delete endpoints you no longer need

