# Fix orphaned orders and duplicate transaction reference errors

:bug: We had a bug where if a merchant submitted a duplicate transaction reference, they were presented with a 500 error and an orphaned order row was created in the DB. This has now been resolved and the merchant received a validation error on the merchant\_transaction\_reference field instead. No orphaned order row is created. This also resolved a problem where a lot of accounts couldn't run data exports.&#x20;

🧑‍💻 Jules


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://changelog.usetoggle.com/november-2025/fix-orphaned-orders-and-duplicate-transaction-reference-errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
