authgear / authgear-server

Open source alternative to Auth0 / Firebase Auth
https://www.authgear.com
Apache License 2.0
82 stars 37 forks source link

Charge SMS and WhatsApp API usage more frequently #3158

Open fungc-io opened 1 year ago

fungc-io commented 1 year ago

Problem

For messaging service like SMS/WhatsApp, currently the metered usage is charged in the next invoice This may incur a high unpaid messaging cost but failed to be paid at the end of the month.

Appetite

2 weeks

Solution

Charge more frequently

Lower per day message limit

For SMS/Whatsapp API set a per day limit at:

When the soft limit is met, an email alert is sent to the user, They should reply to customer services to review the quota and raise the limit for the tenant.

chpapa commented 1 year ago

Maybe the recharge model is a bit difficult to implement with a lot of pages etc, what about instead, let's do these. @fungc-io

  1. Everyday, Authgear will update the SMS/Whatsapp API usage to Stripe, and charge the outstanding amount if it is > USD 50
  2. We set a reasonable soft limit and hard limit for SMS/Whatsapp API per day (500 and 1000?) where we will have customer services to review the quota and raise the limit for the tenant.