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.

Replies

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

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