Add subscription type like monthly?
How to record monthly donation?
Google App Scripts Integration?
- Google Sheets API - creating app scripts or attaching them to a Spreadsheet that was created with API - Stack Overflow
- Method: projects.updateContent | Apps Script API | Google Developers
Images
- User who use subscription type can install helper GAS script
- GAS script use ClockTriggerBuilder and create new record from subscription item.
Require
- Implement GAS script
- Update scope https://github.com/azu/philan.net/blob/5aea1088f1d529108d081d64d4828ead6e76d790/web/pages/api/auth/index.ts#L23-L27 and privacy policy
Should subscription items be another sheet? For example, the "Subscription" sheet.
I concern about how to stop subscriptions.

What "Interval" format is suitable? https://docs.google.com/spreadsheets/d/152vYcYuz7JGcSWPwmzOQ-p2yvyJJxYOu3CvxFYbJu3w/edit?usp=sharing
It would be great to support for recurring donations. But meantime, it would be nice adding a small feature to duplicate existing records.
If so, we can easily add our recurring donations by simply duplicating last month's records and just changing the date.
If so, we can easily add our recurring donations by simply duplicating last month's records and just changing the date.
Ah, It's reasonable. I've created it as a new issue. https://github.com/azu/philan.net/issues/19
I've implemented the clone feature in #20
https://user-images.githubusercontent.com/19714/110800107-3a18cb80-82bf-11eb-939a-6d4cfa442215.mp4
Data Table image:
[StartDate, EndDate, Every?, to, URL, amount, why?]
We need to define Every? format.
What format is suitable?
Probably, this lifecycle is バラバラ.
- 毎月 n 日
- nヶ月ごと
- n 日ごと
毎月1日が決済日となっています。
About billing for GitHub Sponsors - GitHub Docs next billing date is different by user
継続寄付は、お申し込み時点では決済されません。お申込みされてから直近の決済日(毎月10日、土日祝日にあたる場合は翌営業日)に決済されます。カード会社によって締め日・引き落とし日が違うので一概には言えませんが、決済日の翌月か翌々月にお引き落としがあります。
Probably, We would not need to get closing date strictly.
- every
x year(create new record at XXXX-{StartDate's month}-01) - every
x month(create new record at XXXX-MM-{StartDate's day}) - every
x days(create new record at XXXX-MM-DD)
is even enough?
cron format may be fit this case.
Different approach:
-
Use cron and post
/user/:user/subscription-check