Skip to content

Auto-recharge

View Markdown

Auto-recharge buys credits for you when your available balance falls below a threshold you choose. Each recharge is charged to a saved card and emailed to you as a receipt, exactly like a top-up you buy yourself. It is off until you turn it on. Enabling it authorizes Nodus to charge the saved card for the amount you select whenever your balance falls below your threshold, within the daily limits below. You can turn it off at any time.

Saving the card uses Stripe’s hosted setup flow for future payments. Automatic recharges are paid off-session; a bank may require authentication during setup or for a later payment. This cannot guarantee a prompt-free payment.

Terminal window
nodus billing auto-recharge --threshold 10 --amount 50

This recharges $50 whenever your available balance drops below $10. If no card is on file yet, the command first opens a hosted page to save one, then turns auto-recharge on. You can also save a card while buying credits with nodus billing top-up 20 --save-card. In the console, open Usage & billing → Balance and select Add a card to add a card through hosted checkout. Then expand Auto-recharge to configure recharges.

The same settings live on your org’s BillingAccount:

apiVersion: nodus.dev/v1
kind: BillingAccount
metadata:
name: default
spec:
autoRecharge:
enabled: true
thresholdUSD: "10.00" # at least 5.00
amountUSD: "50.00" # 5.00 to 1000.00
Setting Default Allowed
thresholdUSD "10.00" $5.00 or more
amountUSD "20.00" $5.00 to $1,000.00

Turning it on without a saved card is refused; check PaymentMethodPresent in nodus billing, or save a card through the billing portal (nodus billing portal). You can turn auto-recharge off in the console even if you no longer have a saved card. Turning it off does not save other settings you are editing.

Nodus checks your balance each time it renews the hold of running work, settles inference or storage, or refuses a new hold. It recharges when all of these are true:

  • your available balance is below thresholdUSD;
  • a card is on file;
  • no other auto-recharge is still being paid;
  • the org has had fewer than 5 auto-recharges, and less than $5,000 of them, today (UTC);
  • auto-recharge is still enabled: authentication requirements pause it immediately, and 3 consecutive ordinary failures disable it.

A recharge usually lands in seconds. Work whose funding is running short keeps running while it is paid, so a successful recharge within that window means nothing stops.

Each recharge is a TopUp with spec.origin: AutoRecharge:

Terminal window
nodus get topups -o wide
nodus billing receipts

nodus billing shows the auto-recharge state from status.autoRecharge: consecutiveFailures, and, when it has been switched off after a failure, a recovery message in disabledReason.

If the card is declined, the recharge TopUp ends Failed (PaymentFailed), nothing is credited, and the billing email and the org’s owners and admins get an email. Auto-recharge tries again the next time the balance is checked.

If the bank requires authentication, Nodus pauses auto-recharge after that first failure. Ordinary card declines still disable it after 3 consecutive failures. A paused recharge credits nothing; its unpaid invoice is voided. The console shows a recovery message and the billing recipients receive an email.

To resume:

  1. In Usage & billing → Balance, choose Add a card to save or replace the card through Stripe’s hosted setup, completing any authentication your bank requests.
  2. Explicitly turn auto-recharge back on with your chosen threshold and amount. You can also run nodus billing auto-recharge --threshold 10 --amount 50 or set enabled: true.

Updating a card alone does not re-enable automatic charges. A later payment may still need authentication.

If your balance runs out while auto-recharge is off, work stops gracefully as described in When money runs out.

Terminal window
nodus billing auto-recharge --off

The saved card stays on file for later; remove it in the billing portal.