Currently, we're unable to recover a cancelled transaction in QuickBooks Online. I know how beneficial it is for you to retrieve unintentionally revoked transactions.
However, if you have recorded this entry previously and deleted it accidentally, you can retrieve the info by viewing the Audit log. From there, take note of the details and then recreate the entry.
Here's how:
Click the Gear icon and then select Audit log.
Narrow your search by picking a detail on the User, Date Changed, and Events dropdown.