Subscription Purchase in iOS

My app contains subscription based functionality for purchase. So which way I require to move ahead into this. When I search for this in Google, I always found Consumable and Non-Consumable related product purchase related source code.

I want to move ahead with Renewable Subscription purchase. At present i have Prime31 plugin with following source code written:

#if UNITY_ANDROID
         var productId = GameConstants.SKU_PURCHASE_9999_COINS;
////        var productId = GameConstants.SKU_ANDROID_TEST_PURCHASE;
         #elif UNITY_IOS
         var productId = GameConstants.SKU_PURCHASE_9999_COINS;
         #endif
         IAP.purchaseConsumableProduct (productId,  (didSucceed, error) => {
             Debug.Log ("purchasing product " + productId + " result: " + didSucceed);
             if (didSucceed) {                   
             }               
         });

Whether same code, Can I use for Subscription purchase? What is alternative way for me to implement Subscription purchase?

Now at least I found a way to purchase and restoring a Subscription in Unity.

After this implementation, I got another doubts in mind:

  • How to get expire time at every launch of game?
  • How to validate receipt with Apple server?

I have watched this video and they are explaining all process but this video was in core iOS platform.

Now something similar I want to do with Unity so what is a way for this?