transaction_id in receipt validation responses

When I validate a receipt the Apple returns a list of all transactions. I store transaction_id values into the database and in the next time I validate the receipt for the same user I ignore transactions that already exist in the database and give to the user only newly purchased items. This how IAP worked.

Now I faced an issue that the Apple response contains random transaction_ids. Each time a new receipt is being received by my server's hook endpoint, almost all transactions in the list are different. The only transaction_id does not change - the first transaction that is equal to original_transaction_id.

And when I try to validate old receipts again - they all return the same updated transaction_ids. Why it happens? Why old transactions change their transaction_ids? How I can track which transactions were processed by my backend server and which transactions are new?

I'm 100% sure it worked fine earlier. Transaction_id values of old transactions did not change.

Transactions_ID are not static values as these roll if a customer initiates a Restore Purchases (restoreCompletedTransactions).

If you are looking for a static value for a transaction, I recommend using the web_order_line_item_id

transaction_id in receipt validation responses
 
 
Q