Code Monkey home page Code Monkey logo

getlago / lago Goto Github PK

View Code? Open in Web Editor NEW
6.2K 6.2K 253.0 134.64 MB

Open Source Metering and Usage Based Billing API ⭐️ Consumption tracking, Subscription management, Pricing iterations, Payment orchestration & Revenue analytics

Home Page: https://www.getlago.com

License: GNU Affero General Public License v3.0

Shell 100.00%
analytics billing clickhouse fintech invoices metering open-source payments pricing pricing-data-science react ruby self-hosted subscriptions usage-based-billing

lago's People

Contributors

aaronjohnson avatar anhtho-lago avatar ansmonjol avatar dorianmariecom avatar enzonaute avatar ibrahimbeladi avatar ivannovosad avatar jdenquin avatar jerbob92 avatar jotolo avatar lovrocolic avatar mathieu-lago avatar michaelponrajah avatar morganelecurieux avatar poly4concept avatar porter-deployment-app[bot] avatar rsempe avatar sarkissianraffi avatar stephentgrammer avatar stuartjmackintosh avatar tjschutte avatar vincent-pochet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lago's Issues

Go Client library

Problem description

Users using Go as a backend language can use Lago with the basic methods. However, they don't have a specific API Client to ease the implementation (as we do for Ruby, Node or Python)

[FEAT]: Ability to replace Sidekiq to Shoryuken Worker

Is your feature request related to a problem? Please describe.
Because Sidekiq is a Redis based worker and in AWS environments running a Redis service can be quite expensive I would propose to give ability to choose a different worker in an configurable-Interface-way so the backward compatibility is preserved. This would give possibility to use Shoryuken as a drop in replacement.

Shoryuken uses SQS as a queue which is cheaper/more scalable for larger installations. For local dev/on-prem installations one can use e.g. Elasticmq as a broker (avaiable as both standalone and docker image installation with in-memory/persistent storage)

[FEAT]: Allow creating an invoice out of cycle

Is your feature request related to a problem? Please describe.
Sometimes it would be nice to force creating an invoice before the billing cycle end, for example to immediately create an invoice for a one-off add-on that has been added.

Create and apply coupons to customers

Problem description

There's no way to apply a monetary discount on an invoice easily with no headaches to one or several customers.

There’s no system in Lago that allow our user to handle this right now.

How important is this for you?

Create a fee that will be charge once on customers

Problem description

It’s impossible for our users to add a one-time charge to a customer.

Today, a charge is always recurring or linked to a Billable metric which can occur several times and Lago don’t handle one-time charge systems for now.

How important is this for you?

Custom SQL for billing aggregation types

Problem description

Lago supports 4 main aggregation types to aggregate events into billable metrics:

  • COUNT
  • SUM
  • MAX
  • COUNT DISTINCT

This should cover the majority of cases. But for long tail use cases, you might need to add another aggregation type. This can be done by letting you write custom SQL for incoming events

How important is this for you?

[FEAT]: Reverse a charge

Our Scenario: Customers get charged a commission (billable unit) but very ocassionally we want to revert that charge when the transaction is cancelled.

We thus need to be able to either send the same event again but have Lago know to revert the charge or an API endpoint perhaps?

The complexity also is that these customers are on a Graduated charge model. Thus if there are charges after that one to revert that were charged into the next tier, in a perfect world they would be recalculated but that seems highly problematic to implement.

[BUG]: can't run docker image

Describe the bug
Unable to run docker image via "docker-compose up" as mentioned in docs. See error log in screenshot section.

To Reproduce
docker-compose up

Expected behavior
Should run lago instance

Screenshots

lago-front   | 2022/06/09 09:33:29 [notice] 1#1: using the "epoll" event method
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: nginx/1.21.6
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: built by gcc 10.3.1 20211027 (Alpine 10.3.1_git20211027)
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: OS: Linux 5.10.104-linuxkit
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: start worker processes
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: start worker process 12
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: start worker process 13
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: start worker process 14
lago-front   | 2022/06/09 09:33:29 [notice] 1#1: start worker process 15
lago-api     | rake aborted!
lago-api     | OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key: header too long
lago-api     | /app/config/initializers/rsa_keys.rb:9:in `initialize'
lago-api     | /app/config/initializers/rsa_keys.rb:9:in `new'
lago-api     | /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-api     | /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-api     | /app/config/environment.rb:7:in `<main>'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:348:in `require_environment!'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:511:in `block in run_tasks_blocks'
lago-api     | /usr/local/bundle/gems/sentry-ruby-core-5.3.0/lib/sentry/rake.rb:24:in `execute'
lago-api     | /usr/local/bundle/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
lago-api     | /usr/local/bin/bundle:23:in `load'
lago-api     | /usr/local/bin/bundle:23:in `<main>'
lago-api     | Tasks: TOP => db:migrate => db:load_config => environment
lago-api     | (See full trace by running task with --trace)
lago-worker  | 2022-06-09T09:33:32.846Z pid=8 tid=2qo WARN: OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key: header too long
lago-worker  | 2022-06-09T09:33:32.847Z pid=8 tid=2qo WARN: /app/config/initializers/rsa_keys.rb:9:in `initialize'
lago-worker  | /app/config/initializers/rsa_keys.rb:9:in `new'
lago-worker  | /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-worker  | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-worker  | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-worker  | /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `call'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `call'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-worker  | /app/config/environment.rb:7:in `<top (required)>'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/lib/sidekiq/cli.rb:273:in `require'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/lib/sidekiq/cli.rb:273:in `boot_application'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/lib/sidekiq/cli.rb:37:in `run'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/bin/sidekiq:31:in `<top (required)>'
lago-worker  | /usr/local/bundle/bin/sidekiq:23:in `load'
lago-worker  | /usr/local/bundle/bin/sidekiq:23:in `<top (required)>'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli.rb:494:in `exec'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
lago-worker  | /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:49:in `block in <top (required)>'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
lago-worker  | /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:37:in `<top (required)>'
lago-worker  | /usr/local/bin/bundle:23:in `load'
lago-worker  | /usr/local/bin/bundle:23:in `<main>'
lago-clock   | bundler: failed to load command: clockwork (/usr/local/bundle/bin/clockwork)
lago-clock   | /app/config/initializers/rsa_keys.rb:9:in `initialize': Neither PUB key nor PRIV key: header too long (OpenSSL::PKey::RSAError)
lago-clock   | 	from /app/config/initializers/rsa_keys.rb:9:in `new'
lago-clock   | 	from /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-clock   | 	from /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `call'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `call'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-clock   | 	from /app/config/environment.rb:7:in `<main>'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-clock   | 	from /app/clock.rb:5:in `<top (required)>'
lago-clock   | 	from /usr/local/bundle/gems/clockwork-3.0.0/bin/clockwork:12:in `require'
lago-clock   | 	from /usr/local/bundle/gems/clockwork-3.0.0/bin/clockwork:12:in `<top (required)>'
lago-clock   | 	from /usr/local/bundle/bin/clockwork:23:in `load'
lago-clock   | 	from /usr/local/bundle/bin/clockwork:23:in `<top (required)>'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:494:in `exec'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
lago-clock   | 	from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:49:in `block in <top (required)>'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
lago-clock   | 	from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:37:in `<top (required)>'
lago-clock   | 	from /usr/local/bin/bundle:23:in `load'
lago-clock   | 	from /usr/local/bin/bundle:23:in `<main>'
lago-worker exited with code 1
lago-clock exited with code 1
lago-api     | => Booting Puma
lago-api     | => Rails 7.0.3 application starting in production
lago-api     | => Run `bin/rails server --help` for more startup options
lago-api     | Exiting
lago-api     | /app/config/initializers/rsa_keys.rb:9:in `initialize': Neither PUB key nor PRIV key: header too long (OpenSSL::PKey::RSAError)
lago-api     | 	from /app/config/initializers/rsa_keys.rb:9:in `new'
lago-api     | 	from /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-api     | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-api     | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-api     | 	from /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `call'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `call'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
lago-api     | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-api     | 	from /app/config/environment.rb:7:in `<main>'
lago-api     | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | 	from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
lago-api     | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:42:in `require_relative'
lago-api     | 	from config.ru:3:in `block in <main>'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/builder.rb:116:in `eval'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/builder.rb:116:in `new_from_string'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/builder.rb:105:in `load_file'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/builder.rb:66:in `parse_file'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:349:in `build_app_and_options_from_config'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:249:in `app'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:422:in `wrapped_app'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:312:in `block in start'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:379:in `handle_profiling'
lago-api     | 	from /usr/local/bundle/gems/rack-2.2.3.1/lib/rack/server.rb:311:in `start'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/commands/server/server_command.rb:38:in `start'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/commands/server/server_command.rb:143:in `block in perform'
lago-api     | 	from <internal:kernel>:90:in `tap'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/commands/server/server_command.rb:134:in `perform'
lago-api     | 	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
lago-api     | 	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
lago-api     | 	from /usr/local/bundle/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/command/base.rb:87:in `perform'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/command.rb:48:in `invoke'
lago-api     | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/commands.rb:18:in `<main>'
lago-api     | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | 	from bin/rails:4:in `<main>'
lago-api exited with code 1
lago-clock   | bundler: failed to load command: clockwork (/usr/local/bundle/bin/clockwork)
lago-clock   | /app/config/initializers/rsa_keys.rb:9:in `initialize': Neither PUB key nor PRIV key: header too long (OpenSSL::PKey::RSAError)
lago-clock   | 	from /app/config/initializers/rsa_keys.rb:9:in `new'
lago-clock   | 	from /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-clock   | 	from /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `call'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `call'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-clock   | 	from /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-clock   | 	from /app/config/environment.rb:7:in `<main>'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-clock   | 	from /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-clock   | 	from /app/clock.rb:5:in `<top (required)>'
lago-clock   | 	from /usr/local/bundle/gems/clockwork-3.0.0/bin/clockwork:12:in `require'
lago-clock   | 	from /usr/local/bundle/gems/clockwork-3.0.0/bin/clockwork:12:in `<top (required)>'
lago-clock   | 	from /usr/local/bundle/bin/clockwork:23:in `load'
lago-clock   | 	from /usr/local/bundle/bin/clockwork:23:in `<top (required)>'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:494:in `exec'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
lago-clock   | 	from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:49:in `block in <top (required)>'
lago-clock   | 	from /usr/local/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
lago-clock   | 	from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:37:in `<top (required)>'
lago-clock   | 	from /usr/local/bin/bundle:23:in `load'
lago-clock   | 	from /usr/local/bin/bundle:23:in `<main>'
lago-worker  | 2022-06-09T09:33:35.239Z pid=9 tid=2qp WARN: OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key: header too long
lago-worker  | 2022-06-09T09:33:35.239Z pid=9 tid=2qp WARN: /app/config/initializers/rsa_keys.rb:9:in `initialize'
lago-worker  | /app/config/initializers/rsa_keys.rb:9:in `new'
lago-worker  | /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-worker  | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-worker  | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-worker  | /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `call'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:415:in `each_strongly_connected_component_from'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `call'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
lago-worker  | /usr/local/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-worker  | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-worker  | /app/config/environment.rb:7:in `<top (required)>'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/lib/sidekiq/cli.rb:273:in `require'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/lib/sidekiq/cli.rb:273:in `boot_application'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/lib/sidekiq/cli.rb:37:in `run'
lago-worker  | /usr/local/bundle/gems/sidekiq-6.4.1/bin/sidekiq:31:in `<top (required)>'
lago-worker  | /usr/local/bundle/bin/sidekiq:23:in `load'
lago-worker  | /usr/local/bundle/bin/sidekiq:23:in `<top (required)>'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli.rb:494:in `exec'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
lago-worker  | /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:49:in `block in <top (required)>'
lago-worker  | /usr/local/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
lago-worker  | /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:37:in `<top (required)>'
lago-worker  | /usr/local/bin/bundle:23:in `load'
lago-worker  | /usr/local/bin/bundle:23:in `<main>'
lago-clock exited with code 1
lago-worker exited with code 1
lago-api     | rake aborted!
lago-api     | OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key: header too long
lago-api     | /app/config/initializers/rsa_keys.rb:9:in `initialize'
lago-api     | /app/config/initializers/rsa_keys.rb:9:in `new'
lago-api     | /app/config/initializers/rsa_keys.rb:9:in `<main>'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:667:in `block in load_config_initializer'
lago-api     | /usr/local/bundle/gems/activesupport-7.0.3/lib/active_support/notifications.rb:208:in `instrument'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:666:in `load_config_initializer'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `each'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/engine.rb:619:in `block in <class:Engine>'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `each'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:50:in `tsort_each_child'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
lago-api     | /app/config/environment.rb:7:in `<main>'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | /usr/local/bundle/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
lago-api     | /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:348:in `require_environment!'
lago-api     | /usr/local/bundle/gems/railties-7.0.3/lib/rails/application.rb:511:in `block in run_tasks_blocks'
lago-api     | /usr/local/bundle/gems/sentry-ruby-core-5.3.0/lib/sentry/rake.rb:24:in `execute'
lago-api     | /usr/local/bundle/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
lago-api     | /usr/local/bin/bundle:23:in `load'
lago-api     | /usr/local/bin/bundle:23:in `<main>'
lago-api     | Tasks: TOP => db:migrate => db:load_config => environment
lago-api     | (See full trace by running task with --trace)
^CGracefully stopping... (press Ctrl+C again to force)
[+] Running 6/6
 ⠿ Container lago-worker  Stopped                                                                                                                                                                  0.8s
 ⠿ Container lago-clock   Stopped                                                                                                                                                                  0.4s
 ⠿ Container lago-front   Stopped                                                                                                                                                                  0.3s
 ⠿ Container lago-api     Stopped                                                                                                                                                                  0.3s
 ⠿ Container lago-db      Stopped                                                                                                                                                                  0.2s
 ⠿ Container lago-redis   Stopped                                                                                                                                                                  0.3s
canceled```

</details>

**Support**
 - OS: osx 12.4


Log charges events in the app

Problem description

  1. We cannot fetch programmatically the usage of a customer and reuse this info
  2. We cannot give details of the actual usage linked to the amount charged in a past invoice
  3. We cannot give details of the usage of the current billing period (next invoice)
  4. We don’t have a system to track all the usage coming into Lago

There’s no system in Lago that display ingested events.

How important is this for you?

Define a currency on the customer object

Problem description

Improve the Coupon's experience:

  1. Coupons applied to customers having a pay in advance are impacted on the next current period.
  2. Display the remaining amount left on the Coupon once customer start to use it
  3. When creating the coupon, allow user to set if the coupon can be applied multiple time or one time on a unique customer

Having the currency on the customer allow us to apply any object on it before starting a subscription

How important is this for you?

[FEAT]: add Event show API endpoint

We want to be 100% sure that our events have been created as our revenue depends on it. The current system optimizes for throughput by enqueuing a Sidekick job in Redis to create the event. Depending on the Redis configuration, there is a possibility of losing data if Redis crashes before the job can be worked. And unfortunately many cloud providers limit what configuration options are available.

We would love to have a confirmation that the event is safely stored in Postgres. One way to achieve this would be to send our webhook endpoint an event.created webhook with the event that has been created. Then we can update our system to mark the outgoing billing event as "created_in_billing_system" or whatever.

We are willing to submit a PR if this is something Lago wants to support.

[FEAT]: Allow doing an invoice dry-run

Is your feature request related to a problem? Please describe.
It would be nice to be able to create a dry-run invoice to test what kind of invoice would be created when an invoice would be created at date x

Add Gauge model as an billable metric aggregate type

Problem description

Users with a pricing model requiring to calculate usage based on time (e.g. gigabyte per hours) can't use Lago as it's not handling this aggregation type for now.

How important is this for you?

[FEAT]: Enable to use the same billable metric for several charges

Is your feature request related to a problem? Please describe.
Example from M.T (one of our users): Imagine you want to charge your customer monthly for active users (standard unit pricing). You also want to charge your customer for support, based on number of active users as well, but capped (for example graduated pricing, flat fee, last tier = 0 EUR).”

Describe the solution you'd like
Use the same billable metric to create several charges

[FEAT]: Ability to disable signup

For those of us who are self-hosting, allowing signup after the initial organization(s) are created doesn't make sense.

One solution would be to set an environment variable, e.g. LAGO_SIGNUP_DISABLED which would remove the ability to signup on both the front-end and graphql. Or maybe there's already some feature flagging system that could be used instead.

We are willing to do the work if a PR would be accepted.

[FEAT]: OAuth2 authorization

Is your feature request related to a problem? Please describe.
Many of the organizations already have a IdP available. Lago could leverage e.g. OAUTH2 (as it's currently one of the most popular protocols) to give ability to authorize API requests and give ability to login via the frontend which could potentially be beneficial in case of other features like giving access to usage/invoicing data that is currently being developed.

Describe the solution you'd like
use one of the sso libraries avialable and give ability to configure required paramters. Give ability to restrict who can use the system based at least on some group or give ability to configure the permission field from the JWT.

[BUG]: docker images don't have a latest tag

Describe the bug
Docker images are currently published with a v0.1.0-alpha and not latest which means when running docker-compose up command fails because it can't pull the containers from Docker Hub
To Reproduce
follow steps from https://doc.getlago.com/docs/guide/self-hosting/docker#run-the-app to run selfhosted application

suff:lago/ (main) $ docker-compose up                                                                                                                                                                                                                           [21:20:14]
WARN[0000] The "SENTRY_DSN" variable is not set. Defaulting to a blank string.
WARN[0000] The "SENTRY_DSN" variable is not set. Defaulting to a blank string.
WARN[0000] The "SENTRY_DSN" variable is not set. Defaulting to a blank string.
[+] Running 0/4
 ⠿ front Error                        2.1s
 ⠿ api-clock Error                2.1s
 ⠿ api Error                           2.1s
 ⠿ api-worker Error.             2.1s

Expected behavior
Docker stack should start

[FEAT]: Allow multiple plans per customer

Is your feature request related to a problem? Please describe.
It would be nice to be able to assign multiple plans to the same customer, to have a separate plan per product.

Error webhook on event ingestion

Problem description

When triggering an event without customer_id or code, no error is showing up. It could be great to send an async error reponse via webhook to inform our users

[FEAT]: Support billing in customer timezones

From what I can tell Lago currently selects events to be used to calculate fees, etc. by selecting all fees in a given month/year/(etc) time range. However, the time zone used for that select seems to be the system timezone, which will default to UTC in Rails unless configured otherwise.

We have customers in different timezones, and we currently bill customers for usage in their timezone. So a UK customer and a DK customer will include fees for events in two different time ranges, even though they are both for say "usage in June".

Is this something Lago would like to support? If so we would be happy to contribute a PR.

Generate invoices in PDF

Problem description

Users can’t send invoices to their customer right now. They have to build a PDF system to send invoices or send it to another provider to use the JSON provided from Lago

How important is this for you?

Bill Charges monthly on a yearly plan

Problem description

When a user creates a plan based on a yearly frequency, she can't track the charges monthly and has to follow plan's frequency.
User can't charge the customer monthly usage even if the plan is billed yearly.

How important is this for you?

Event filtering on aggregation types for usage-based billing

Problem description

When receiving events, a user is not able to filter it with an existing property.
For example, you receive a billable event anytime there is a new transaction, but you want to filter by transaction having a completed status. You don't want to implement the logic on your backend and that's totally fine

We should be able to filter events coming in Lago and bill only filtered events

How important is this for you?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.