Search code examples
iossubscriptionauto-renewable

ios auto-renewable-subscriptions - identifying who purchased


I'm working with iOS auto-renewable subscriptions.

I'm implementing the callback on my server called by iTunes server notifying of subscription status changes. ios subscriptions

I receive the callback - but there's no identifying information in the posted data.

How do you know who purchased it?

Is the purchase linked to a device, apple-id - no info.

Also, there's no way to link this information to what's on a customers iTunes receipt - specifically order#.

Any help appreciated.

My main question is - I receive the callback and now how do I know who purchased it?


Solution

  • When the user initially subscribes in the app, an in app purchase receipt is added to the app receipt.

    One of the fields in the in_app receipt is the original_transaction_id. When you send this receipt to your server for it to validate the receipt, you can store this transaction id against your user's account.

    The status update notification includes this same original_transaction_id value, which you can use to identify the user in your database.