From what I understand getTransactionDetails will not provide the same information as the Notice Of Change report that is accessed via the website, i.e. corrected account and/or routing number.
The result of getTransactionDetails for a transaction in the NOC report is a “returned item” after the original transaction is settled successfully. It is not until several days later that the returned item is generated.
If the information provided by the NOC report could be accessed programmatically, one could correct the transaction and resubmit.