In the article linked Tim mentioned an event, which is exactly what you want. It's not a hook per-se, but it will be called whenever a pull request is merged. In addition if you write a normal Repository hook that will be called for both pushes and merge events.
As you eluded to - Stash only has bare repositories. To get the contents of a repository at a given commit you would need to either clone the bare repository, or use Git commands to list all the files and copy them one by one. We have a Git API that you can use to clone. You might find some of our example plugins useful to get an idea of what is required. You will need the Atlassian SDK to compile/build/run any of the example plugins, and your own.
Finally, I would generally recommend asking questions at Answers; people at Atlassian and plugin developers will pay more attention than to SO.
Good luck, Charles