Skip to main content
Webhooks let your application receive real-time HTTP notifications when events happen in your moneydevkit account — like a checkout completing or a subscription renewing. Instead of polling the API, you register an endpoint URL and moneydevkit pushes events to you as they occur.

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:
Keep your signing secret private. Never commit it to source control or expose it in client-side code.
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 with type, 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 as subscription.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
Respond to webhooks with a 2xx status code as quickly as possible. Do any heavy processing asynchronously after acknowledging receipt. moneydevkit times out after 30 seconds — if your handler takes longer, the delivery will be retried.