Hi there,
I have created an auto-renewable subscription with a duration of one year and a free trial period of 3 months. I’ve gone ahead and purchased it in the sandbox and, when I validate the receipt, I get the following back in the in_app json array:
{"quantity":"1", "product_id":"com.acme.producttest.one_month_autorenew_4", "transaction_id":"1000000245870295", "original_transaction_id":"1000000245303500", "purchase_date":"2016-10-28 00:28:10 Etc/GMT", "purchase_date_ms":"1477614490000", "purchase_date_pst":"2016-10-27 17:28:10 America/Los_Angeles", "original_purchase_date":"2016-10-28 00:28:10 Etc/GMT", "original_purchase_date_ms":"1477614490000", "original_purchase_date_pst":"2016-10-27 17:28:10 America/Los_Angeles", "expires_date":"2016-10-28 01:28:10 Etc/GMT", "expires_date_ms":"1477618090000", "expires_date_pst":"2016-10-27 18:28:10 America/Los_Angeles", "web_order_line_item_id":"1000000033539515", "is_trial_period":"false"}
If I understand it correctly, the one year auto-renewable product should map to a one-hour product in the sandbox, which it does (expiration set to exactly one-hour from the time of purchase). However, I don’t understand the following:
1) why is “is_trial_period” set to false even when I validate the receipt within the first 15 minutes after the purchase (assuming 15 minutes is the sandbox length of the 3-month free trial).
2) why doesn't the expiration date match the expiration date of the free trial? I had read that the expiration date should initially match the expiration date of the free trial until the free trial is over and the user is charged, thereby creating an incompleteTransaction record. If that were the case, then the expiration date should have been set to 15 minutes past the purchase date.
After one hour, I do see a second entry in the in_app json array:
{"quantity":"1", "product_id":"com.acme.producttest.one_month_autorenew_4", "transaction_id":"1000000245870295", "original_transaction_id":"1000000245303500", "purchase_date":"2016-10-28 00:28:10 Etc/GMT", "purchase_date_ms":"1477614490000", "purchase_date_pst":"2016-10-27 17:28:10 America/Los_Angeles", "original_purchase_date":"2016-10-28 00:28:10 Etc/GMT", "original_purchase_date_ms":"1477614490000", "original_purchase_date_pst":"2016-10-27 17:28:10 America/Los_Angeles", "expires_date":"2016-10-28 01:28:10 Etc/GMT", "expires_date_ms":"1477618090000", "expires_date_pst":"2016-10-27 18:28:10 America/Los_Angeles", "web_order_line_item_id":"1000000033539515", "is_trial_period":"false"},
{"quantity":"1", "product_id":"com.acme.producttest.one_month_autorenew_4", "transaction_id":"1000000245872843", "original_transaction_id":"1000000245303500", "purchase_date":"2016-10-28 01:28:10 Etc/GMT", "purchase_date_ms":"1477618090000", "purchase_date_pst":"2016-10-27 18:28:10 America/Los_Angeles", "original_purchase_date":"2016-10-28 01:27:45 Etc/GMT", "original_purchase_date_ms":"1477618065000", "original_purchase_date_pst":"2016-10-27 18:27:45 America/Los_Angeles", "expires_date":"2016-10-28 02:28:10 Etc/GMT", "expires_date_ms":"1477621690000", "expires_date_pst":"2016-10-27 19:28:10 America/Los_Angeles", "web_order_line_item_id":"1000000033548860", "is_trial_period":"false"}
It’s as if the free trial is non-existent.
Any ideas?
Thanks!
Ara