Free Trial Does Not Work in Sandbox

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

Replies

Hi, did you fix this problem?

Did you have any luck testing out free trials for auto-renewing subscriptions on sandbox?

Same here. Sandbox bug I guess. To fix the problem you need to first create IAP with free trial and only after that add your new Sandbox Tester.

I'd create a new test user account to test with. Before you launch the app, make sure to clear out the current Settings-> User -> iTunes & App Store -> user setting. If you've used this test user account with a previous version of the app, the free trial may no longer be available.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

Post not yet marked as solved Up vote reply of rich Down vote reply of rich