'GET https://api.storekit.itunes.apple.com/inApps/v1/history/{originalTransactionId} 404
when i called the apple api: https://api.storekit-sandbox.itunes.apple.com/inApps/v1/history/{originalTransactionId} or https://api.storekit.itunes.apple.com/inApps/v1/history/{originalTransactionId} , http response 404
and when i check the apple document https://developer.apple.com/documentation/appstoreserverapi/get_transaction_history?language=objc , i found that,404 is(AccountNotFoundError | AccountNotFoundRetryableError | AppNotFoundError | AppNotFoundRetryableError | OriginalTransactionIdNotFoundError | OriginalTransactionIdNotFoundRetryableError)
but i only can see 404, not 404xxx ;
thanks for your help;
Solution 1:[1]
Is it possible that you have not replaced the {originalTransactionId}
with the original transaction ID value provided by Apple during the purchase?
- In StoreKit v1, upon a purchase, Apple will return your app a base64 encoded string of receipt data.
- Your app will have to pass this string back to you backend service.
- Later on, from your backend, you can invoke /verifyReceipt to get decoded transaction information. In the
in_app
field of the response you will be getting a series of transactions including an original transaction ID for each one. - Now you can invoke https://api.storekit-sandbox.itunes.apple.com/inApps/v1/history/{originalTransactionId} for each transaction in the
in_app
array in the previous response, by replacing{originalTransactionId}
with each of the original transaction IDs you received in the previous call.
Regarding the 404
response you received: 404
is a standard HTTP status code meaning "NOT_FOUND". In order to get more information about the error you need to inspect the HTTP response body. There, according to the documentation, you will receive an error code indicating the exact nature of the error.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Rubms |