Conversation
aquinofb
marked this pull request as ready for review
July 21, 2026 20:37
aquinofb
requested review from
a team,
lovrocolic and
vincent-pochet
and removed request for
a team
July 21, 2026 20:46
## Context When a wallet's automatic top-up needs to refill more than the wallet's maximum paid top-up limit, the refill was computed by the recurring rule and then rejected by the transaction creation step. Nothing was created and nothing was surfaced to the customer, so auto top-up silently stopped and the wallet ran dry, retrying and failing on every balance refresh. ## Description Threshold and interval refills now pass ignore_paid_top_up_limits when creating the transaction: the recurring rule already computed the amount (applying the min per its own flag, and deliberately reaching past the max to hit the target), so re-checking the limits there could only reject a refill that was intended to happen. This also fixes interval top-ups never honoring the rule's ignore-limits setting. As a complement, a fixed rule configured with a paid amount outside the wallet's top-up limits is now rejected when the wallet is created, the same way the update path already rejects it, so the misconfiguration surfaces immediately instead of failing on every trigger.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
When a wallet's automatic top-up needs to refill more than the wallet's maximum paid top-up amount, the refill was computed by the recurring rule and then rejected by the transaction creation step. Nothing was created and nothing was surfaced: no transaction, no invoice, no webhook. Auto top-up silently stopped, the wallet kept running dry, and the refill was retried and failed on every balance refresh.
The two rules contradicted each other: the recurring rule intentionally lets a target refill go past the max, because reaching the target balance matters most, but transaction creation re-checked the max and rejected the amount.
Changes