How can I add a receipt object to the dataLayer correctly?

Hi all! I am looking to push the receipt field from the Transactions object during a purchase event. However, each time I do this the event fires presumable before the receipt is created and then it returns as a null array. Does anyone have advice on how to do this?