I am working on auto-renewable subscriptions in my app.
When I purchase a subscription I get the receipt from Apple and send it to my server. My server then sends it to the Apple receipt validation endpoint, and my server retrieves the required information, such as expires_date, product_id, latest_receipt_Base64, original_transaction_id, and stores it in my database for later use. In addition my app will get a response from my server saying whether the user is subscribed or not.
If I test it locally with Xcode on my device, that works fine, but when I test it with TestFlight, I get a very old receipt from Apple, which still contains a product ID that no longer exists. I deleted this product ID a few months ago.
Why don't I get the current receipt which I normally get when purchasing an IAP?