cocalc
cocalc copied to clipboard
Notify users about failed payments
I think it should be a red non-dismissable banner saying "You payment of $123.56 on May 1, 2024 was not completed. Please update your payment information or make a manual payment at https://cocalc.com/settings/purchases"
To implement this, we obviously need a way to track initiated payments, with their amount and date, and catch those that have failed.
Why we need this:
- automatic payments may fail for one reason or another, including expiration dates or card switches
- neither we nor Stripe send emails about it and people may not read their emails anyway (but sending an email in addition to a banner would be great)
- users with subscriptions may be our most loyal users - they may be happy to update the info if they were told that it is necessary
As far as implementation goes, I don't think that there is a reliable way of detecting problems based on the balance alone. The account may look like a payment should be made right before the closing date and right after. Right after the closing date and even trying to make a payment it is possible that money are not there because of a long delay in processing rather than failing. Showing angry banners when there is no problem and no action that can be taken can create angry users and nothing else!