question

MoonHeonYoung avatar image
MoonHeonYoung asked

subscription feature

Hello

I want to implement the following features in my mobile game.

When a user purchases the "30 Days Gem Product", they receive 300 gems every day.

It expires after 30 days and you can repurchase the product.

Is there a PlayFab function to implement the above function?

It's kind of a subscription product, but I'm not sure how to implement it.

I need advice.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Seth Du avatar image
Seth Du answered

You may simply create a consumable item, which is consumed by time, and this item will be expired(consumed) after 30 days. This item will be a mark of the ‘Subscription’. Then you can create a Cloud Script/Azure Function, which will verify the check-in state for the player’s daily first sign-in. Server side function will handle the reward distribution. Basically the verification is to check the last check-in state and if the player has the “30 Days Gem Product” item.

The “mark” can also be a value in Player Read-Only Data, which has an expiration date. Server side function will check the value of this data for verification.

You may refer to the official sample (it is different from your scenario, but is valuable as reference) on: PlayFab-Samples/Recipes/ProgressiveRewards at master PlayFab/PlayFab-Samples (github.com).

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.