1 min read

Did Changing Our Dunning Proccess Help?

Let’s see if using smart retries increased the proportion of invoices with failed payments that were eventually paid.

Our dunning proccess takes three weeks, so we’ll only look at invoices created at least three weeks ago.

# connect to BigQuery
con <- dbConnect(
  bigrquery::bigquery(),
  project = "buffer-data",
  dataset = "dbt_buffer"
)

# define sql query
sql <- "
  select distinct
    id as invoice_id
    , date(created_at) as created_at
    , customer_id
    , subscription_id
    , paid
    , attempted
    , attempt_count
    , total
  from stripe_invoices
  where date(created_at) >= date('2019-01-01')
  and attempt_count > 1 
  and total > 0 
  and amount_due > 0
"
  
# query BQ
invoices <- dbGetQuery(con, sql)

Now we have 38 thousand invoices from 2019 to work with. Let’s plot the proportion of invoices with at least one failed payment attempt that were eventually paid.

We enabled smart retries on August 20. Since then, there is some evidence of a positive impact on the proportion of invoices paid after a failed attemp.