I want to create a trial period ( 1 week) on my 1 month AR subscription in App purchase application via iTunes Connect. The question is, how to test it in sandbox and have the accurate information in Apple receipts that indicates the differenciation of status between the trial time period and the paying subscription? Thanks!
Under Sandbox, click Testers. Click “+” to set up your tester accounts. Complete the tester information form and click Invite. Sign out of your Apple ID on all testing devices and sign back in with your new sandbox tester account.
Overview. Use the Apple sandbox environment to test your implementation of in-app purchases that use the StoreKit framework on devices with real product information from App Store Connect. Your development-signed app uses the sandbox environment when you sign in to the App Store using a Sandbox Apple ID.
It is impossible to make a purchase on a simulator (it is only possible to request a list of available purchases). To test purchases, you first need to set up products on App Store Connect and then use the user's sandbox environment and a real device. In this case, purchases for the developer are free.
For in-app products with Free Trials, StoreKit on the client side issues two iOS7 style receipts in the in_app section -
When the user hits Buy which starts the free trial. User is not charged at this time. The receipt sent to the server for verification will have :
expires_date_ms - purchase_date_ms = Number of Free trial days.
When the free trial days are up and if the user has not turned OFF autorenewal from Manage subscription screen, another receipt is issued and this time the user is charged. The receipt issued will have
expires_date_ms - purchase_date_ms = Term Length
If the user has turned off autorenewal before the free trial expires, the server should detect this and turn off the subscription for the user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With