Skip to content

Conversation

ancorcruz
Copy link
Contributor

Roadmap Task

👉 https://getlago.canny.io/feature-requests/p/allow-add-ons-to-be-added-to-subscription-invoices

👉 https://getlago.canny.io/feature-requests/p/define-quantities-for-plan-charges

Context

What is the current situation?

Option 1: User has to create a one off invoice alongside the
subscription, it will create 2 different invoices.

Option 2: User can add a recurring billable metric and use event to
have this fee invoice on subscription renewal, but it won’t appear on
the first billing subscription.

What problem are we trying to solve?

At subscription creation or afterward, there is no clear way to invoice
a fixed fee that is not tied to events, aside from the subscription fee
itself. This fee could be either a one-time charge or a recurring one.

Description

Update Plans::Create mutation and Plan resolver to include fixed charges data,
also, adds all required graphql types.

@ancorcruz ancorcruz self-assigned this Aug 11, 2025
Copy link
Contributor

@annvelents annvelents left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
There is only a small comment about plans/create_input, in case FE doesn't send us anything as fixed_charges

@ancorcruz
Copy link
Contributor Author

LGTM! There is only a small comment about plans/create_input, in case FE doesn't send us anything as fixed_charges

maybe we could make both chages and fixed_charges required false... it should have at least one of them, but should we keep charges mandatory?

@annvelents
Copy link
Contributor

LGTM! There is only a small comment about plans/create_input, in case FE doesn't send us anything as fixed_charges

maybe we could make both chages and fixed_charges required false... it should have at least one of them, but should we keep charges mandatory?

I think once we have FE for the feature, fixed_charges will be sent always (an empty array by default), while now it's nil, and for charges - the same, as we have the FE, we always receive charges (or at least an empty array), and we shouldn't make it required

make fixed_charges argument not required on Plans Create input allow us
to release the backend changes before frontend implements fixed charges
on plans, otherwise it would break...
@ancorcruz ancorcruz merged commit c243abe into main Aug 13, 2025
14 checks passed
@ancorcruz ancorcruz deleted the feat/fixed-charges-5/gql-move-charge-model-types branch August 13, 2025 12:02
ancorcruz added a commit that referenced this pull request Aug 14, 2025
…te mutation (#4126)

 ## Roadmap Task

 👉 https://getlago.canny.io/feature-requests/p/allow-add-ons-to-be-added-to-subscription-invoices

 👉 https://getlago.canny.io/feature-requests/p/define-quantities-for-plan-charges

 ## Context

 What is the current situation?

 **Option 1:** User has to create a one off invoice alongside the
 subscription, it will create 2 different invoices.

 **Option 2:** User can add a recurring billable metric and use event to
 have this fee invoice on subscription renewal, but it won’t appear on      the first billing subscription.

 What problem are we trying to solve?

 At subscription creation or afterward, there is no clear way to invoice
 a fixed fee that is not tied to events, aside from the subscription fee
 itself. This fee could be either a one-time charge or a recurring one.

 ## Description

 Update graphQL type Plans::UpdateInput...
    - accept `bill_fixed_charges_monthly`
    - accept `fixed_charges` collection

 Update graphQL type FixedCharges::Input
    - accept `apply_units_immediately`

 Update graphQL type FixedCharges::Object
    - return `units` -> this was missed in a previous PR

 Add Plans::Update mutation spec scneario for fixed charges
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants