---
title: "Discussion on \"How a Timeout Can Charge Your Customer Twice (And How to Stop It in Laravel)\" | Hashnode"
description: "Discussion on \"How a Timeout Can Charge Your Customer Twice (And How to Stop It in Laravel)\". Why payment retries can double-charge customers, and how to prevent it in Laravel using idempotency keys and atomic locking with Cache::lock()."
url: "https://hashnode.com/posts/how-a-timeout-can-charge-your-customer-twice-and-how-to-stop-it-in-laravel/6a92637b36e7459bf8867677"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How a Timeout Can Charge Your Customer Twice (And How to Stop It in Laravel)](https://eliasalrgeaidev.hashnode.dev/how-a-timeout-can-charge-your-customer-twice-and-how-to-stop-it-in-laravel?utm_source=hashnode&utm_medium=feed)

Why payment retries can double-charge customers, and how to prevent it in Laravel using idempotency keys and atomic locking with Cache::lock().

Aug 29 · 4 min read · eliasalrgeaidev.hashnode.dev  
Read the article

-   [#laravel](https://hashnode.com/tag/laravel)
-   [#backend](https://hashnode.com/tag/backend)
-   [#idempotency](https://hashnode.com/tag/idempotency)
-   [#payments](https://hashnode.com/tag/payments)
-   [#php](https://hashnode.com/tag/php)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Elias Alrgeai](https://hashnode.com/@EliasAlrgeaiDev)

@EliasAlrgeaiDev

  
[View profile](https://hashnode.com/@EliasAlrgeaiDev)

Laravel & PHP Specialist

Laravel &amp; PHP Specialist. Building secure, production-grade backend systems engineered for the real world. Focused on raw performance architecture and database scaling.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
