Environment: Production
Product type: Subscription
Client
- completed a subscription purchase
- sent to the server:
- transaction ID: 520000448162796
- receipt: MIIUFAYJKoZ...vn3Zdfsb8=
Server
- sends this receipt to the Apple's verification server (buy.itunes.apple.com/verifyReceipt)
- gets receipt/in_app/purchase:
{
"quantity":"1",
"product_id":"ru.rt.itv.dlyasvoih",
"transaction_id":"520000448157321",
"original_transaction_id":"520000448157321",
"purchase_date":"2019-06-09 02:14:41 Etc\/GMT",
"purchase_date_ms":"1560046481000",
"purchase_date_pst":"2019-06-08 19:14:41 America\/Los_Angeles",
"original_purchase_date":"2019-06-09 02:14:43 Etc\/GMT",
"original_purchase_date_ms":"1560046483000",
"original_purchase_date_pst":"2019-06-08 19:14:43 America\/Los_Angeles",
"expires_date":"2019-07-09 02:14:41 Etc\/GMT",
"expires_date_ms":"1562638481000",
"expires_date_pst":"2019-07-08 19:14:41 America\/Los_Angeles",
"web_order_line_item_id":"520000139001845",
"is_trial_period":"false",
"is_in_intro_offer_period":"false"
}
The question is,
- why does the identifier of the completed transaction on the client do not match the identifier of the transaction from the receipt?
520000448162796 vs 520000448157321
- How to correctly validate a purchase on the server if the transaction ID changes?
Additional information:
- Is the first purchase on the client and this is not a renewal of the old subscription (the transaction identifier is equal to the original transaction identifier)
- There are a lot of such cases: from 10 cases every day 😔 (I can provide more receipts and transaction identifiers not found)
See also:
https://forums.developer.apple.com/thread/84812
https://forums.developer.apple.com/thread/68944
Thanks, Roman