citricguy/postmark-webhooks-laravel
Receive Postmark webhooks in Laravel with a simple endpoint and one event to handle payloads your way. No migrations or models. Configurable route and middleware verifies requests come from Postmark. Supports Laravel 12/13 and PHP 8.3+.
config/postmark-webhooks.php, enabling quick setup with minimal code changes.Http\Middleware\HandleIncomingRequest or a custom webhook handler achieve similar goals with less risk?postmark/php-sdk (v2.x+), which must be compatible with the app’s PHP version.composer require citricguy/postmark-webhooks-laravel
php artisan vendor:publish --provider="Citricguy\PostmarkWebhooks\PostmarkWebhooksServiceProvider"
config/postmark-webhooks.php with Postmark API key and webhook endpoints (e.g., delivered, bounced).PostmarkDelivered → EmailDelivered).POST /postmark/webhook).
Route::post('/postmark/webhook', [PostmarkWebhookHandler::class, 'handle']);
EventServiceProvider:
protected $listen = [
'EmailDelivered' => [EmailDeliveryLogger::class],
];
postmark/php-sdk version aligns with Postmark’s API changes.postmark/php-sdk for breaking changes (e.g., API deprecations).dd($request->postmark())) due to lack of community support.Log::channel('webhooks')).PostmarkDelivered → queue:push).spatie/laravel-queueable-middleware).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Invalid Postmark signature | Rejected webhooks | Enable debug logging; validate config. |
| Postmark API rate limits | Dropped webhooks | Implement retry logic with delays. |
| Event listener crashes | Silent failures | Use try-catch in listeners; monitor. |
| Laravel queue failures | Delayed processing | Monitor queue backlogs; scale workers. |
| Missing event mappings | Unhandled webhooks | Validate config on startup. |
PostmarkBounced).How can I help you explore Laravel packages today?