Receiving Webhooks Safely: Verification, Retries and Idempotency
Webhooks are easy to receive and easy to get wrong. Verify signatures, respond fast, process asynchronously and handle duplicate deliveries gracefully.
Webhooks are easy to receive and easy to get wrong. Verify signatures, respond fast, process asynchronously and handle duplicate deliveries gracefully.
Offset pagination is simple but slows down and skips rows on changing data. Learn when cursor pagination is the better choice and how to implement it.
How to make POST endpoints safe to retry using idempotency keys, without duplicating orders, charges or emails.
How Sanctum handles both SPA cookie authentication and mobile API tokens, and how to scope tokens with abilities instead of all-or-nothing access.
A practical approach to API versioning in Laravel using resource classes, so you can evolve a response shape without breaking existing clients.
One endpoint was firing 62 queries per request. Here is how eager loading, Redis caching, indexes and rate limiting took it from 840 ms to under 100 ms.