I got the JSON using this url: https://sandbox.itunes.apple.com/verifyReceipt
, so it is about Sandbox, not production.
I have some questions about this JSON because it is not very clear to me, and I think for lot of guys using IAP for the first time, too.
I wnat to remove some user's features if his Premium Account has ended(he cancelled subscription). In my case subscription is 1 week free trial, then $0.99 monthly.
expire_date
is the same as purchase_date
(Only few minutes difference)? Is it just up to Sandbox?is_trial_period
is set to true
? Is it correct? I then changed my phone's date and made it about 10 days after purchase_date(trial period should be false
then I think?) but the object is still true
0
value.please don't paste links
...{
"expires_date" = "2020-10-12 12:51:58 Etc/GMT";
"expires_date_ms" = 1602507118000;
"expires_date_pst" = "2020-10-12 05:51:58 America/Los_Angeles";
"is_in_intro_offer_period" = false;
"is_trial_period" = true;
"original_purchase_date" = "2020-10-12 12:49:00 Etc/GMT";
"original_purchase_date_ms" = 1602506940000;
"original_purchase_date_pst" = "2020-10-12 05:49:00 America/Los_Angeles";
"original_transaction_id" = 1000000725499801;
"product_id" = "com.sleepfan.premium";
"purchase_date" = "2020-10-12 12:48:58 Etc/GMT";
"purchase_date_ms" = 1602506938000;
"purchase_date_pst" = "2020-10-12 05:48:58 America/Los_Angeles";
quantity = 1;
"subscription_group_identifier" = 20691399;
"transaction_id" = 1000000728899049;
"web_order_line_item_id" = 1000000056417123;
}
I think you forgot to read this document
Which objects from this JSON should I check?
You have to check latest_receipt_info
from JSON which gives information about your latest transaction
Why expire_date
is the same as purchase_date
(Only a few minutes difference)? Is it just up to Sandbox?
I subscribed with my test user, got 7 days free trial, then I went to settings and canceled the subscription, then opened the app again and saw the object is_trial_period is set to true? Is it correct?
As far as I know, from my experience, test users can't access the settings page to manage their subscriptions on their iPhone. Sandbox subscriptions will just cancel after 5 or 6 repetitions.
Can anyone clear the last object in array called 'status'. In my case it is 0 value.
Either 0 if the receipt is valid, or a status code if there is an error.
When I want to buy a subscription, it is always the [environment: sandbox] version. Is this going to change automatically when the app goes to production?
As far as I know, when you upload your product(which you want to sell as IAP) on iTunes connect, once your product approved, the message of the sandbox will be removed.