Issues with renewing subscriptions

I am having issues with renewing subscriptions.


From Session 705 Engineering Subscriptions WWDC 2018 - Does the User Have an Active Subscription?, I know that the way to answer to these questions is:


- Filter transactions by original_transaction_id


- Find transaction with the latest expires_date


- Date in past shows user is not subscribed


Subscription Period ---------------------------------------------------------> Time ---> USER HAS NO AN Active Subscription

expires_date Today



Subscription Period ---------------------------------------------------------> Time ---> USER HAS AN Active Subscription

Today expires_date



But I get the following data:


6 elements


▿ 0 : InApp

▿ expiresDate : 2020-05-02 21:31:29 +0000

▿ 1 : InApp

▿ expiresDate : 2020-05-02 21:36:29 +0000

▿ 2 : InApp

▿ expiresDate : 2020-05-02 21:41:29 +0000

▿ 3 : InApp

▿ expiresDate : 2020-05-02 21:46:29 +0000

▿ 4 : InApp

▿ expiresDate : 2020-05-02 21:51:51 +0000

▿ 5 : InApp

▿ expiresDate : 2020-05-02 21:56:51 +0000 <====== transaction with the latest expires_date


let today = Date()


2020-05-03 21:48:29 +0000


Transaction with the latest expires_date is before Today.


Why is this happening?

Answered by PBK in 418147022

In the sandbox an autorenewable subscription renews only 5 times.


It is unclear whether 'filter by originalTransaction' works in the sandbox (or in production). It is not necessary - filter by the productId.

Accepted Answer

In the sandbox an autorenewable subscription renews only 5 times.


It is unclear whether 'filter by originalTransaction' works in the sandbox (or in production). It is not necessary - filter by the productId.

Thank fou for your answer.

Issues with renewing subscriptions
 
 
Q