question

Torsten avatar image
Torsten asked

Server to server subscription details

Hi, is there no way to have more details on subscriptions in the server to server API (or in general)? 1) I would like to determine the end for the current billing cycle to track renewal payments in my database. 2) I would like to know if a newly made subscription starts in a free trial mode or if it is a payed subscription (same purpose) Thanks
iap
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Torsten, Thank you for your post. There is no server side solution available for your requirement. But you can check the subscription status of all SKUs in your app. The PurchasingManager grants the entitlement for the subscription; you do not have to do anything outside of initiating the purchase. Through the PurchasingManager you can retrieve subscription receipts to determine if a customer has a valid subscription for a specific SKU. Amazon will manage the periodic recurring charge for you; you do not need to do anything outside of initiating the purchase. If a subscription fails to renew - either due to an invalid payment instrument or if the customer opts out of the renewal - the Receipt data from the initiatePurchaseUpdatesRequest method call will contain a non-null endDate value indicating the date the subscription expired. Subscription information is returned in the Receipt object, via the getSubsriptionPeriod() method. SubsciptionPeriod.getStartDate() will always return the date the Subscription is purchased. SubscriptionPeriod.getEndDate() will return null if the Subscription is still active, or the date the Subscription ended if the period occurs in the past. If you want to provide a free trial period for any subscription, you need to define the free trial period in IAP settings in your app in developer portal. Current values for free trial periods are given like "No", 14 days, 1 month, 2 months and 3 months. So it's your choice whether you would like to have free trial for your app or not. For more information you can refer below link: https://developer.amazon.com/sdk/in-app-purchasing/documentation/subscription.html#Overview
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Torsten avatar image
Torsten answered
Thanks, your reply contains much more information than I needed. I know about all these things :) I was just wondering if its possible to track the actual events, because I track graphs of revenue, etc. over all platforms my application is running on. Amazon is the only platform that falls short here.. And about trials: I would expect a user can only try a subscription for free once, correct? So if he or she decides to subscribe a 2nd time, it would be a payed subscription from the beginning, hence it would be handy to determine if a subscription starts payed or in trial mode. But that is only a secondary problem after not being able to track payment events in general :)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Torsten, Thank you for your post and sorry for the delay in response. You could track the end for the current billing cycle to track renewal payments for all of user by using our validate subscription API calls periodically from your server. Related link is below. https://developer.amazon.com/sdk/in-app-purchasing/documentation/rvs.html#Sample Also, your app can be notified of an expired subscription by making a call to initiatePurchaseUpdatesRequest() from within your app. Once a subscription has ended, we send an update to the app when it calls that method, informing the app that the subscription has ended. You could then notify your sever about the expiry. This way you can get notification of all active users of your app. Free trial information is not provided to the 3rd party app. From the app's perspective, a subscription is either valid, or it's not. Amazon takes care of managing the free trial period, and converting the free trial to a paid subscription on the back end. This simplifies the logic in the app. Hope this helps.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.