Journals / Case study

How Dropbox picks the hour to retry a failed renewal

In May 2021 Dropbox explained how it stopped retrying failed subscription payments on a fixed schedule. A gradient boosted ranking model scores every hour in the recovery window and the next charge goes to the best one, served in under 300 milliseconds. Dropbox says it beat 14 years of hand-tuned rules, but gives no numbers. The idea is now a standard billing feature, and card networks now limit how often you may try.

11 NOV 202611 min readPayments · Ranking · Churn · Machine learning Based on: Dropbox, 2021
Diagram comparing two ways to retry a failed renewal. Before, the fixed rules: after the first failure, retry every four days until day 28, then downgrade the account to free Basic. After, the model: the 8-day window is cut into 192 one-hour slots, a gradient boosted ranking model scores each slot by its predicted chance of success, and the next charge goes to the top-ranked hour. If that attempt fails, the model is asked again for the next best hour, until the payment succeeds or the window ends.
Diagram: MORARI. Source: Dropbox

"It’s probably happened to you at some point: You go to use a service for which you believe you’ve got a paid subscription, only to find that it’s been canceled for non-payment." That is how Sarah Andrabi of Dropbox's machine learning team opened a post on 17 May 2021. Nobody chose to leave. The card simply failed, and the retries did not catch it.

Her team's fix is small and well defined: when a renewal charge fails, let a model choose when to try again.

The problem: a schedule from another decade

Dropbox charges subscriptions automatically, monthly or yearly. When the charge fails, the customer is in what Dropbox calls renewal failure. Some failures fix themselves, such as "insufficient funds" before payday or "transient processing failures". Others, such as an "expired credit card", need the customer.

The recovery logic was a set of rules: "a static set of about ten different methods to determine when to charge a customer whose subscription is in renewal failure. For example, we may charge a customer every four days until a payment succeeds, for a maximum of 28 days." If every attempt fails, "their Dropbox account is downgraded to a free Basic account."

Those rules had been tuned with A/B tests per customer segment, and the tests had proved one useful thing: "time of charge had an effect on charge success rates". But "over time a large number of these rules have decayed and hit a performance ceiling." The decision itself has three parts, as the post puts it: "we have to determine when to retry, how many times to retry, and whether we should even attempt a retry." The model Dropbox describes handles the first.

How they built it

The post compares the problem to a multi-armed bandit, but the model is plain supervised learning. "We built a gradient boosted ranking model trained with features including types of payment failures, Dropbox account usage patterns, and payment type characteristics." Gradient boosting builds a model from many small decision trees; a ranking model orders options instead of predicting one number.

The options are hours. "we took an 8 day window and divided it into one-hour chunks, resulting in a total of 192 time chunks. We used our models to find the highest ranking time chunk to attempt the renewal." The team also tried 6- and 4-day windows, and started with individual customers and teams in North America.

The hero diagram at the top compares the old fixed schedule with the model's ranked hours.

First version: one smart retry. The model chose only the first retry. "If the model’s recommended attempt also failed, we defaulted back to our rule-based logic for the rest of the renewal window." It was tested on a random sample of US individual users. "The model improved success rates, and we shipped it."

Second version: ask again after every failure. A separate model per retry would not scale: "if we retried 5 times before a payment succeeded, using this design we would end up with 5 models." So the team moved to "a single model that can predict when to charge a customer multiple times until the customer is able to successfully renew, or is downgraded after the maximum renewal window has passed". After each failure, the same model is asked for the next best hour. When the post was written this version was in an A/B test on Dropbox teams: "The results so far are positive."

How it runs

The serving design is the part most teams can copy directly. The first attempt put the model inside the payments system, and it hurt: "This design caused the Payments Platform to bloat significantly due to the added dependencies. Prediction latencies ran to around two minutes on average."

Diagram of how Dropbox serves retry predictions, in six steps. One: a charge fails, and the payments platform asks its predict module for the next best time, sending the customer id and type. Two: the module fetches the customer's usage and payment signals and the last failure from Edgestore, refreshed daily by an Airflow job. Three: the signals go over gRPC to a separate Predict Service, where a feature encoder and the ranking model score the hours. Four: the best hour comes back. Five: the prediction is logged for troubleshooting and analysis. Six: the payments service schedules the next attempt at that hour and stores it. Model inside the payments system: about two minutes per prediction. Separate Predict Service: under 300 ms for 99 percent.
Billing keeps the rules and the schedule; a separate service only answers when. Diagram: MORARI. Source: Dropbox

The fix was to move the model into Dropbox's shared Predict Service and call it over the network. Features are refreshed daily by "a daily scheduled Airflow Job", the predict module fetches them, and "The collected signals are sent to Predict Service via a GRPC call, which encodes the signals into a feature dataframe and then sends them to the model." The answer is logged and turned into a scheduled charge. Latency fell "from several minutes to under 300ms for 99 percent of them."

The team watched business, model and infrastructure numbers side by side. The main one is "Invoice Approval Rate: This is the primary metric that we want to improve." It counts whether the renewal succeeded in the end, however many attempts it took. Next to it sit the success rate of each attempt, "Coverage: the percentage of customers that have recommendations from the model compared to the fixed 4 day interval", prediction counts and latency.

What it delivered

Here the post is thin. Its claim is "Our experimentation has validated that the ML-based system outperforms our rule-based approach", with "An overall increase in payment charge success rates and reduction of collection time". It also let Dropbox remove "all of our old hardcoded sub-optimal billing policies developed over 14 years of A/B testing."

There are no numbers behind those sentences. No recovery rate, no uplift, no baseline for the four-day schedule, no test size, no split by decline reason or country. The only measured figures in the post are the latencies. The post also does not say which hours the model prefers, and it does not mention decline codes, card network limits or the cost of extra attempts.

One limit is worth stating plainly. Timing cannot fix a card that is closed or expired. A better hour helps "insufficient funds" and temporary errors; the rest needs the customer.

What has changed since

We found no later Dropbox post on this system, so we cannot say whether it is still in use or whether the full-cycle model rolled out worldwide as planned. Dropbox's own help pages show fixed schedules for two smaller products: Dropbox Sign will "try to bill you for three days after your renewal date" and DocSend will "automatically retry the charge three more times". The company itself changed. It cut "approximately 20%" of its workforce in October 2024, per its 8-K. Its Q3 2026 results report "Paying users totaled 18.20 million, as compared to 18.07 million." When the paying base barely grows, every renewal you keep counts.

The idea became a product. Stripe's Smart Retries "chooses the best times to retry failed payment attempts", and for new accounts Stripe "enables Smart Retries by default and configures it for up to 8 retries within 2 weeks." Adyen's Auto Rescue "performs these retries at optimal times", and Recurly calls its version a "machine learning–powered retry engine". None of these pages publishes an uplift number.

The card networks drew lines. Visa's rules, in force from April 2021, say that after a "Category 1 (Issuer will never approve) decline code", "the merchant is not permitted to reattempt the transaction". For Mastercard, a Braintree notice says that from November 2023 US merchants pay fees when they "retry a transaction more than 35 times" in 30 days, and that issuers can now send an advice code that tells the merchant "an optimal time to retry the transaction." So retrying more often is no longer free, and the issuer may already know the best time.

Fewer failures now reach the retry stage. In February 2023 Stripe announced network tokens in 36 more markets and a real-time card account updater, which keep a stored card working after it is replaced. Stripe says "approximately 40% of cardholders replaced their cards" in the year before.

Why it matters for your business

In Indonesia the first question is not when to retry but whether you can retry at all. Only some payment methods let a merchant charge again without the customer. Midtrans' subscription API retries on its own: "Midtrans will perform automatic retries 3 times for every one hour by default (unless customized) before marking subscription as inactive", per its docs. Xendit's subscriptions let a plan hold a "main and backup payment method" and send a payment link after a failure. DOKU's e-wallet guide names one e-wallet for recurring: "Currently, e-wallet payment channel in DOKU that support Tokenization and Recurring scheme is OVO."

Virtual accounts, QRIS and bank transfers start with the payer. In our reading, a merchant cannot pull a second attempt from them, so recovery there is a reminder and a fresh payment link, not a retry. For mandate-style direct debit, Bank Indonesia's SNAP standard (PADG 23/15/PADG/2021) describes an authorisation given once and valid for a period, used "untuk melakukan pembayaran tagihan secara berkala".

Cards are a small base. Bank Indonesia's statistics count about 18.3 million credit cards in August 2026, cards rather than people. So a SaaS in Indonesia often has fewer renewals that can be retried at all, and the most valuable step is moving customers onto a method that can.

The timing idea still applies where a retry is possible. Indonesian salaries cluster around the end of the month, and "insufficient funds" is a timing problem. Whether a retry after payday actually works better is our hypothesis, not something Dropbox tested. It is cheap to test.

How we would build it today

Diagram of failed-renewal recovery for an Indonesian SaaS, in three bands. Sort first: log every attempt with instrument, gateway, failure code, attempt number, local time, day of month and outcome; split instruments into those you can charge again (tokenised cards, linked e-wallets, direct debit mandates) and those you cannot (virtual accounts, QRIS, transfers), which get a reminder and a payment link. Retry with rules: never retry permanent declines, set the gateway's retry settings on purpose, cap attempts per card far below network limits, make every attempt idempotent, and test a payday retry against a random holdout. Learn later: a success-rate table by hour, weekday, day of month and code, and a ranking model like Dropbox's only with months of logs and a control group. Underneath: notify through WhatsApp or email with a one-tap link and a backup method, and keep access during a grace period before a downgrade.
Decide whether a charge can be retried before deciding when. Diagram: MORARI. Source: Dropbox
  1. Log every attempt. Payment method, gateway, failure code, attempt number, local hour, day of month, amount, plan and outcome. Without this log there is nothing to learn from, by model or by hand.
  2. Split by payment method first. Tokenised cards, linked e-wallets and direct debit mandates can be charged again. Virtual accounts, QRIS and transfers cannot; send a reminder and a payment link instead.
  3. Never retry a permanent decline. Use the codes your gateway marks as final. Visa's rule above makes this a requirement, not a tuning choice.
  4. Set the gateway's retry settings on purpose. Midtrans' retry_schedule and Xendit's retry count and RESUME or STOP option are your baseline. Leaving the defaults is still a choice.
  5. Keep attempts few and safe. Cap them per card per month, far below the network figures. Make every charge idempotent so a timeout can never bill twice; Dropbox's 2017 post on payment failures is about exactly that.
  6. Test timing with rules before a model. Try one retry after the usual payday against a random holdout. With tens of thousands of renewals a month, a table of success rates by hour, weekday, day of month and code is often enough.
  7. Earn the model. A ranking model like Dropbox's pays only with months of logs and a control group. Measure what Dropbox measured, invoice approval rate, attempt success and days to recover, and add what it did not publish: cost per attempt.
  8. Talk to the customer. Before and after the first failure, send a WhatsApp or email message with a one-tap payment link and a way to add a backup method. Keep access through a grace period and downgrade rather than delete, as Dropbox does.

For most Indonesian subscriptions, steps 1 to 5 and 8 recover more than any model, in our view. Dropbox needed fourteen years of rules before a model was worth it; most teams can still win with better rules.