ios - Saving / restoring auto-renewing receipts without duplicates -


i'm developing app auto-renewing receipts, , saving them in server, working great, until user restores purchases - causes duplicates.

the transaction_id field different same receipt every restore, , original_transaction_id same across every run of renewals, can't use that. unique_identifier field same (i don't understand how it's unique). had been using web_order_line_item_id field , seemed fine, tested new account, , ended duplicate, that's useless too.

i missing here? there must field unique every receipt, doesn't change each time restored?

apparently original_transaction_id , purchase_date 2 unique values not change after restoring purchases. can rely on latest_receipt_info -> web_order_line_item_id doesn’t change between restores (unlike latest_receipt_info -> transaction_id). inspecting latest_receipt_info can find out expiration_date of subscription, apparently apple believes should enough you.


Comments