Mapping receipt to server-to-server notification

Say, if we store receipt in the database, as advised in the session, and then at some point we get server-to-server notification from Apple server, what do we need to search by to find the corresponding receipt in the database?
Mapping receipt to server-to-server notification
 
 
Q