Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(invoice): Remove charges if charge boundaries are invalid #1883

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

julienbourdeau
Copy link
Contributor

https://linear.app/getlago/issue/DLVRY-262

Context

Subscriptions fees are now invoiced at the end of the trial instead of at the beginning of the subscription. We made a change were we don't always skip charge fees if it's the first invoice anymore. See #1836

Description

In some cases, the system might create invalid charge boundaries. This is not new but those cases always happened on the first invoice, and previously, we were skipping charges in this case so it was never visible.

With this PR, we'll ensure a charge is only created if the boundaries are valid. Next, we'll need to look into why the boundaries are invalid in the first place but it's important to merge this fix in the meantime.

Example of invalid boundaries on upgrade

CleanShot 2024-04-17 at 10 41 01@2x

@julienbourdeau julienbourdeau self-assigned this Apr 17, 2024
@julienbourdeau julienbourdeau merged commit 9c8ba10 into main Apr 17, 2024
6 checks passed
@julienbourdeau julienbourdeau deleted the fix/invalid-charge-boundaries branch April 17, 2024 11:28
drejc pushed a commit to fliqa-io/lago-api that referenced this pull request May 15, 2024
…o#1883)

https://linear.app/getlago/issue/DLVRY-262

## Context

Subscriptions fees are now invoiced at the end of the trial instead of
at the beginning of the subscription. We made a change were we don't
always skip charge fees if it's the first invoice anymore. See
getlago#1836

## Description

In some cases, the system might create invalid charge boundaries. This
is not new but those cases always happened on the first invoice, and
previously, we were skipping charges in this case so it was never
visible.

With this PR, we'll ensure a charge is only created if the boundaries
are valid. Next, we'll need to look into *why* the boundaries are
invalid in the first place but it's important to merge this fix in the
meantime.

### Example of invalid boundaries on upgrade

![CleanShot 2024-04-17 at 10 41
01@2x](https://github.com/getlago/lago-api/assets/1525636/2ae49ab7-7fff-497c-8290-608c91b47e87)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants