Orders to the ERP, with write-back
A paid order goes to your ERP as a sales order, over REST or through a ready connector. The ERP's document number comes back onto the Magento order, with a comment in its history. Later changes and cancellations follow.
Source a Magento order, once it is paid
000012345 processing paid 2 lines 189.80 EUR
Result your ERP, and back on the order
ERP sales order SO-20871 acknowledged Magento external ID + comment written