Disabling the button only stops the common case; retries, two tabs or a flaky network can still send the request twice. Make the write idempotent: the client generates an idempotency key (a GUID) when the form is opened or first submitted and reuses the same key on every retry of that submission, sending it in an Idempotency-Key header. The API inserts the key and the result in the same database transaction as the create, protected by a unique constraint, and returns the stored response for repeats (a concurrent duplicate that loses the race gets 409 or waits and replays). A natural unique key such as the SKU adds a second guard. Keys carry a TTL (for example 24 hours) and a scheduled job deletes expired rows. For UX, the client treats a replayed response as success and shows the saved record, so the user never sees 'already exists'.
Checks whether they know client-side guards are not enough and understand idempotency keys.
Last updated 23 Nov 2026.