Skip to content

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

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

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

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 in the SDK so consumers can set it on create/update and read it from responses:

  • Adds grants_target_top_up: Optional[bool] to both RecurringTransactionRule (input) and RecurringTransactionRuleResponse.
  • Adds create and update coverage (customer-scoped and top-level) asserting the field is forwarded in the request body and parsed from the response.

No version bump: released separately, per repo convention.

How to try locally

python3 -m pytest tests/test_wallet_client.py tests/test_customer_wallet_client.py

@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