Unable to Retrieve Valid Transaction Id with App Store Server API

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.

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.

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.

Accepted Reply

This generally happens when the JWT used to authenticate to the App Store Server API has a different bundleId than the bundleId that owns the transaction. Please check that you are calling for the correct app. If the problem persists, please post in Feedback Assistant (http://feedbackassistant.apple.com) and post the FB number here.

  • Thank you for checking. As you advised, I attached the correct BundleId to the request, and I was able to receive the correct response from the API.

    This has resolved the issue. Your prompt response was greatly appreciated.

Add a Comment

Replies

This generally happens when the JWT used to authenticate to the App Store Server API has a different bundleId than the bundleId that owns the transaction. Please check that you are calling for the correct app. If the problem persists, please post in Feedback Assistant (http://feedbackassistant.apple.com) and post the FB number here.

  • Thank you for checking. As you advised, I attached the correct BundleId to the request, and I was able to receive the correct response from the API.

    This has resolved the issue. Your prompt response was greatly appreciated.

Add a Comment