App store server API request to get a user's Auto-renewel-sub and non-consumable purchases in one request.

I have an app in which there are two different subscription groups and One non-consumable product. User can have two(2) subscriptions and one non-consumable purchase [total three purchases] at a time. All three have different "originalTransactionIdentifier".

How can i get user's purchase History in ONE App store server API request?

Replies

We recommend the Get Transaction History endpoint. https://developer.apple.com/documentation/appstoreserverapi/get_transaction_history Note that all of the filters are optional, so by default this will return the user’s entire history, and you can then store the revision to look for any updates in the future.

  • Get Transaction History endpoint : https://api.storekit.itunes.apple.com/inApps/v1/history/{transactionId} , has a required must field "{originalTransactionIdentifier}'. But if One user can have three(3) different purchases two(2) subscriptions and one non-consumable purchase [total three purchases] at a time. All three have different "originalTransactionIdentifier".

    Then Get Transaction History endpoint will have to call for THREE(3) times with each originalTransactionIdentifier separately?

  • My question is how can i get Purchase History of ONE user having different types of purchases[subscriptions, non-consumable] and have different 'originalTransactionIdentifier' for each purchase type.

  • It does not matter which original transaction id you use, it will always return the user’s entire history as defined in the API spec. The transaction id is simply used as a way to identify which user you want to get the history for, therefore different transaction ids for the same user will return the same result.

Add a Comment

Get Transaction History endpoint : https://api.storekit.itunes.apple.com/inApps/v1/history/{transactionId} , has a required must parameter "{transactionId/originalTransactionIdentifier}'. But if One user have three(3) different purchases two(2) subscriptions and one non-consumable purchase [total three purchases] at a time. All three will have different "originalTransactionIdentifier".

Then Get Transaction History endpoint will have to call for THREE(3) times with each originalTransactionIdentifier separately? To get purchase history of one user.