> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salesbricks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dunning

> Handling failed payments in Salesbricks

## Overview

Manage failed payments effortlessly with dunning. Salesbricks automatically classifies payment failures, alerts the right people, and triggers automatic retries so that you can recover revenue without lifting a finger.

<Note>
  To enable dunning for your account, please contact Salesbricks Support.
</Note>

<Tip>
  Automatic payment retries are an opt-in feature. To enable them for your account, go to **Settings → Finance** and turn on ***Automatic retries*** under the Automatic Retries section.
</Tip>

<Frame>
  <img src="https://mintcdn.com/salesbricks/1D-MOI9QLfOt4TWg/billing/images/dunning/settings-auto-retries.png?fit=max&auto=format&n=1D-MOI9QLfOt4TWg&q=85&s=512debd75aeda5d9c6a1f16f1d869af3" alt="Settings" width="2940" height="1602" data-path="billing/images/dunning/settings-auto-retries.png" />
</Frame>

Once enabled globally, retries apply to all orders by default. If you need to turn them off for a specific order, you can do so under ***Additional options → Invoice payment options*** when creating or editing that order.

<Frame>
  <img src="https://mintcdn.com/salesbricks/1D-MOI9QLfOt4TWg/billing/images/dunning/order-form-retries.png?fit=max&auto=format&n=1D-MOI9QLfOt4TWg&q=85&s=8a0fbcab37ea2a9b4c686c7565ffd1bf" alt="Order Form" width="2828" height="1528" data-path="billing/images/dunning/order-form-retries.png" />
</Frame>

You can also override the setting for a single invoice. The **Automatic retries** checkbox appears when you create a [one-off invoice](/billing/one-off-invoices) or use **Advanced edit** on an existing invoice. Through the API, set the `dunning_auto_retries` field when creating or updating an invoice.

When a payment fails, Salesbricks resolves the setting in this order: the invoice override, then the order override, then the account-wide setting.

<Note>
  The retry schedule (3, 7, and 14 days) is fixed and cannot be changed from the Salesbricks UI or API. The overrides only turn retries on or off.
</Note>

## Automatic payment retries

When a payment fails, Salesbricks classifies the failure as either a **soft decline** or a **hard decline** to determine whether an automatic retry is appropriate.

**Soft declines** are failures caused by temporary issues like insufficient funds, a network error, or a payment provider timeout. These are eligible for automatic retry. Salesbricks will schedule up to three retry attempts:

1. **3 days** after the first payment failure
2. **7 days** after the second failure
3. **14 days** after the third failure

Each retry date is calculated from the most recent failure, not from the original payment date. If all three attempts fail, the invoice is marked **Uncollectible**.

**Hard declines** are failures that require the customer to take action like an expired card, an incorrect card number, a closed account, or a payment that needs authentication from the cardholder. These are not retried automatically. The invoice stays in **Action needed** until the customer updates their payment method or you retry the payment manually.

Any decline reason Salesbricks does not recognize is treated as a soft decline and retried.

### What a retry needs

An automatic retry runs only when all of the following are true at the scheduled time:

* The customer has a saved default card on file. Retries always charge that card.
* The invoice still has an unpaid balance.
* The order is closed and its subscription is not paused. Retries resume when the subscription is unpaused.

If any of these conditions fail, the retry is skipped and the invoice keeps its current status.

### Notifications on failure

Every failed card payment, soft or hard, triggers the same set of alerts:

* **Customer email**: "We couldn't process your payment", with an **Update payment method** button that opens the customer portal. For soft declines, the email also shows the date of the next attempt.
* **Seller email**: "Card payment from \[customer] failed", including the failure reason. When a retry is scheduled, it also shows the next retry date and the total number of retries before collection stops.
* **Slack**: a payment failed message, if you have the [Slack integration](/integrations/slack) connected.
* **Webhook**: `invoice.payment.failed`. See [Webhooks](#webhooks) below.

You can mute the customer email under **Settings → Notifications**.

### Collection logs

To see the details of any payment failure, click on the invoice row in the **Billing & Payments** tab to open the **Collection logs** panel. This shows you a snapshot of the invoice's current collection state:

* **Collection status**: the current status of the payment (e.g. Action needed, For retry)
* **Total payment attempts**: how many times payment has been attempted
* **Last attempt**: the date of the most recent payment attempt
* **Next attempt**: the scheduled date of the next automatic retry, if applicable
* **Failure reason**: the reason returned by the payment provider (e.g. Card declined)
* **Accounts payable emails**: the email addresses on file for this invoice. Edit the list and click **Update** to change who receives invoice and payment emails.

### Notes

Below the collection details is a **Notes** section. Click **Add note** to record internal context about the collection, such as a call with the customer or a promise to pay. Notes are visible only to your team, never to the customer.

<Frame>
  <img src="https://mintcdn.com/salesbricks/1D-MOI9QLfOt4TWg/billing/images/dunning/collection-logs.png?fit=max&auto=format&n=1D-MOI9QLfOt4TWg&q=85&s=d2e5e55989562cdc89b6c75b5ac59307" alt="Collection logs panel showing payment failure details" width="2940" height="1536" data-path="billing/images/dunning/collection-logs.png" />
</Frame>

### Invoice log

Scroll down in the Collection logs panel to see the **Invoice log** which provides a full timeline of every event on the invoice, including each payment attempt, status changes, and emails sent to the customer.

If a payment has failed and you want to trigger a retry immediately rather than waiting for the next scheduled attempt, click ***Retry this payment*** in the invoice log. This works for both soft and hard declines.

A manual retry does not count toward the three automatic attempts. If a manual retry fails with a soft decline, the automatic schedule restarts from the beginning, with the next attempt 3 days later.

<Frame>
  <img src="https://mintcdn.com/salesbricks/1D-MOI9QLfOt4TWg/billing/images/dunning/retry-payment.png?fit=max&auto=format&n=1D-MOI9QLfOt4TWg&q=85&s=0994ba942fceb23bda23920959114a7c" alt="Invoice log showing payment failure and retry option" width="2940" height="1534" data-path="billing/images/dunning/retry-payment.png" />
</Frame>

## Collection statuses

Every invoice in the **Billing & Payments** tab displays a **Collection** status so you can quickly see the state of each payment at a glance.

| Status | What it means |
| - | - |
| **Invoice issued** | The invoice has been created but not yet sent to the customer. |
| **Invoice sent** | The invoice has been delivered to the customer's accounts payable email. |
| **Failed** | The payment failed and automatic retries are disabled for this invoice. Manual follow-up is required. |
| **For retry** | The payment failed with a soft decline and an automatic retry is scheduled. Hover over the status to see the next retry date. No action needed. |
| **Action needed** | The payment failed with a hard decline (e.g. expired card, stolen card). The customer needs to update their payment method before a retry is possible. |
| **Retrying 1/3** | A retry attempt is in progress. The numbers show which attempt this is out of the total scheduled. |
| **Collected** | The invoice has been fully paid, either on the first attempt or through a retry. |
| **Uncollectible** | All retry attempts have been exhausted and the payment was not collected. Manual follow-up is required. |

The Collection logs panel and the invoice log use slightly different wording for the same states. In the invoice log, **For retry** appears as **Will retry** and **Collected** appears as **Success**.

## Webhooks

Salesbricks fires webhooks at key points in the payment lifecycle that you can use to trigger actions in your own systems — for example, suspending service on a failed payment and restoring it once collected.

* [**invoice.payment.failed**](/api-reference/webhooks/invoice/payment/failed) — Fired when a payment attempt fails.
* [**invoice.payment.succeeded**](/api-reference/webhooks/invoice/payment/succeeded) — Fired when a payment succeeds, including payments collected via automatic retry.

## Marking an invoice as paid manually

If a payment has been collected outside of Salesbricks (e.g. via bank transfer or check), you can mark the invoice as paid directly in the admin UI from the invoice's Bill Statement page. You can also do this automatically through a finance system integration such as our [QuickBooks integration](/integrations/quickbooks/overview).


## Related topics

- [Overview](/partners/overview.md)
- [BrIQ AI Assistant](/agents/briq.md)
- [Update an invoice](/api-reference/invoices/update-an-invoice.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.