Redirect page without exit
During checkout, you'll need to create a transaction because the order needs to be paid before it is actually completed. If you're needing to do other processing, you might consider looking at the architecture of Commerce License, where a license can have a post-checkout set of processes.

The short version of it looks like this:


You create the license or the "queue item" that needs to process.
Redirect to the completion page.
Have an AJAX watcher that looks for the completion of whatever needs to be done (could be handled by queues or some external system that updates state on the site).
Use JavaScript to take action.