Refunding prepaid credits triggers repeated charges when a threshold top-up rule is active

Last updated: August 17, 2026

When you issue a credit note refund on a prepaid-credit invoice, Lago removes the corresponding credits from the wallet. If the wallet has an active threshold-based top-up rule, that removal can push the wallet balance below the configured threshold, causing the rule to fire automatically and generate a new top-up invoice and payment charge. Repeating the refund on each new invoice produces a charge loop. The fix is to disable the threshold top-up rule on the wallet before issuing the refund credit note.

Applies to

  • Surface: Dashboard, Stripe integration

  • Object or endpoint: Wallet, prepaid-credit invoice, credit note, threshold top-up rule

  • Condition: Wallet has an active threshold-based top-up rule at the time the refund credit note is issued

Cause

Issuing a refund credit note on a prepaid-credit invoice removes the refunded credits from the wallet balance. If the wallet is configured with a threshold top-up rule (for example, "purchase X credits whenever the balance falls to Y or below"), the credit removal triggers that rule. The rule creates a new top-up invoice and, when an automatic payment method is configured, immediately charges the customer. If the operator then refunds the new invoice with another credit note, the cycle repeats.

How to confirm the cause

Open the wallet's transaction history and check the timestamps of the top-up invoices relative to each refund credit note. A threshold-triggered top-up will appear within seconds of the credit note being issued.

  • Matching signal: A new top-up invoice is generated 2–10 seconds after each refund credit note, and the wallet has a threshold top-up rule configured.

  • Non-matching signal: No threshold top-up rule exists on the wallet, or the new invoice appears only after a scheduled recurring interval rather than immediately after the refund.

How to resolve the issue

If a charge loop is already in progress, stop issuing credit notes.

To safely refund a prepaid-credit top-up when a threshold rule is present, follow these steps in order:

  1. Open the wallet and disable the threshold-based top-up rule.

  2. Open the original prepaid-credit invoice and go to its Credit notes tab.

  3. Select Issue a credit note, choose Refund, and enter the amount.

  4. Confirm the credit note and wait for the refund status to reach Succeeded.

  5. If the wallet is no longer needed, terminate it after the refund is confirmed.

Expected result: The refund is processed in the payment provider, the corresponding credits are removed from the wallet, and no new top-up invoice is generated.

How to prevent this from happening again

Before issuing any refund credit note on a prepaid-credit invoice, always check whether the associated wallet has an active threshold top-up rule. If it does, disable the rule first. Re-enable or terminate the wallet only after the refund has succeeded.

Related documentation