Issue Description
When using the App Store Server API endpoint GET v2/history/{transactionId} to retrieve transaction history for a specific transaction, I'm observing unexpected changes in the appTransactionId field across related transactions in the same subscription group.
Important Context: This is a "clean" auto-renewable subscription with no user intervention - the user has had continuous auto-renewals without any upgrades, downgrades, cancellations, or resubscriptions. The subscription has been renewing automatically and successfully throughout the entire period.
API Call
GET v2/history/1000000000000001
Response Data
The API returns the following transaction history, where I notice the appTransactionId values are inconsistent across what should be a straightforward auto-renewal sequence:
Note: The data below has been sanitized for privacy protection (IDs, bundle identifiers, etc. have been replaced with example values), but the logical relationships, date sequences, and the core issue remain identical to the original data.
Array
(
[0] => Array
(
[transactionId] => 1000000000000001
[originalTransactionId] => 1000000000000001
[webOrderLineItemId] => 1000000000000001
[bundleId] => com.example.myapp
[productId] => MonthlySubscription
[subscriptionGroupIdentifier] => 20000000
[purchaseDate] => 1743784032000
[originalPurchaseDate] => 1743784034000
[expiresDate] => 1746376032000
[quantity] => 1
[type] => Auto-Renewable Subscription
[inAppOwnershipType] => PURCHASED
[signedDate] => 1751868174651
[environment] => Production
[transactionReason] => PURCHASE // Original purchase
[storefront] => USA
[storefrontId] => 143441
[price] => 100000
[currency] => USD
[appTransactionId] => 700000000000000001 // Different value
)
[1] => Array
(
[transactionId] => 1000000000000002
[originalTransactionId] => 1000000000000001
[webOrderLineItemId] => 1000000000000002
[bundleId] => com.example.myapp
[productId] => MonthlySubscription
[subscriptionGroupIdentifier] => 20000000
[purchaseDate] => 1746376032000
[originalPurchaseDate] => 1746347349000
[expiresDate] => 1749054432000
[quantity] => 1
[type] => Auto-Renewable Subscription
[inAppOwnershipType] => PURCHASED
[signedDate] => 1751868174651
[environment] => Production
[transactionReason] => RENEWAL // First auto-renewal
[storefront] => USA
[storefrontId] => 143441
[price] => 100000
[currency] => USD
[appTransactionId] => 700000000000000002 // Same for renewals
)
[2] => Array
(
[transactionId] => 1000000000000003
[originalTransactionId] => 1000000000000001
[webOrderLineItemId] => 1000000000000003
[bundleId] => com.example.myapp
[productId] => MonthlySubscription
[subscriptionGroupIdentifier] => 20000000
[purchaseDate] => 1749054432000
[originalPurchaseDate] => 1749025657000
[expiresDate] => 1751646432000
[quantity] => 1
[type] => Auto-Renewable Subscription
[inAppOwnershipType] => PURCHASED
[signedDate] => 1751868174651
[environment] => Production
[transactionReason] => RENEWAL // Second auto-renewal
[storefront] => USA
[storefrontId] => 143441
[price] => 100000
[currency] => USD
[appTransactionId] => 700000000000000002 // Same as previous renewal
)
[3] => Array
(
[transactionId] => 1000000000000004
[originalTransactionId] => 1000000000000001
[webOrderLineItemId] => 1000000000000004
[bundleId] => com.example.myapp
[productId] => MonthlySubscription
[subscriptionGroupIdentifier] => 20000000
[purchaseDate] => 1751646432000
[originalPurchaseDate] => 1751617840000
[expiresDate] => 1754324832000
[quantity] => 1
[type] => Auto-Renewable Subscription
[inAppOwnershipType] => PURCHASED
[signedDate] => 1751868174651
[environment] => Production
[transactionReason] => RENEWAL // Third auto-renewal
[storefront] => USA
[storefrontId] => 143441
[price] => 100000
[currency] => USD
[appTransactionId] => 700000000000000002 // Same as previous renewals
)
)
Questions
Is this behavior expected? Should the appTransactionId change between the original purchase and subsequent renewals within the same subscription group, especially when there are no user actions (upgrades/downgrades/cancellations/resubscriptions)?
What determines the appTransactionId value? The documentation doesn't clearly explain when this identifier might change or what triggers a new value. This is particularly puzzling since this is a straightforward auto-renewal scenario.
How should we handle this in our backend logic? Should we treat transactions with different appTransactionId values as separate entities, or should we rely on originalTransactionId for grouping related subscription transactions?
Is this a known issue? We've seen similar concerns in the community regarding transaction ID inconsistencies, but this specific case involves a clean auto-renewal flow without any complicating factors.