In addition to the sibling comment: as already mentioned, the machinery to handle ACH (or any bank transactions, really) is very complex:
- the formats (there are more than one for interbank communications) are never properly followed by any bank, and many add their own undocumented proprietary extensions to them
- they are usually processed in batches, and the entirety of bank systems are built assuming that everything is processed in batches at specific times of day
- entries in batches may and will arrive out-of-order. For example, a request to cancel a transaction may and at one point will arrive before the request to authorize a transaction.
- a lot of other systems are built into the entire transaction process and assuming everything is processed in batches: fraud detection, dunning chains [1], account cancellations, reminders, fees etc. etc.
- There are systems where bank holidays are built into the system. If bank holiday is on a Friday, and you request/send payment, it will not be processed by the bank on the other side until Monday evening and the transaction will not be completed until Tuesday morning.
And that's just scraping the top of the iceberg. You can't just magically replace this. But you can try to build on top/work around that.
Source: worked at Klarna [2]
[1] https://en.wikipedia.org/wiki/Dunning_(process)
[2] https://www.klarna.com/