WhatsMine Documentation
Home
  • What is WhatsMine?
  • Feature Tour
  • Requirements
  • Installation
  • Configuration (.env reference)
  • Going Live Checklist
Admin Guide
User Guide
Integrations
  • Architecture
  • REST API v1
  • Production Deployment
  • Frequently Asked Questions
  • Troubleshooting
  • Changelog
Home
  • What is WhatsMine?
  • Feature Tour
  • Requirements
  • Installation
  • Configuration (.env reference)
  • Going Live Checklist
Admin Guide
User Guide
Integrations
  • Architecture
  • REST API v1
  • Production Deployment
  • Frequently Asked Questions
  • Troubleshooting
  • Changelog
  • Developer Reference

    • Architecture
    • Module System
    • REST API v1
    • Outbound Webhooks
    • Theming
    • Internationalisation (i18n)
    • Artisan Commands

Outbound Webhooks

Customers can register their own webhook endpoints to receive signed, retried event notifications when things happen in WhatsMine — so external systems stay in sync.

This is distinct from inbound webhooks from Meta/Stripe to WhatsMine (covered in the Integrations section).

How it works

Event fires → WebhookDispatchService → DispatchWebhookJob (queued)
                                          ├── HTTP POST to the endpoint
                                          └── logs a WebhookDelivery
  1. A business event occurs (e.g. a subscription is created).
  2. The dispatcher finds matching endpoints for the user.
  3. A queued job signs the payload, POSTs it, and records the result.

Managing endpoints (customer UI)

In the app at Webhooks (/webhooks), customers can:

  • Create / edit / delete endpoints.
  • Choose which events to subscribe to.
  • Rotate the signing secret.
  • Send a test delivery.
  • View the delivery log (status + response body).

Payload signature

Each delivery includes an X-Signature-256 header so receivers can verify authenticity:

X-Signature-256: sha256=<hmac-sha256(secret, raw-body)>

Verify it on your end:

$expected = 'sha256=' . hash_hmac('sha256', $rawBody, $secret);
hash_equals($expected, $request->header('X-Signature-256')); // must be true

Retry policy

Failed deliveries (non-2xx or connection error) retry with exponential backoff:

AttemptDelay
11 minute
25 minutes
330 minutes
42 hours
5final failure

Available events

EventFires when
subscription.createdA subscription is activated.
subscription.cancelledA subscription is cancelled.
subscription.plan_changedA plan is changed.
invoice.paidA payment is recorded.
invoice.refundedA refund is issued.

Developers extending the app can dispatch new events from their own code:

app(WebhookDispatchService::class)->dispatch(
    event: 'subscription.created',
    payload: ['subscription_id' => $subscription->id],
    user: $user,
);

➡️ Next: Theming.

Last Updated: 6/19/26, 4:34 PM
Prev
REST API v1
Next
Theming