I have 2 subscriptions, monthly and year
first:DID_CHANGE_RENEWAL_PREF + DOWNGRADE:
Customer downgrades a subscription within the same subscription group;
The current subscribe is year;if i change to month;when the subscribe year was expire,Automatic renewal will change to month
second:DID_CHANGE_RENEWAL_PREF+UPGRADE:
Customer upgrades a subscription within the same subscription group.
The current subscribe is month;if i change to year;I need to pay for the annual subscription immediately;and The subscription immediately switches to the annual
third:DID_CHANGE_RENEWAL_PREF subtype is None
Customer reverts to the previous subscription, effectively canceling their downgrade.
what this mean?
This is Test Env,month is five minutes;year is one hour
①My current subscription is an annual,
startTime:2024-10-02 15:04:58 ,expireTime:2024-10-02 16:04:58
②first DOWNGRADE to month,at 2024-10-02 15:14:16
②after 38 minutes,I change to the annual subscribe;at 2024-10-02 15:52:00
in the end,the Notification purchaseDate 2024-10-02 15:52:00;expiresDate 2024-10-02 16:52:00;
So
When I get NotificationType=DID_CHANGE_RENEWAL_PREF,NotificationSubType=None,Do I need to create a new subscription for the users?
Is it the latest notice of purchaseDate and expiresDate, for a year?
The appleNotification Payload as follows:
JWSTransactionDecodedPayload(
originalTransactionId='2000000731045285', transactionId='2000000731088945',
webOrderLineItemId='2000000076096676',
bundleId='app.xxxx',
productId='com.xxxx.365',
subscriptionGroupIdentifier='21514251',
purchaseDate=1727855520000, 2024-10-02 15:52:00
originalPurchaseDate=1727852699000, 2024-10-02 15:04:59
expiresDate=1727859120000, 2024-10-02 16:52:00
quantity=1,
type=<Type.AUTO_RENEWABLE_SUBSCRIPTION: 'Auto-Renewable Subscription'>, rawType='Auto-Renewable Subscription', appAccountToken='fa37b7a2-2b0b-43cb-8fda-a1fb21168efe', inAppOwnershipType=<InAppOwnershipType.PURCHASED: 'PURCHASED'>, rawInAppOwnershipType='PURCHASED',
signedDate=1727855526632, 2024-10-02 15:52:06
revocationReason=None,
rawRevocationReason=None,
revocationDate=None,
isUpgraded=None,
offerType=None,
rawOfferType=None,
offerIdentifier=None,
environment=<Environment.SANDBOX: 'Sandbox'>,
rawEnvironment='Sandbox',
storefront='CAN',
storefrontId='143455',
transactionReason=<TransactionReason.PURCHASE: 'PURCHASE'>, rawTransactionReason='PURCHASE',
currency='CAD',
price=14990,
offerDiscountType=None,
rawOfferDiscountType=None)
JWSRenewalInfoDecodedPayload(
expirationIntent=None,
rawExpirationIntent=None,
originalTransactionId='2000000731045285', autoRenewProductId='com.xxxx.365',
productId='com.xxxx.365',
autoRenewStatus=<AutoRenewStatus.ON: 1>,
rawAutoRenewStatus=1,
isInBillingRetryPeriod=None,
priceIncreaseStatus=None,
rawPriceIncreaseStatus=None,
gracePeriodExpiresDate=None,
offerType=None,
rawOfferType=None,
offerIdentifier=None,
signedDate=1727855526632, 2024-10-02 15:52:06
environment=<Environment.SANDBOX: 'Sandbox'>,
rawEnvironment='Sandbox',
recentSubscriptionStartDate=1727852698000, 2024-10-02 15:04:58
renewalDate=1727859120000, 2024-10-02 16:52:00
currency='CAD',
renewalPrice=14990,
offerDiscountType=None,
rawOfferDiscountType=None,
eligibleWinBackOfferIds=None)