# Auto billing

Auto billing makes and emails the same invoice to a customer on a fixed day (every week, every 2
weeks or every month). Your cloud backup sends them from your Gmail, so **it works with your PC
off**. Each period sends once, never twice.

You need cloud backup turned on (Settings › Cloud backup) before auto billing can run.

## Connect Gmail (once)

On **Auto billing › Send from Gmail**, click **Connect Gmail** and finish the Google sign-in in your
browser. Google asks you to allow "Send email on your behalf" only; bkKeeper can't read your mail.
The Gmail key is kept in your cloud backup, not on this PC.

- **Reconnect** if Google signed you out.
- **Disconnect** stops all emailing until you connect again.
- **Show Google setup** is for the business owner setting bkKeeper up for the first time (it takes
  a Google OAuth client ID). Most people never need it.

The same Gmail connection sends single invoices (**Send by email**), late reminders, and
appointment reminders.

## Make a schedule

1. **New schedule**.
2. Pick the **Customer** (customers with no email are marked "(no email)").
3. **How often**: every week, every 2 weeks, or every month. Then the weekday, or the day of the
   month (29, 30 and 31 mean the last day in shorter months).
4. **Send time** and **Time zone** (from Settings), **Starts**, and **Ends** if it should stop.
5. **Payment terms (days)** if different from your usual, and the **Invoice template**.
6. Lines: description, quantity, rate. The total shows as "$X each time".
7. **Notes on each invoice**, then **Save**.

Below the form, **Next sends** lists the upcoming send times so you can check them.

## Pause, resume, cancel

- **Pause** / **Resume** a single schedule.
- **Cancel schedule** stops it for good; its invoices stay in your history.
- **Delete** removes a schedule that never made an invoice; one that did is cancelled instead.
- **Duplicate** (on a cancelled schedule) starts a copy.

## Pause all

One switch on the Auto billing page stops **every** email: scheduled invoices, single sends,
reminders. Your cloud backup checks it right before each send. While it's on, missed sends wait and
ask you what to do.

## How sending stays safe

- **Send by email** queues an invoice. It only goes out if the invoice is unchanged and you clicked
  within the last 24 hours. Otherwise bkKeeper asks you again.
- A send that was missed (Pause all, a deleted customer, or the cloud more than 6 hours late) is
  never caught up by itself. **Needs your decision** asks **Send now** or **Skip this one**.
- If Gmail's answer was unclear, the invoice is never resent automatically. Check your Gmail Sent
  folder, then pick **Resend** or **It went out, mark sent** under Needs your decision.
- If you change or cancel a schedule while offline, bkKeeper warns you of the exact time the old
  plan would still send until your PC syncs.

Auto billing is part of bkKeeper Pro and up.
