# Zoho Books
### What It Does

Zoho Books sends billing events in real time to DURUM.ai.

| Zoho Books Event | Type in DURUM.ai | When |
|-----------------|-----------------|------|
| Invoice Paid | Payment | Client pays an invoice |
| Invoice Overdue | Payment Due | Invoice passes the due date |

### Step-by-Step Configuration

1. Log in to your Zoho Books account
2. Click the **Gear icon** (top right) to access **Settings**
3. In the **Integrations** section, click **Webhooks** (or in **Automation** depending on your version)
4. Click **+ New Webhook**

**Webhook for paid invoices:**

5. **Name**: `DURUM - Payment`
6. **Module**: Invoice
7. **URL**:
   ```
   https://app.durum.ai/api/webhook/payment?client_key=YOUR_KEY
   ```
8. **HTTP Method**: POST
9. **Payload Format**: JSON
10. In **Trigger**, select: when invoice status changes to **Paid**
11. Add the fields to include in the payload:
    - Invoice Number
    - Invoice Date
    - Total
    - Balance
    - Customer Name
    - Contact Email
12. Click **Save**

**Webhook for overdue invoices:**

13. Create a second webhook: `DURUM - Payment Due`
14. Same URL:
    ```
    https://app.durum.ai/api/webhook/payment?client_key=YOUR_KEY
    ```
15. **Trigger**: when status changes to **Overdue**
16. Save

### How to Test

1. Create a test invoice in Zoho Books
2. Mark it as paid
3. Wait 30 seconds
4. In DURUM.ai, go to **Data Logs**
5. Verify that a `payment` event appears
6. Delete the test invoice

### Zoho Books Troubleshooting

| Problem | Solution |
|---------|----------|
| Empty payload in logs | Verify the fields are properly configured in the Zoho Books webhook |
| `client_key=unknown` | Make sure `?client_key=YOUR_KEY` is present in the URL |
| Quarantined event | The agency needs to map the source. Contact your manager. |

> **Warning**
>
> The `?client_key=YOUR_KEY` parameter is **required** in the Zoho Books webhook URL. Without this parameter, DURUM.ai won't be able to associate the payment with your account.

---

---

Source: https://docs.durum.ai/en/integrations/zoho-books
