Error 6140: Duplicate Document Number Error, Duplicate Document Number Error

How to resolve the 6140 error caused by duplicate order numbers in QuickBooks

Written by the MyWorks Team

Updated at March 31st, 2025

Table of Contents

Keep getting this error when pushing orders to QuickBooks Online using MyWorks Sync?

Error

Error:6140: [Duplicate Document Number Error, Duplicate Document Number Error : You must specify a different number. This number has already been used.]

Cause

A sales transaction (normally a credit memo or refund receipt) already exists in QuickBooks with the same number as the order you're attempting to push over. Generally, QuickBooks doesn't allow multiple sales transactions to have the same number.  

Resolution

If this is happening for only a single/few transactions:

  • Search QuickBooks for the order number that is having this error. Most likely, you'll find a record already in QuickBooks with this number - possibly manually entered by someone directly in QuickBooks.
  • Edit this transaction in QuickBooks to simply give it a different number so it remains unique. 
  • The order should then be able to sync successfully to QuickBooks.

If this is happening for many/all transactions:

  • It's likely that your store's order numbers are already being used in QuickBooks by other sales transactions, and for efficiency, you may not be able to edit each existing sales transaction in QuickBooks. 
  • This error ONLY will occur from QuickBooks if you have the Custom Transaction Numbers setting turned on in QuickBooks, which allows you to edit transaction numbers manually. If you turn this setting off in your QuickBooks preferences, this will resolve this issue.