Status updates, like for subscriptions, can not be tracked by your app itself. Subscription status tracking is usually done on your backend or by some third party service. Apple or Google send real-timesubscription status updates that you interpret and take action on. This is why we provide a simple Web API to enable subscription lifetime value tracking for Mage. Apple or Google contact your backend, your backend contacts Mage. To submit a status change, use the following API definition.
Send a HTTP Post request to the path /v1/aparecium for the host https://room-of-requirement.getmage.io. For authorization, you set your personal Web-API-Key in your request header as Token. You can access your personal Web-API-Key in the Mage Web App.
For the request body you need to set four required attributes (to submit a switch of subscription you need to define an additional attribute):
We distinguish between four fundamental status changes: Renewing a subscription, switching a subscription, refunding an In-App purchase (IAP) and rebuying an IAP. According to that the subChangeState can take four distinguished strings to define the status change: 'RENEW', 'SWITCH', 'REFUND' or 'REBUY'.