Auto-renew subscriptions and originalTransactionId/transactionId issue

We're seeing a few issues with how transactions are being recorded in the receipt. I've looked at when originalTransactionId and transactionId are assigned and changed as they don't seem to be working as expected/documented.


Here are the two cases we are seeing:


Case 1:

1) User subscribes for 1 month.

2) User auto renews for second month.

3) At the beginning of the second month there is a cancellation (from Apple).

4) A few days later in that second month user subscribes again.

Expected:

Receipt for second month in 4) should have a transaction id and a new original transaction id

Receipt should contain two chains of transactions - one for first month, with second month cancellation; second for 4) new subscription

Actual:

Receipt contains one chain of transactions with first month subscription, second month cancelation and second month subscription all with same original transaction id

Case 2:

1) User subscribes for 1 month with product id plus_subscription_999

2) User auto-renews for second month

Expected:

Receipt has chain of transactions that have the same original transaction id

Actual:

Receipt has two chains of transactions: one for the first month with one original transaction id , and a second one for the second month; both with different originalTransactionId


By chain of transactions, I mean several transactions that share the same original transaction id as documented here: https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ReceiptFields.html


Is there any documentation on what to expect for these two cases, it was certainly unexpected and we had to work around these cases.

You wrote:

"...Case 1......Receipt contains one chain of transactions with first month subscription, second month cancelation and second month subscription all with same original transaction id

Case 2:.....two chains of transactions: one for the first month with one original transaction id , and a second one for the second month; both with different originalTransactionId


And the documents state for "original_transaction_id"

"All receipts in a chain of renewals for an auto-renewable subscription have the same value for this field."


So Case 1 is consistent with this, assuming only that the cancellation/renewal is the same subscription - and it is, isn't it? It was renewed in the month it was cancelled so the subscription is continuous.


Case 2 sounds like either your facts are wrong or this is a bug. After all, it is one autorenewable subscription that auto-renewed once - how does it differ from all other autorenewable subscriptions?

Auto-renew subscriptions and originalTransactionId/transactionId issue
 
 
Q