Hello.
Currently, I am testing for the transition to the App Store Server API(v1/transactions/{transactionId}
) as the verifyReceipt API we are utilizing has become deprecated.
- API currently in use: https://developer.apple.com/documentation/appstorereceipts/verifyreceipt
- API planned to switch to: https://developer.apple.com/documentation/appstoreserverapi/get_transaction_info
I am doing the testing in the sandbox, but I cannot acquire a valid transaction_id with the App Store Server API. Below, I am detailing what I conducted.
1.I call the verifyReceipt API and receive a response.
※Here's a part of the response. The product_id is a dummy.
"latest_receipt_info": [
{
"quantity": "1",
"product_id": "dummy_product_id",
"transaction_id": "2000000497573524",
"original_transaction_id": "2000000293926363",
"purchase_date": "2024-01-11 03:06:43 Etc/GMT",
"purchase_date_ms": "1704942403000",
"purchase_date_pst": "2024-01-10 19:06:43 America/Los_Angeles",
"original_purchase_date": "2023-03-10 04:11:01 Etc/GMT",
"original_purchase_date_ms": "1678421461000",
"original_purchase_date_pst": "2023-03-09 20:11:01 America/Los_Angeles",
"expires_date": "2024-01-11 03:11:43 Etc/GMT",
"expires_date_ms": "1704942703000",
"expires_date_pst": "2024-01-10 19:11:43 America/Los_Angeles",
"web_order_line_item_id": "2000000047921358",
"is_trial_period": "false",
"is_in_intro_offer_period": "false",
"in_app_ownership_type": "PURCHASED",
"subscription_group_identifier": "20230239"
}
],
2.I call the App Store Server API.
- Request used with transaction_id: https://api.storekit-sandbox.itunes.apple.com/inApps/v1/subscriptions/2000000497573524
- Request used with original_transaction_id: https://api.storekit-sandbox.itunes.apple.com/inApps/v1/subscriptions/2000000293926363
3.I receive an error stating the transaction id cannot be found.
Response: 404 Not Found: "{"errorCode":4040010,"errorMessage":"Transaction id not found."}"
Additionally, as I found similar questions, I also tried shifting the numbers of the transaction_id and original_transaction_id when calling the App Store Server API. However, this did not resolve the error I received.
In this case, what should I do with the transactionId to get the Transaction information? I would appreciate it if anyone who knows can enlighten me.
Thank you in advance.