Apps Script Subscription management library for "freemium" add-ons or web apps.
Library ID: 1ta4fddceg0fdnqsxltv8BYNUfjKGw-0fQXGGnF4ZuFkfcGGgUMDLY_fb
See the "Subs Test Sheet" repo for complete unit tests and examples on how to use the library.
The script project which contains the very latest (unstable) code.