I'm using the receipt to validate a purchase after I get the SKPaymentTransactionStatePurchased
notification, and among other things get the expiration date for the subscription the user just purchased.
To properly identify the transaction that just occurred in the receipt, I'm matching it by the transaction.transactionIdentifier
and transaction_id
. The problem I'm encountering is that the transaction identifiers never match up.
I've been able to identify the correct transaction in the receipt by manually inspecting the purchase_date
and product_id
, but the transaction_id
completely differs from the Transaction.
I've also looked at transaction.originalTransaction.transactionIdentifier
and original_transaction_id
, but none of these four values seem to match up at any point.
What is going on here? Anyone had similar issues when testing in sandbox? The documentation clearly states that the transaction_id
should match the transactionIdentifier
property of the transaction. Could this be a bug?
Edit 1: Here's the different transaction identifiers for a single purchase of a subscription (that had previously expired)
transaction.transactionIdentifier = 1000000325087359
transaction.originalTransaction.transactionIdentifier = 1000000297785006
transaction_id = 1000000325087377
original_transaction_id = 1000000297785006
It seems as though the original transaction identifiers match up (why would they, it's a new purchase?), but the two others do not. Where do they come from and what do they match? I don't understand the relationship between the two and their significance.