Knowing the status of in-app purchase accounts

I am very new to the in-app purchase feature. Our app has an associated desktop platform. When a user signs up through the app store...an associated desktop platform is created. If the user cancels or payment fails how do I know which account is terminated so I can delete their desktop platform?