api.storekit.itunes.apple.com/inApps/v1/history Get Empty signedTransactions

  • I try to migrate the verification process of the server .

From https://sandbox.itunes.apple.com/verifyReceipt to https://api.storekit.itunes.apple.com/inApps/v1/history/{transactionId}

  • When I execute the following API :

https://api.storekit-sandbox.itunes.apple.com/inApps/v1/history/2000000376851165

  • Get the following result :
{
     "revision": "0",
     "bundleId": "com.jfigames.GameModelSlot",
     "environment": "Sandbox",
     "hasMore": false,
     "signedTransactions": []
}

What confuses me is that signedTransactions is empty.

{
   "receipt": {
     "receipt_type": "ProductionSandbox",
     "adam_id": 0,
     "app_item_id": 0,
     "bundle_id": "com.jfigames.GameModelSlot",
     "application_version": "2000001",
     "download_id": 0,
     "version_external_identifier": 0,
     "receipt_creation_date": "2023-07-27 02:41:06 Etc/GMT",
     "receipt_creation_date_ms": "1690425666000",
     "receipt_creation_date_pst": "2023-07-26 19:41:06 America/Los_Angeles",
     "request_date": "2023-07-27 06:10:04 Etc/GMT",
     "request_date_ms": "1690438204330",
     "request_date_pst": "2023-07-26 23:10:04 America/Los_Angeles",
     "original_purchase_date": "2013-08-01 07:00:00 Etc/GMT",
     "original_purchase_date_ms": "1375340400000",
     "original_purchase_date_pst": "2013-08-01 00:00:00 America/Los_Angeles",
     "original_application_version": "1.0",
     "in_app": [
       {
         "quantity": "1",
         "product_id": "gms.apple.gem_2990",
         "transaction_id": "2000000376851165",
         "original_transaction_id": "2000000376851165",
         "purchase_date": "2023-07-27 02:41:06 Etc/GMT",
         "purchase_date_ms": "1690425666000",
         "purchase_date_pst": "2023-07-26 19:41:06 America/Los_Angeles",
         "original_purchase_date": "2023-07-27 02:41:06 Etc/GMT",
         "original_purchase_date_ms": "1690425666000",
         "original_purchase_date_pst": "2023-07-26 19:41:06 America/Los_Angeles",
         "is_trial_period": "false",
         "in_app_ownership_type": "PURCHASED"
       }
     ]
   },
   "environment": "Sandbox",
   "status": 0
}

It looks like there was a successful purchase, I was expecting to see successful order information in signedTransactions, not empty.

Any idea how to solve this please? Or my expectations are simply wrong, please correct me too thanks.

Accepted Answer

Hello! You're seeing an empty signedTransactions array because all of that user's transactions are finished consumables. See the Discussion on this page:

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

The Get Transaction History endpoint returns results for the following product types:

  • Auto-renewable subscriptions

  • Non-renewing subscriptions

  • Non-consumable in-app purchases

  • Consumable in-app purchases if the transaction is refunded or revoked, or if the app hasn’t finished processing the transaction. The results don’t include consumable in-app purchases that the app marks as finished. For more information about finishing transactions, see finish() and finishTransaction(_:). To get transaction information for finished consumable transactions, see Get Transaction Info.

If you want to fetch the transaction information for a finished, non-revoked consumable, you'll need to use Get Transaction Info: https://developer.apple.com/documentation/appstoreserverapi/get_transaction_info

api.storekit.itunes.apple.com/inApps/v1/history Get Empty signedTransactions
 
 
Q