cookbook enablement · payment-recovery-enablement-guard
Recover failed payments
Put a dunning agent on past-due invoices. It charges once to recover; it can't hammer the card on every retry.
Agno Bedrock · Nova Pro RETRY_PAYMENT
before Dunning ran in batch windows or needed a human to approve each retry — an agent left unguarded hits the card five times on the same past-due invoice.
RETRY_PAYMENT the line ↓ RETRY_PAYMENT hits the customer's card to recover a missed payment.
now you ship The agent retries the charge on its own. The boundary makes it recover once and stop.
1 Agent proposes
RETRY_PAYMENT on a Invoice.2 KIFF reads the Invoice's current state — before anything runs.
3 State is
PAST_DUE → the agent's action runs, receipt signed.4 State is now
RECOVERED → every repeat is a no-op. You don't babysit it.The flow you ship
A dunning agent retries the charge on a PAST_DUE invoice and the payment is recovered. The same agent then retries again and again — each attempt looks legitimate — but only the first should ever hit the card. You put the agent on recovery; the boundary holds the limit.
Why your team ships it
After recovery the invoice advances to RECOVERED, and RETRY_PAYMENT is allowed only from PAST_DUE — so every subsequent charge attempt is declined (state_not_allowed). The agent owns recovery; the customer's card is charged once.