Free forever, no credit card.Get Started for Free →
← All posts
November 1, 2026 · 5 min read

They Switched Cards. Why Did Your Scheduled Agent Charge the Old One?

A customer replaces an expiring card in the billing portal on the 14th. The new card is saved, the confirmation screen says the update went through, and everyone moves on. On the 1st, the scheduled billing agent runs, and the charge goes to the old card. It declines. A dunning email goes out warning about a failed payment, the customer replies that they already updated their card, and someone on the team spends the morning untangling a payment that should have been routine. Nothing in the run f

A customer replaces an expiring card in the billing portal on the 14th. The new card is saved, the confirmation screen says the update went through, and everyone moves on. On the 1st, the scheduled billing agent runs, and the charge goes to the old card. It declines. A dunning email goes out warning about a failed payment, the customer replies that they already updated their card, and someone on the team spends the morning untangling a payment that should have been routine.

Nothing in the run failed. The job completed, the logs look clean, and the agent did exactly what its stored instructions told it to do. The problem is that the stored instructions were out of date. A payment method is not one fact in one place. It lives in several places at once, and updating one of them does not update the others.

A card update is several updates, not one

When a customer changes how they pay, the change has to land in every system that touches billing, and those systems do not share a single record by default.

First, there is the payment processor, which holds the token the charge actually runs against. Second, there is the subscription record, which points at a specific payment method. Third, there is the agent's own working list: the set of customers due for renewal, the card tokens it cached when the list was built, and the notes from previous runs about which method worked last time. Fourth, there is the support inbox, where a customer who could not find the portal setting simply emailed, "Please use my new card from now on."

Adding a card and pointing the subscription at it are often two different actions. A customer can save a new card to their account without ever attaching it to the subscription, and the subscription keeps charging the old one. A support agent can update the billing profile without updating the scheduled autopay attached to it. Each of these looks like a completed update from inside the system where it happened. From the billing run's point of view, nothing changed at all.

The gap gets worse when the old card still works for a while. If the old card has not expired yet, the charge succeeds, and nobody notices the new card was never used. The customer only finds out months later, when the old card finally expires or gets cancelled, and the renewal fails without warning. A silent wrong-method charge is harder to catch than a decline, because every signal says the billing run is healthy.

Why retries turn one stale charge into a mess

Most billing agents retry a failed charge. That is sensible when the failure is temporary, and destructive when the failure is a stale payment method. The retry hits the same old token again, generates another decline, and sometimes triggers another dunning message. The customer, who already updated their card, now gets a second email insisting their payment failed. From their side, the business looks like it is not listening. From the team's side, the billing run looks like it is working, because retries are doing what retries are supposed to do.

The same staleness spreads to the rest of the operation. The dunning workflow chases a customer who is not actually behind on payment. The revenue report shows a failed renewal that was never really at risk. The support ticket asks the team to fix a billing problem that was already fixed by the customer, in a different system, days earlier. One outdated card token creates work in four places, and every one of those places is confident it has the right information.

What the billing run should check before it charges

A scheduled billing run that charges first and asks questions later will keep repeating this mistake. The fix is not a smarter retry policy. It is a billing run that re-reads the current state immediately before charging, instead of trusting a list built earlier.

Before the next billing run goes out, check four things. Does the run re-read the subscription's current payment method right before charging, or does it charge the method cached when the run was planned? Does it check every place a card change can land, including the customer portal, the payment processor, and the support inbox? Does it confirm that the method it is about to charge is the one the customer most recently chose, not merely the one that worked last time? And does it write back what it charged and which method it used, so the next run starts from the truth instead of from a stale copy?

That last point is the one most billing setups skip. A run that charges the old card and records nothing about it leaves the next run just as blind. A run that records the method it used, the result, and any update it noticed gives the next run something to build on. Memory is not a nice extra for a billing agent. It is the difference between a run that learns and a run that repeats.

One shared record instead of four stale copies

This is the kind of shared state Vilix AI is built to hold. It is a cloud-hosted memory layer, so there is nothing to install or maintain, and every tool connects to the same memory over MCP: the billing workflow, the support workflow, and the scheduled agent all read the same payment state, instead of each keeping its own stale copy. Because Vilix AI stores full conversation history, not just extracted facts, the support exchange where a customer asked to switch cards stays retrievable in full, alongside the subscription record.

When the card update lands in one place, it lands everywhere the agent looks. The billing run re-reads the current method before charging, the support thread explains why the method changed, and the result of the charge is written back for the next run. The customer updates their card once, and once is enough.

Vilix AI is free forever on the free plan, with a 7-day Pro trial that needs no credit card, and you can export or delete everything anytime. You can learn more at Vilix AI.

A scheduled agent that wakes up blind will keep charging the card the customer already replaced. Give it a memory of which card is current, and the billing run stops being a source of refunds, disputes, and apologetic emails. The customer did their part when they updated their card. The agent should do its part by remembering that they did.

Get Started for Free

Persistent memory across ChatGPT, Claude, and the AI tools you already use in Vilix AI.

Get Started for Free

Free forever, no credit card.

Keep reading
Does Base44 Remember Between Sessions? Two Different Memories, Two Different Answers

Does Base44 Remember Between Sessions? Two Different Memories, Two Different Answers Short answer: yes, in two separate places, and neither one is the memory most people mean when they ask the question. The AI chat that builds your app keeps its conversation, its plans, and the instructions you wrote for that app. The AI agents you build inside your app have their own memory, on by default, that carries preferences and facts across conversations with your app's users. Both are real. Both stop a

Does v0 Remember Between Sessions? Chat Context, Knowledge, and Where It Stops

Does v0 Remember Between Sessions? Chat Context, Knowledge, and Where It Stops Short answer: inside one chat, yes. Across chats, projects, and the rest of your tools, mostly no, unless you wrote the context down yourself in the places v0 calls Knowledge and custom instructions. That distinction matters because v0 feels continuous while you work in it. You return to a chat, the conversation is still there, the generated app is still there, and iteration picks up where it left off. It is easy to

Does Bolt Remember Between Sessions? Chat Threads, Knowledge, and Short-Term Memory, Explained

Does Bolt Remember Between Sessions? Chat Threads, Knowledge, and Short-Term Memory, Explained Short answer: the project remembers, because the project never goes away. Your code, your chat thread, your version history, and your backups are all still there when you come back tomorrow, so picking the work back up feels continuous. But Bolt does not build a learned memory of you or your decisions the way a memory product does. What carries between sessions is the work itself, plus whatever contex