logoalt Hacker News

ayushrodriguesyesterday at 5:17 PM0 repliesview on HN

Thank you! We try and take case of most of these bugs and edge cases. I think the ones that have been most useful are:

1. Race conditions. There are some weird conditions to handle around if a user makes it back to your app post-payment before the webhook, or if they click twice on a purchase button accidentally.

2. Keeping usage reset cycles in sync with billing cycles. We had a bunch of weird cases to solve in February as it's a shorter month.

3. Handling annual plans that have monthly usage billing cycles. Or just handling anything to do with transitioning between annual and yearly billing.

Theo's approach is awesome and a very similar architecture to what we have.