Skip to content

[ING-240] feat(wallets): add grants_target_top_up to recurring transaction rules#355

Draft
aquinofb wants to merge 1 commit into
mainfrom
ing-240
Draft

[ING-240] feat(wallets): add grants_target_top_up to recurring transaction rules#355
aquinofb wants to merge 1 commit into
mainfrom
ing-240

Conversation

@aquinofb

@aquinofb aquinofb commented Jun 9, 2026

Copy link
Copy Markdown

Context

Wallet recurring transaction rules of type target previously always created a paid top-up; there was no way to grant free credits through a target rule. The API now supports this via a nullable boolean grants_target_top_up on the recurring transaction rule (getlago/lago-api#5582). On a target rule, true makes the periodic gap-fill grant free credits to reach the target balance instead of creating a paid top-up; false, the default for target rules, keeps the current paid behaviour. The field is null for fixed rules.

Description

Exposes grants_target_top_up so consumers can set it on wallet create/update:

  • Whitelists grants_target_top_up in the recurring transaction rule params. Responses already surface it (parsed dynamically into OpenStruct), so no response-model change is needed.
  • Adds create and update specs asserting the field is forwarded on a target rule.

No version bump: released separately, per repo convention.

How to try locally

bundle exec rspec spec/lago/api/resources/customers/wallets_spec.rb

@aquinofb aquinofb self-assigned this Jun 9, 2026
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.

1 participant