When you send money through Moneygram you're given an MTCN number which is short for Money Transfer Control Number.
Western Union also uses an MTCN number for transactions and Western Union uses 10 digits while Moneygram uses 8 digits.
The receiver of the Moneygram or Western Union payment will have to provide the MTCN number and usually a test answer to a test question.