To check whether a customer already purchased a subscription, fetch the receipt.
You can also pass a
fromCache flag to determine whether to fetch the receipt from the cache or from the server.
receipt has the property
isExpired to easily check whether the subscription is active or not.
// Fetch receiptsconst receipts = await PurchasesSdk.fetchReceiptInfo(false);
That's it! You are basically all set up!