PHPackages                             ovarun/idempotency-request-locker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ovarun/idempotency-request-locker

ActiveLibrary[API Development](/categories/api)

ovarun/idempotency-request-locker
=================================

Idempotency middleware for Laravel to prevent duplicate API actions using request signatures and distributed locks. Ensures safe retries for payments, webhooks, and critical actions.

00[2 PRs](https://github.com/ovarun/idempotency-request-locker/pulls)PHPCI passing

Since Jan 12Pushed 1mo agoCompare

[ Source](https://github.com/ovarun/idempotency-request-locker)[ Packagist](https://packagist.org/packages/ovarun/idempotency-request-locker)[ RSS](/packages/ovarun-idempotency-request-locker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Idempotency middleware for Laravel to prevent duplicate API actions using request signatures and distributed locks. Ensures safe retries for payments, webhooks, and critical actions.
======================================================================================================================================================================================

[](#idempotency-middleware-for-laravel-to-prevent-duplicate-api-actions-using-request-signatures-and-distributed-locks-ensures-safe-retries-for-payments-webhooks-and-critical-actions)

[![Latest Version on Packagist](https://camo.githubusercontent.com/45ce3acd024893da02147d3d57960548e0121f04e881b55213244a4369909fc0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f766172756e2f6964656d706f74656e63792d726571756573742d6c6f636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ovarun/idempotency-request-locker)[![GitHub Tests Action Status](https://camo.githubusercontent.com/a607c8cdf41bdb9f5878e3841897b4d28ffadb0d4eb958c72b6a4cdb796a74e3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f766172756e2f6964656d706f74656e63792d726571756573742d6c6f636b65722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/ovarun/idempotency-request-locker/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/96ae3a1bc20e50e0747b2e410e2234c55c5357ae3ca8b3580b934ea394150b8b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f766172756e2f6964656d706f74656e63792d726571756573742d6c6f636b65722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/ovarun/idempotency-request-locker/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/89943dd661f647fa8dff7327a2f4ab3f1c6203c221383499e9449f941a132b66/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f766172756e2f6964656d706f74656e63792d726571756573742d6c6f636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ovarun/idempotency-request-locker)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/37855b8bcf962a49dd8c9ee2cb763a6cfe2f5450b7bd6fd402ff09add1a0e738/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6964656d706f74656e63792d726571756573742d6c6f636b65722e6a70673f743d31)](https://spatie.be/github-ad-click/idempotency-request-locker)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require ovarun/idempotency-request-locker
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="idempotency-request-locker-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="idempotency-request-locker-config"
```

This is the contents of the published config file:

```
return [
];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="idempotency-request-locker-views"
```

Usage
-----

[](#usage)

```
$idempotencyRequestLocker = new Ovarun\IdempotencyRequestLocker();
echo $idempotencyRequestLocker->echoPhrase('Hello, Ovarun!');
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Arun o v](https://github.com/ovarun)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance61

Regular maintenance activity

Popularity0

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ef3a9cc96359e5685c93684e67d1eaecf8059b15491da6813606528ebea28e7?d=identicon)[ovarun](/maintainers/ovarun)

---

Top Contributors

[![ovarun](https://avatars.githubusercontent.com/u/26575962?v=4)](https://github.com/ovarun "ovarun (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/ovarun-idempotency-request-locker/health.svg)

```
[![Health](https://phpackages.com/badges/ovarun-idempotency-request-locker/health.svg)](https://phpackages.com/packages/ovarun-idempotency-request-locker)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M453](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
