On my production application, renewalInfo.expirationIntent
and renewalInfo.offerType
is missing on notification data.
On this examples, the signedRenewalInfo
is decoded and set as renewalInfo
and the signedTransactionInfo
is decoded and set as transactionInfo
.
Example 1
It is expiration notification. However, renewalInfo.expirationIntent
does not exists
{
"notificationType": "EXPIRED",
"subtype": "VOLUNTARY",
"notificationUUID": "REDACTED",
"data": {
"appAppleId": 123456789,
"bundleId": "REDACTED",
"bundleVersion": "16",
"environment": "Production",
"status": 2,
"transactionInfo": {
"transactionId": "REDACTED",
"originalTransactionId": "REDACTED",
"webOrderLineItemId": "REDACTED",
"bundleId": "REDACTED",
"productId": "REDACTED",
"subscriptionGroupIdentifier": "REDACTED",
"purchaseDate": 1693220511000,
"originalPurchaseDate": 1693220512000,
"expiresDate": 1693479711000,
"quantity": 1,
"type": "Auto-Renewable Subscription",
"appAccountToken": "REDACTED",
"inAppOwnershipType": "PURCHASED",
"signedDate": 1693479743547,
"offerType": 1,
"environment": "Production",
"transactionReason": "PURCHASE",
"storefront": "PHL",
"storefrontId": "143474"
},
"renewalInfo": {
"originalTransactionId": "REDACTED",
"autoRenewProductId": "REDACTED",
"productId": "REDACTED",
"autoRenewStatus": 0,
"isInBillingRetryPeriod": false,
"signedDate": 1693479743547,
"environment": "Production",
"recentSubscriptionStartDate": 1693220511000,
"renewalDate": 1693479711000
}
},
"version": "2.0",
"signedDate": 1693479743603
}
Example 2
It is an initial buy subscription notification. transactionInfo.offerType
is 1, however there is no renewalInfo.offerType
.
{
"notificationType": "SUBSCRIBED",
"subtype": "INITIAL_BUY",
"notificationUUID": "REDACTED",
"data": {
"appAppleId": 123456789,
"bundleId": "REDACTED",
"bundleVersion": "16",
"environment": "Production",
"status": 1,
"transactionInfo": {
"transactionId": "REDACTED",
"originalTransactionId": "REDACTED",
"webOrderLineItemId": "REDACTED",
"bundleId": "REDACTED",
"productId": "REDACTED",
"subscriptionGroupIdentifier": "REDACTED",
"purchaseDate": 1693475274000,
"originalPurchaseDate": 1693475276000,
"expiresDate": 1725097674000,
"quantity": 1,
"type": "Auto-Renewable Subscription",
"appAccountToken": "REDACTED",
"inAppOwnershipType": "PURCHASED",
"signedDate": 1693475283052,
"offerType": 1,
"environment": "Production",
"transactionReason": "PURCHASE",
"storefront": "ESP",
"storefrontId": "143454"
},
"renewalInfo": {
"originalTransactionId": "REDACTED",
"autoRenewProductId": "REDACTED",
"productId": "REDACTED",
"autoRenewStatus": 1,
"signedDate": 1693475283052,
"environment": "Production",
"recentSubscriptionStartDate": 1693475274000,
"renewalDate": 1725097674000
}
},
"version": "2.0",
"signedDate": 1693475283075
}