How can I get a stable ID for the ‘current subscription’ using the iOS SDK?
What I’m looking to do is to give users some amount of in-app credit to use every month they are subscribed, with that clock starting immediately when they subscribe to either a monthly or yearly plan. So I need some sort of bucketing system to track the usage for the current month number, and therefore I need a stable key to use.
Here’s what I had in mind: <current subscription id> + <current month index>.
The month index would simply be derived by comparing the current time to the subscription’s original start time. When the index rolls over, they are using a fresh new bucket of credit. (I could probably live with slight drift over time of the point in the month at which the index turns over relative to the renewal time, after say a delay due to a billing retry and grace period).
But what does RevenueCat provide that I could use for a subscription ID? I would need it to change after upgrade or downgrade, because the amount of credit I want to give would be different. And I would want it to change after a period of non-subscription so that the credit tracking resets when the user re-subscribes later.
Am I missing something in the SDK that can serve this role?