A key lacking feature I have always encountered when integrating with Stripe, GoCardless etc is easily determining the status of a customer account. Lago (and Stripe, GoCardless etc) efficiently drive the creation of invoices/payments etc, but I always need to implement complex logic when it comes to answering these questions
  • Does a customer have any failed/overdue payments, and what is their overdue balance?
  • I need to disable their access if they have a failed payment older than "x days" or overdue balance greater than "x amount", and re-enable it accordingly.
  • Sometimes payments get reversed, so I need to recalculate when payment state changes.
  • When a customer activates a subscription, I need to wait until the payment is confirmed before activating their access. E.g. the payment was "created" and the subscription is "active", but did the payment actually succeed? This especially applies to GoCardless, where DirectDebit payments take several working days to confirm, only to fail because they made a typo in the bank account.
  • When a subscription is cancelled, the "active state" should remain active up until the period that the customer has prepaid elapses
Technically all of this is possible with APIs to list all payments and filter by status, and webhooks to listen to any change in payment state. But this can be a complex logic to implement. And this sort "subscription/payment state" logic is almost always needed in the end-application, so it would be a create tool to provide.
I would love for Lago to finally be the billing engine that can include this logic.
  • Provide a "subscription state" that reflects the state of the subscription based on the actual state of any pending/failed payments
  • Ability to define opt-in rules for the subscription state like "restrict after x days" or "x amount overdue" or "immediately"
  • Also provide this status at the "customer" level (e.g. restrict all access for a customer when any subscription is overdue)
Created by Mathieu Déjean
·