getTransactionHistory missing transactionId with productype Consumable

Hello everyone. I'm try to get out of verifyReceipt for my app. I'm try to following this link https://developer.apple.com/videos/play/wwdc2023/10143/ Then I'm testing by using old receipt from my app. Using receiptUtility.extractTransactionIdFromAppReceipt(appReceipt); I got this transaction Id 160000542059454. Then follow the step in the video to get all transaction history I realize that it missing transaction which have productype as consumable. If I'm using getTransactionInfo an pass that Id I can fetch the info of that transaction. So my question is how to get all transaction Id history.

Answered by App Store Commerce Engineer in 791668022

As an update to my post above - at WWDC24 we released a new version 2 of the Get Transaction History endpoint that returns all transactions for a given user of your app. This includes consumables regardless of their refund, revocation, and finished status. Just be sure to use /v2/ in the endpoint path:

https://developer.apple.com/documentation/appstoreserverapi/get_transaction_history

Get Transaction History only returns consumables if the transaction is refunded, revoked, or unfinished. See the Discussion section on this page for more information:

https://developer.apple.com/documentation/appstoreserverapi/get_transaction_history_v1

If you'd like to fetch transaction information for finished consumables, you'll need to use Get Transaction Info, which works for all transactionIds regardless of finished status:

https://developer.apple.com/documentation/appstoreserverapi/get_transaction_info

Consumable transactionIds can be obtained on-device using StoreKit and then sent to your server.

https://developer.apple.com/documentation/storekit/transaction/3749696-id

Accepted Answer

As an update to my post above - at WWDC24 we released a new version 2 of the Get Transaction History endpoint that returns all transactions for a given user of your app. This includes consumables regardless of their refund, revocation, and finished status. Just be sure to use /v2/ in the endpoint path:

https://developer.apple.com/documentation/appstoreserverapi/get_transaction_history

getTransactionHistory missing transactionId with productype Consumable
 
 
Q