Skip to content

Is Subscription Active

This asynchronous function checks whether a subscription product is currently active and acknowledged by the user. It queries the user’s owned subscriptions through the Google Play Billing Client to verify if a valid subscription period is ongoing.

If the specified product ID is found and active, the function will return true. Otherwise, it will return false — meaning the subscription is expired, cancelled, or not yet purchased.


Parameters

1. Product Id

The unique product ID of your subscription item, as defined in the Google Play Console. Must exactly match the ID configured in your subscription list.


2. On Status Received

Triggered once the query completes. Returns a single boolean value:

  • true — subscription is owned and acknowledged
  • false — subscription not found, not owned, or not yet acknowledged

Use this delegate to enable or disable premium features, manage UI visibility, or remind users to renew their subscription.


Example

In this example, the Is Subscription Active node is used to verify whether the "premium_subscription" is currently active for the user.

If the result is true, the game automatically unlocks premium features.


C++ Usage

You can also check subscription status directly from C++ using the static IsProductPurchased function.

#include "BillingCPPLibrary.h"

void UMyGameInstance::CheckPremiumAccess()
{
    FString ProductId = TEXT("premium_subscription");

    FOnSubscriptionStatusReceivedNative OnResult;
    OnResult.BindLambda([](bool bActive)
    {
        if (bActive)
        {
            UE_LOG(LogTemp, Log, TEXT("Premium content unlocked"));
        }
        else
        {
            UE_LOG(LogTemp, Log, TEXT("Subscription is not active"));
        }
    });

    UBillingCPPLibrary::IsSubscriptionActive(ProductId, OnResult);
}