Integrate chrome extension with Chrome Web Store P

2019-08-17 02:45发布

I'm going to integrate an extension with License API and it will have monthly fee (subscription charged per month). As I understand so far I will need to make verify the license call and check createdTime value, and if it is greater than 1 month I will need to show link to web store. And after if user will pay subscription in next call createdTime will be changed to current date (so, createdTime will show last payment date, will not?), am I right? I've searched the answer in documentation but so far could not find any info about it..

1条回答
Melony?
2楼-- · 2019-08-17 03:51

According to documentation, the createdTime value contains:

The date that the license was created, returned as a Unix timestamp. You can use to limit functionality of a free trial to a specific period of time.

The createdTime value indicates the moment the user first installed the extension and it never changes, even if the user uninstalls and re-installs the extension, or changes from free trial to paid subscription.

You can check the accessLevel value to see if the user has paid the subscription or not: "FULL" indicates that the subscription is paid and active, "FREE_TRIAL" indicates that the user hasn't paid. In the latter case, you can compare the createdTime value to the current date to check if the user is still within the free-trial period or not.

查看更多
登录 后发表回答