I guess I've got a feeling of what it means, but I'd like to learn its exact meaning and when it can be used:
I went to the website and paid my share, only to see the error message again (implying that the transaction didn't get through and he wasn't able to pay).
Also, in the example above, isn't it better to use "tried to pay my share" instead of "paid my share"?
Best Answer
The longer idiom is more of the form "only to [verb] again." The idea of the phrase is that the preceding action occurred with no real effect on the situation, so that the events it described simply repeated instead of a more sensible consequence resulting.
It's used when an event recurs in an unintended, if predictable way. There is often, but not always, an air of frustration or negativity about the sentence. "Again" can be replaced by a number of words describing repeated action.