---
title: "Comment by Paul Hartness on \"How to Build a Refund Status API That Prevents Double Refunds\" | Hashnode"
description: "The timeout case is the one that bites. I'd store the refund record with its idempotency key before calling the provider, so a retried request finds the pending"
url: "https://hashnode.com/posts/how-to-build-a-refund-status-api-that-prevents-double-refunds/6b112012137f8411d4d9b199/comment/6b126f0e59304c9f541b44c0"
---

[Discussion](https://hashnode.com/posts/how-to-build-a-refund-status-api-that-prevents-double-refunds/6b112012137f8411d4d9b199)

Comment [How to Build a Refund Status API That Prevents Double Refunds](https://hashnode.com/posts/how-to-build-a-refund-status-api-that-prevents-double-refunds/6b112012137f8411d4d9b199)

[Paul Hartness](https://hashnode.com/@retryfix)

[2d ago](https://hashnode.com/posts/how-to-build-a-refund-status-api-that-prevents-double-refunds/6b112012137f8411d4d9b199/comment/6b126f0e59304c9f541b44c0)

The timeout case is the one that bites. I'd store the refund record with its idempotency key before calling the provider, so a retried request finds the pending row and waits for the webhook instead of sending a second refund.
