First of all you need to integrate also the real-time App Store Notifications system in your backend
Basically you need to provide an endpoint for receiving POST messages from Apple server
Save the payload from those request and analyze it to understand what is happening.
Read more here:
Workflow:
1 - When you first receive a new purchase you have to save also the originalTransactionId that you will find in the receipt
2 - Use the originalTransactionId with this API and decode the content as usual
3 - you will find the appAccountToken in there!