We have released a new extension for Commerce. It's called Snippet Status Action, and allows you to execute a snippet as part of a status change.
Typically, you'd need to build your own module or extension if you want to run some code when an order is paid or completed, but not everyone is equally comfortable writing PHP or working with composer and autoloaders. In those cases, you might just want to run a snippet as some sort of hook, which is a lot more accessible to less back-end oriented developers.
With this free extension, you can simply write your snippet and configure Commerce to run that instead. See the full instructions and more information about the extension here.
If you'd like to distribute or reuse the code on other projects, we'd still recommend doing it as a proper extension as that's gives you more control and possibilities. The skeleton code also includes everything you need to build it into a package. We're happy to help guide you through the process of building an extension if you get stuck, just let us know.