Check if user is a payed subscriber
It is easy with sub2 SDK to check whether a user is subscribed to a given recipient. We can simply use the isPayedSubscriber function:
const isPayedSubscriber: boolean = await sub2SDK.isPayedSubscriber(
senderAddress,
recipientAddress,
minAmount,
token,
cooldown
);This function will return true only if there is an active paid subscription from senderAddress to recipientAddress with minimum minAmount of token and cooldown of cooldown.
Last updated